Scippy

SCIP

Solving Constraint Integer Programs

type_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 2002-2022 Zuse Institute Berlin */
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 type_symmetry.h
26  * @brief type definitions 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_TYPE_SYMMETRY_H_
33 #define __SCIP_TYPE_SYMMETRY_H_
34 
35 #include "scip/scip.h"
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 /** symmetry type specification */
42 #define SYM_SPEC_INTEGER UINT32_C(0x00000001) /**< need symmetries for integer variables only */
43 #define SYM_SPEC_BINARY UINT32_C(0x00000002) /**< need symmetries for binary variables only */
44 #define SYM_SPEC_REAL UINT32_C(0x00000004) /**< need symmetries also for continuous variables */
45 
46 typedef uint32_t SYM_SPEC; /**< types of variables handled by symmetry */
47 
48 /** symmetry timings */
49 #define SYM_COMPUTETIMING_BEFOREPRESOL 0 /**< compute symmetries before presolving */
50 #define SYM_COMPUTETIMING_DURINGPRESOL 1 /**< compute symmetries during presolving */
51 #define SYM_COMPUTETIMING_AFTERPRESOL 2 /**< compute symmetries after presolving */
52 
53 /** define sense of rhs */
55 {
56  SYM_SENSE_UNKOWN = 0, /**< unknown sense */
57  SYM_SENSE_INEQUALITY = 1, /**< linear inequality */
58  SYM_SENSE_EQUATION = 2, /**< linear equation */
59  SYM_SENSE_XOR = 3, /**< XOR constraint */
60  SYM_SENSE_AND = 4, /**< AND constraint */
61  SYM_SENSE_OR = 5, /**< OR constrant */
62  SYM_SENSE_BOUNDIS_TYPE_1 = 6, /**< bounddisjunction type 1 */
63  SYM_SENSE_BOUNDIS_TYPE_2 = 7 /**< bounddisjunction type 2 */
64 };
66 
67 /* type of symmetry handling codes */
68 #define SYM_HANDLETYPE_NONE UINT32_C(0x00000000) /**< no symmetry handling */
69 #define SYM_HANDLETYPE_SYMBREAK UINT32_C(0x00000001) /**< symmetry breaking inequalities */
70 #define SYM_HANDLETYPE_ORBITALFIXING UINT32_C(0x00000002) /**< orbital fixing */
71 #define SYM_HANDLETYPE_SST UINT32_C(0x00000004) /**< Schreier Sims cuts */
72 #define SYM_HANDLETYPE_SYMCONS (SYM_HANDLETYPE_SYMBREAK | SYM_HANDLETYPE_SST)
73 
74 typedef uint32_t SYM_HANDLETYPE; /**< type of symmetry handling */
75 
76 typedef struct SYM_Vartype SYM_VARTYPE; /**< data of variables that are considered to be equivalent */
77 typedef struct SYM_Optype SYM_OPTYPE; /**< data of operators that are considered to be equivalent */
78 typedef struct SYM_Consttype SYM_CONSTTYPE; /**< data of constants that are considered to be equivalent */
79 typedef struct SYM_Rhstype SYM_RHSTYPE; /**< data of constraint sides that are considered to be equivalent */
80 typedef struct SYM_Matrixdata SYM_MATRIXDATA;/**< data for symmetry group computation on linear constraints */
81 typedef struct SYM_Exprdata SYM_EXPRDATA; /**< data for symmetry group computation on nonlinear constraints */
82 
83 /** selection rules for leaders in SST cuts */
85 {
86  SCIP_LEADERRULE_FIRSTINORBIT = 0, /**< first var in orbit */
87  SCIP_LEADERRULE_LASTINORBIT = 1, /**< last var in orbit */
88  SCIP_LEADERRULE_MAXCONFLICTSINORBIT = 2, /**< var with most conflicting vars in its orbit */
89  SCIP_LEADERRULE_MAXCONFLICTS = 3 /**< var with most conflicting vars in problem */
90 };
92 
93 /** tie breaks for leader rule based on the leader's orbit */
95 {
96  SCIP_LEADERTIEBREAKRULE_MINORBIT = 0, /**< orbit of minimum size */
97  SCIP_LEADERTIEBREAKRULE_MAXORBIT = 1, /**< orbit of maximum size */
98  SCIP_LEADERTIEBREAKRULE_MAXCONFLICTSINORBIT = 2 /**< orbit with maximum number of vars in conflict with leader */
99 };
100 
101 /** variable types for leader in Schreier Sims cuts */
103 {
104  SCIP_SSTTYPE_BINARY = 1, /**< binary variables */
105  SCIP_SSTTYPE_INTEGER = 2, /**< integer variables */
106  SCIP_SSTTYPE_IMPLINT = 4, /**< implicitly integer variables */
107  SCIP_SSTTYPE_CONTINUOUS = 8 /**< continuous variables */
108 };
109 
111 
112 /** type of orbitope constraint: full, packing, or partitioning orbitope */
114 {
115  SCIP_ORBITOPETYPE_FULL = 0, /**< constraint is a full orbitope constraint: rowsum(x) unrestricted */
116  SCIP_ORBITOPETYPE_PARTITIONING = 1, /**< constraint is a partitioning orbitope constraint: rowsum(x) == 1 */
117  SCIP_ORBITOPETYPE_PACKING = 2 /**< constraint is a packing orbitope constraint: rowsum(x) <= 1 */
118 };
120 
121 /** conditions to recompute symmetries after a restart */
123 {
124  SCIP_RECOMPUTESYM_NEVER = 0, /**< never recompute symmetries */
125  SCIP_RECOMPUTESYM_ALWAYS = 1, /**< always recompute symmetries */
126  SCIP_RECOMPUTESYM_OFFOUNDRED = 2 /**< only if orbital fixing found a reduction in previous run */
127 };
129 
130 
131 #ifdef __cplusplus
132 }
133 #endif
134 
135 #endif
enum SCIP_LeaderRule SCIP_LEADERRULE
Definition: type_symmetry.h:91
enum SCIP_OrbitopeType SCIP_ORBITOPETYPE
SCIP_RecomputesymType
SCIP_OrbitopeType
SCIP_LeaderTiebreakRule
Definition: type_symmetry.h:94
uint32_t SYM_SPEC
Definition: type_symmetry.h:46
enum SCIP_RecomputesymType SCIP_RECOMPUTESYMTYPE
SYM_Rhssense
Definition: type_symmetry.h:54
SCIP_LeaderRule
Definition: type_symmetry.h:84
enum SYM_Rhssense SYM_RHSSENSE
Definition: type_symmetry.h:65
uint32_t SYM_HANDLETYPE
Definition: type_symmetry.h:74
SCIP_SSTType
SCIP callable library.
enum SCIP_SSTType SCIP_SSTTYPE