SCIP Doxygen Documentation
 
Loading...
Searching...
No Matches
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-2024 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 type_symmetry.h
26 * @brief type definitions for symmetry computations
27 * @author Marc Pfetsch
28 * @author Christopher Hojny
29 */
30
31/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
32
33#ifndef __SCIP_TYPE_SYMMETRY_H_
34#define __SCIP_TYPE_SYMMETRY_H_
35
36#include "scip/scip.h"
37
38#ifdef __cplusplus
39extern "C" {
40#endif
41
42/** symmetry type specification */
43#define SYM_SPEC_INTEGER UINT32_C(0x00000001) /**< need symmetries for integer variables only */
44#define SYM_SPEC_BINARY UINT32_C(0x00000002) /**< need symmetries for binary variables only */
45#define SYM_SPEC_REAL UINT32_C(0x00000004) /**< need symmetries also for continuous variables */
46
47typedef uint32_t SYM_SPEC; /**< types of variables handled by symmetry */
48
49/** symmetry timings */
50#define SYM_COMPUTETIMING_BEFOREPRESOL 0 /**< compute symmetries before presolving */
51#define SYM_COMPUTETIMING_DURINGPRESOL 1 /**< compute symmetries during presolving */
52#define SYM_COMPUTETIMING_AFTERPRESOL 2 /**< compute symmetries after presolving */
53
54/** define symmetry types detectable by SCIP */
56{
57 SYM_SYMTYPE_PERM = 0, /**< permutation symmetries */
58 SYM_SYMTYPE_SIGNPERM = 1 /**< signed permutation symmetries */
59};
61
62/** define type of nodes in symmetry detection expression trees */
64{
65 SYM_NODETYPE_OPERATOR = 0, /**< operator node */
66 SYM_NODETYPE_VAL = 1, /**< numerical value node */
67 SYM_NODETYPE_CONS = 2, /**< constraint node */
68 SYM_NODETYPE_VAR = 3 /**< variable node */
69};
71
72/** define type of simple constraints/operators in symmetry detection */
74{
75 SYM_CONSOPTYPE_UNKNOWN = 0, /**< unknown constraint type */
76 SYM_CONSOPTYPE_BDDISJ = 1, /**< constraint of type bounddisjunction */
77 SYM_CONSOPTYPE_EQ = 2, /**< encodes == in indicator constraints for activation variable */
78 SYM_CONSOPTYPE_SOS2_TUPLE = 3, /**< encodes pairs in SOS2 constraints */
79 SYM_CONSOPTYPE_SUM = 4, /**< indicates sums if sum-expr undefined */
80 SYM_CONSOPTYPE_SLACK = 5, /**< indicates slack vars in indicator constraints */
81 SYM_CONSOPTYPE_COEF = 6, /**< indicates coefficients from parent expressions */
82 SYM_CONSOPTYPE_SQDIFF = 7, /**< indicates a squared difference */
83 SYM_CONSOPTYPE_CARD_TUPLE = 8, /**< encodes pairs in cardinality constraints */
84 SYM_CONSOPTYPE_LAST = 9 /**< number of predefined enum types, needs to always
85 * hold the biggest value */
86};
88
89/* type of symmetry handling codes */
90#define SYM_HANDLETYPE_NONE UINT32_C(0x00000000) /**< no symmetry handling */
91#define SYM_HANDLETYPE_SYMBREAK UINT32_C(0x00000001) /**< symmetry breaking inequalities */
92#define SYM_HANDLETYPE_ORBITALREDUCTION UINT32_C(0x00000002) /**< orbital reduction */
93#define SYM_HANDLETYPE_SST UINT32_C(0x00000004) /**< Schreier Sims cuts */
94#define SYM_HANDLETYPE_SYMCONS (SYM_HANDLETYPE_SYMBREAK | SYM_HANDLETYPE_SST)
95
96typedef uint32_t SYM_HANDLETYPE; /**< type of symmetry handling */
97
98/** selection rules for leaders in SST cuts */
100{
101 SCIP_LEADERRULE_FIRSTINORBIT = 0, /**< first var in orbit */
102 SCIP_LEADERRULE_LASTINORBIT = 1, /**< last var in orbit */
103 SCIP_LEADERRULE_MAXCONFLICTSINORBIT = 2 /**< var with most conflicting vars in its orbit */
106
107/** tie breaks for leader rule based on the leader's orbit */
109{
110 SCIP_LEADERTIEBREAKRULE_MINORBIT = 0, /**< orbit of minimum size */
111 SCIP_LEADERTIEBREAKRULE_MAXORBIT = 1, /**< orbit of maximum size */
112 SCIP_LEADERTIEBREAKRULE_MAXCONFLICTSINORBIT = 2 /**< orbit with maximum number of vars in conflict with leader */
114
115/** variable types for leader in Schreier Sims cuts */
117{
118 SCIP_SSTTYPE_BINARY = 1, /**< binary variables */
119 SCIP_SSTTYPE_INTEGER = 2, /**< integer variables */
120 SCIP_SSTTYPE_IMPLINT = 4, /**< implicitly integer variables */
121 SCIP_SSTTYPE_CONTINUOUS = 8 /**< continuous variables */
123
125
126/** type of orbitope constraint: full, packing, or partitioning orbitope */
128{
129 SCIP_ORBITOPETYPE_FULL = 0, /**< constraint is a full orbitope constraint: rowsum(x) unrestricted */
130 SCIP_ORBITOPETYPE_PARTITIONING = 1, /**< constraint is a partitioning orbitope constraint: rowsum(x) == 1 */
131 SCIP_ORBITOPETYPE_PACKING = 2 /**< constraint is a packing orbitope constraint: rowsum(x) <= 1 */
134
135#ifdef __cplusplus
136}
137#endif
138
139#endif
SCIP callable library.
enum SCIP_SSTType SCIP_SSTTYPE
SCIP_OrbitopeType
@ SCIP_ORBITOPETYPE_PACKING
@ SCIP_ORBITOPETYPE_FULL
@ SCIP_ORBITOPETYPE_PARTITIONING
enum SYM_Symtype SYM_SYMTYPE
SCIP_LeaderRule
@ SCIP_LEADERRULE_LASTINORBIT
@ SCIP_LEADERRULE_MAXCONFLICTSINORBIT
@ SCIP_LEADERRULE_FIRSTINORBIT
enum SYM_Consoptype SYM_CONSOPTYPE
enum SCIP_LeaderRule SCIP_LEADERRULE
SCIP_LeaderTiebreakRule
@ SCIP_LEADERTIEBREAKRULE_MAXORBIT
@ SCIP_LEADERTIEBREAKRULE_MINORBIT
@ SCIP_LEADERTIEBREAKRULE_MAXCONFLICTSINORBIT
enum SYM_Nodetype SYM_NODETYPE
enum SCIP_OrbitopeType SCIP_ORBITOPETYPE
SYM_Nodetype
@ SYM_NODETYPE_CONS
@ SYM_NODETYPE_VAR
@ SYM_NODETYPE_OPERATOR
@ SYM_NODETYPE_VAL
SYM_Consoptype
@ SYM_CONSOPTYPE_EQ
@ SYM_CONSOPTYPE_BDDISJ
@ SYM_CONSOPTYPE_CARD_TUPLE
@ SYM_CONSOPTYPE_SOS2_TUPLE
@ SYM_CONSOPTYPE_SUM
@ SYM_CONSOPTYPE_SLACK
@ SYM_CONSOPTYPE_COEF
@ SYM_CONSOPTYPE_SQDIFF
@ SYM_CONSOPTYPE_UNKNOWN
@ SYM_CONSOPTYPE_LAST
SYM_Symtype
@ SYM_SYMTYPE_SIGNPERM
@ SYM_SYMTYPE_PERM
uint32_t SYM_SPEC
uint32_t SYM_HANDLETYPE
SCIP_SSTType
@ SCIP_SSTTYPE_INTEGER
@ SCIP_SSTTYPE_CONTINUOUS
@ SCIP_SSTTYPE_BINARY
@ SCIP_SSTTYPE_IMPLINT