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