Scippy

SCIP

Solving Constraint Integer Programs

struct_matrix.h
Go to the documentation of this file.
1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2/* */
3/* This file is part of the program and library */
4/* SCIP --- Solving Constraint Integer Programs */
5/* */
6/* Copyright (c) 2002-2025 Zuse Institute Berlin (ZIB) */
7/* */
8/* Licensed under the Apache License, Version 2.0 (the "License"); */
9/* you may not use this file except in compliance with the License. */
10/* You may obtain a copy of the License at */
11/* */
12/* http://www.apache.org/licenses/LICENSE-2.0 */
13/* */
14/* Unless required by applicable law or agreed to in writing, software */
15/* distributed under the License is distributed on an "AS IS" BASIS, */
16/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17/* See the License for the specific language governing permissions and */
18/* limitations under the License. */
19/* */
20/* You should have received a copy of the Apache-2.0 license */
21/* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
22/* */
23/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24
25/**@file struct_matrix.h
26 * @ingroup INTERNALAPI
27 * @brief data structure for MIP matrix
28 * @author Dieter Weninger
29 * @author Gerald Gamrath
30 */
31
32/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
33
34#ifndef __SCIP_STRUCT_MATRIX_H__
35#define __SCIP_STRUCT_MATRIX_H__
36
37#include "scip/def.h"
38#include "scip/type_var.h"
39#include "scip/type_cons.h"
40#include "scip/type_matrix.h"
41
42#ifdef __cplusplus
43extern "C" {
44#endif
45
47{
48 SCIP_RATIONAL** lbexact; /**< exact lower bound per variable */
49 SCIP_RATIONAL** ubexact; /**< exact upper bound per variable */
50 SCIP_RATIONAL** lhsexact; /**< exact lhs per constraint */
51 SCIP_RATIONAL** rhsexact; /**< exact rhs per constraint */
52 SCIP_RATIONAL** colmatvalexact; /**< exact coefficients in column major format */
53 SCIP_RATIONAL** rowmatvalexact; /**< exact coefficients in column major format */
54 SCIP_RATIONAL** minacivityexact; /**< exact min activity per row */
55 SCIP_RATIONAL** maxacivityexact; /**< exact max activity per row */
56 int buffersize; /**< necessary because rational buffer arrays need to be freed with a size */
57 int buffersizenconss; /**< necessary because rational buffer arrays need to be freed with a size */
58};
59
60/** constraint matrix data structure in column and row major format */
62{
63 SCIP_Real* colmatval; /**< coefficients in column major format */
64 int* colmatind; /**< row indexes in column major format */
65 int* colmatbeg; /**< column storage offset */
66 int* colmatcnt; /**< number of row entries per column */
67 int ncols; /**< complete number of columns */
68 SCIP_Real* lb; /**< lower bound per variable */
69 SCIP_Real* ub; /**< upper bound per variable */
70 int* nuplocks; /**< number of up locks per variable */
71 int* ndownlocks; /**< number of down locks per variable */
72
73 SCIP_VAR** vars; /**< variables pointer */
74
75 SCIP_Real* rowmatval; /**< coefficients in row major format */
76 int* rowmatind; /**< column indexed in row major format */
77 int* rowmatbeg; /**< row storage offset */
78 int* rowmatcnt; /**< number of column entries per row */
79
80 int nrows; /**< complete number of rows */
81 SCIP_Real* lhs; /**< left hand side per row */
82 SCIP_Real* rhs; /**< right hand side per row */
83
84 SCIP_CONS** cons; /**< constraints pointer */
85
86 SCIP_Bool* isrhsinfinite; /**< is right hand side infinity */
87 int nnonzs; /**< sparsity counter */
88 SCIP_Real* minactivity; /**< min activity per row */
89 SCIP_Real* maxactivity; /**< max activity per row */
90 int* minactivityneginf; /**< min activity negative infinity counter */
91 int* minactivityposinf; /**< min activity positive infinity counter */
92 int* maxactivityneginf; /**< max activity negative infinity counter */
93 int* maxactivityposinf; /**< max activity positive infinity counter */
94 SCIP_MATRIXVALSEXACT* matrixvalsexact; /**< exact matrix data, or NULL if matrix is not exact */
95};
96
97#ifdef __cplusplus
98}
99#endif
100
101#endif
common defines and data types used in all packages of SCIP
#define SCIP_Bool
Definition: def.h:91
#define SCIP_Real
Definition: def.h:156
SCIP_RATIONAL ** minacivityexact
Definition: struct_matrix.h:54
SCIP_RATIONAL ** rhsexact
Definition: struct_matrix.h:51
SCIP_RATIONAL ** lbexact
Definition: struct_matrix.h:48
SCIP_RATIONAL ** ubexact
Definition: struct_matrix.h:49
SCIP_RATIONAL ** lhsexact
Definition: struct_matrix.h:50
SCIP_RATIONAL ** colmatvalexact
Definition: struct_matrix.h:52
SCIP_RATIONAL ** rowmatvalexact
Definition: struct_matrix.h:53
SCIP_RATIONAL ** maxacivityexact
Definition: struct_matrix.h:55
SCIP_Real * lb
Definition: struct_matrix.h:68
SCIP_Bool * isrhsinfinite
Definition: struct_matrix.h:86
int * maxactivityneginf
Definition: struct_matrix.h:92
SCIP_VAR ** vars
Definition: struct_matrix.h:73
int * rowmatcnt
Definition: struct_matrix.h:78
int * minactivityposinf
Definition: struct_matrix.h:91
int * colmatbeg
Definition: struct_matrix.h:65
SCIP_MATRIXVALSEXACT * matrixvalsexact
Definition: struct_matrix.h:94
int * rowmatbeg
Definition: struct_matrix.h:77
SCIP_Real * lhs
Definition: struct_matrix.h:81
SCIP_Real * minactivity
Definition: struct_matrix.h:88
int * colmatind
Definition: struct_matrix.h:64
int * rowmatind
Definition: struct_matrix.h:76
SCIP_Real * colmatval
Definition: struct_matrix.h:63
int * nuplocks
Definition: struct_matrix.h:70
SCIP_CONS ** cons
Definition: struct_matrix.h:84
SCIP_Real * maxactivity
Definition: struct_matrix.h:89
int * maxactivityposinf
Definition: struct_matrix.h:93
SCIP_Real * rowmatval
Definition: struct_matrix.h:75
int * colmatcnt
Definition: struct_matrix.h:66
SCIP_Real * rhs
Definition: struct_matrix.h:82
int * minactivityneginf
Definition: struct_matrix.h:90
SCIP_Real * ub
Definition: struct_matrix.h:69
int * ndownlocks
Definition: struct_matrix.h:71
type definitions for constraints and constraint handlers
type definitions for MIP matrix
type definitions for problem variables