Scippy

SCIP

Solving Constraint Integer Programs

struct_symmetry.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-2023 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_symmetry.h
26  * @brief structs for symmetry computations
27  * @author Marc Pfetsch
28  */
29 
30 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
31 
32 #ifndef __SCIP_STRUCT_SYMMETRY_H_
33 #define __SCIP_STRUCT_SYMMETRY_H_
34 
35 #include "scip/scip.h"
36 #include "symmetry/type_symmetry.h"
37 #include "scip/type_expr.h"
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
43 /** data of variables that are considered to be equivalent */
45 {
46  SCIP_Real obj; /**< objective of variable */
47  SCIP_Real lb; /**< lower bound of variable */
48  SCIP_Real ub; /**< upper bound of variable */
49  SCIP_VARTYPE type; /**< type of variable */
50  int nconss; /**< number of conss a variable is contained in */
51  int color; /**< store color */
52 };
53 
54 /** data of operators that are considered to be equivalent */
55 struct SYM_Optype
56 {
57  SCIP_EXPR* expr; /**< the underlying expression */
58  int level; /**< level of operator in its expression tree */
59  int color; /**< store color */
60 };
61 
62 /** data of constants that are considered to be equivalent */
64 {
65  SCIP_Real value; /**< value of constant */
66  int color; /**< store color */
67 };
68 
69 /** data of coefficients that are considered to be equivalent */
71 {
72  SCIP_Real lhs; /**< value of left-hand-side */
73  SCIP_Real rhs; /**< value of right-hand-side */
74  int color; /**< store color */
75 };
76 
77 /** data for symmetry group computation on linear constraints */
79 {
80  SCIP_Real* matcoef; /**< nonzero coefficients appearing in the matrix */
81  SCIP_Real* rhscoef; /**< rhs coefficients */
82  SYM_RHSSENSE* rhssense; /**< sense of rhs */
83  int* matrhsidx; /**< indices of rhs corresponding to matrix entries */
84  int* matvaridx; /**< indices of variables for matrix entries */
85  int* matidx; /**< indices in mat(rhs/var)idx array corresponding to matrix coefficients */
86  int* rhsidx; /**< indices in rhstype array corresponding to rhs coefficients */
87  int* permvarcolors; /**< array for storing the colors of the individual variables */
88  int* matcoefcolors; /**< array for storing the colors of all matrix coefficients */
89  int* rhscoefcolors; /**< array for storing the colors of all rhs coefficients */
90  SCIP_VAR** permvars; /**< variables on which permutations act */
91  int npermvars; /**< number of variables for permutations */
92  int nmatcoef; /**< number of coefficients in matrix */
93  int nrhscoef; /**< number of coefficients in rhs */
94  int nmaxmatcoef; /**< maximal number of matrix coefficients (will be increase on demand) */
95  int nuniquevars; /**< number of unique variable types */
96  int nuniquerhs; /**< number of unique rhs types */
97  int nuniquemat; /**< number of unique matrix coefficients */
98 };
99 
100 /** data for symmetry group computation on nonlinear constraints */
102 {
103  int nuniqueconstants; /**< number of unique constants */
104  int nuniqueoperators; /**< number of unique operators */
105  int nuniquecoefs; /**< number of unique coefficients */
106 };
107 
108 #ifdef __cplusplus
109 }
110 #endif
111 
112 #endif
SCIP_Real * matcoef
SCIP_Real lhs
SCIP_VAR ** permvars
SCIP_Real value
SCIP_Real ub
SYM_RHSSENSE * rhssense
SCIP_EXPR * expr
SCIP_Real rhs
SCIP_Real lb
SCIP_VARTYPE type
enum SYM_Rhssense SYM_RHSSENSE
Definition: type_symmetry.h:65
type definitions for symmetry computations
type and macro definitions related to algebraic expressions
#define SCIP_Real
Definition: def.h:186
enum SCIP_Vartype SCIP_VARTYPE
Definition: type_var.h:69
SCIP_Real obj
SCIP_Real * rhscoef
SCIP callable library.