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-2022 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not visit scipopt.org. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file struct_symmetry.h
17  * @brief structs for symmetry computations
18  * @author Marc Pfetsch
19  */
20 
21 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
22 
23 #ifndef __SCIP_STRUCT_SYMMETRY_H_
24 #define __SCIP_STRUCT_SYMMETRY_H_
25 
26 #include "scip/scip.h"
27 #include "symmetry/type_symmetry.h"
28 #include "scip/type_expr.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 /** data of variables that are considered to be equivalent */
36 {
37  SCIP_Real obj; /**< objective of variable */
38  SCIP_Real lb; /**< lower bound of variable */
39  SCIP_Real ub; /**< upper bound of variable */
40  SCIP_VARTYPE type; /**< type of variable */
41  int nconss; /**< number of conss a variable is contained in */
42  int color; /**< store color */
43 };
44 
45 /** data of operators that are considered to be equivalent */
46 struct SYM_Optype
47 {
48  SCIP_EXPR* expr; /**< the underlying expression */
49  int level; /**< level of operator in its expression tree */
50  int color; /**< store color */
51 };
52 
53 /** data of constants that are considered to be equivalent */
55 {
56  SCIP_Real value; /**< value of constant */
57  int color; /**< store color */
58 };
59 
60 /** data of coefficients that are considered to be equivalent */
62 {
63  SCIP_Real lhs; /**< value of left-hand-side */
64  SCIP_Real rhs; /**< value of right-hand-side */
65  int color; /**< store color */
66 };
67 
68 /** data for symmetry group computation on linear constraints */
70 {
71  SCIP_Real* matcoef; /**< nonzero coefficients appearing in the matrix */
72  SCIP_Real* rhscoef; /**< rhs coefficients */
73  SYM_RHSSENSE* rhssense; /**< sense of rhs */
74  int* matrhsidx; /**< indices of rhs corresponding to matrix entries */
75  int* matvaridx; /**< indices of variables for matrix entries */
76  int* matidx; /**< indices in mat(rhs/var)idx array corresponding to matrix coefficients */
77  int* rhsidx; /**< indices in rhstype array corresponding to rhs coefficients */
78  int* permvarcolors; /**< array for storing the colors of the individual variables */
79  int* matcoefcolors; /**< array for storing the colors of all matrix coefficients */
80  int* rhscoefcolors; /**< array for storing the colors of all rhs coefficients */
81  SCIP_VAR** permvars; /**< variables on which permutations act */
82  int npermvars; /**< number of variables for permutations */
83  int nmatcoef; /**< number of coefficients in matrix */
84  int nrhscoef; /**< number of coefficients in rhs */
85  int nmaxmatcoef; /**< maximal number of matrix coefficients (will be increase on demand) */
86  int nuniquevars; /**< number of unique variable types */
87  int nuniquerhs; /**< number of unique rhs types */
88  int nuniquemat; /**< number of unique matrix coefficients */
89 };
90 
91 /** data for symmetry group computation on nonlinear constraints */
93 {
94  int nuniqueconstants; /**< number of unique constants */
95  int nuniqueoperators; /**< number of unique operators */
96  int nuniquecoefs; /**< number of unique coefficients */
97 };
98 
99 #ifdef __cplusplus
100 }
101 #endif
102 
103 #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:56
type definitions for symmetry computations
type and macro definitions related to algebraic expressions
#define SCIP_Real
Definition: def.h:177
enum SCIP_Vartype SCIP_VARTYPE
Definition: type_var.h:60
SCIP_Real obj
SCIP_Real * rhscoef
SCIP callable library.