Detailed Description
methods for dealing with symmetry detection graphs
Definition in file symmetry_graph.c.
#include "scip/symmetry_graph.h"
#include "scip/scip.h"
#include "scip/misc.h"
#include "symmetry/struct_symmetry.h"
#include "symmetry/type_symmetry.h"
Go to the source code of this file.
Function Documentation
◆ ensureNodeArraysSize()
|
static |
ensures that the node-based arrays in symmetry graph are sufficiently long
- Parameters
-
scip SCIP data structure graph symmetry detection graph addsize required additional size of node-based arrays
Definition at line 358 of file symmetry_graph.c.
References SYM_Graph::maxnnodes, SYM_Graph::nnodes, SYM_Graph::nodeinfopos, SYM_Graph::nodetypes, NULL, SCIP_CALL, SCIP_OKAY, SCIPcalcMemGrowSize(), and SCIPreallocBlockMemoryArray.
Referenced by SCIPaddSymgraphConsnode(), SCIPaddSymgraphOpnode(), and SCIPaddSymgraphValnode().
◆ ensureEdgeArraysSize()
|
static |
ensures that the edge-based arrays in symmetry graph are sufficiently long
- Parameters
-
scip SCIP data structure graph symmetry detection graph addsize required additional size of edge-based arrays
Definition at line 609 of file symmetry_graph.c.
References SYM_Graph::edgefirst, SYM_Graph::edgesecond, SYM_Graph::edgevals, SYM_Graph::maxnedges, SYM_Graph::nedges, NULL, SCIP_CALL, SCIP_OKAY, SCIPcalcMemGrowSize(), and SCIPreallocBlockMemoryArray.
Referenced by SCIPaddSymgraphEdge().
◆ compareVars()
compares two variables for permutation symmetry detection
Variables are sorted first by their type, then by their objective coefficient, then by their lower bound, and then by their upper bound.
result: < 0: ind1 comes before (is better than) ind2 = 0: both indices have the same value
0: ind2 comes after (is worse than) ind2
- Parameters
-
scip SCIP pointer (or NULL for exact comparison) var1 first variable for comparison var2 second variable for comparison
Definition at line 682 of file symmetry_graph.c.
References NULL, SCIPisGT(), SCIPisLT(), SCIPvarGetLbGlobal(), SCIPvarGetObj(), SCIPvarGetType(), and SCIPvarGetUbGlobal().
Referenced by compareVarsFixed(), and SCIPcomputeSymgraphColors().
◆ compareVarsFixed()
|
static |
compares two variables for permutation symmetry detection
Variables are sorted first by whether they are fixed, then by their type, then by their objective coefficient, then by their lower bound, and then by their upper bound.
result: < 0: ind1 comes before (is better than) ind2 = 0: both indices have the same value
0: ind2 comes after (is worse than) ind2
- Parameters
-
scip SCIP pointer (or NULL for exact comparison) var1 first variable for comparison var2 second variable for comparison isfixed1 whether var1 needs to be fixed isfixed2 whether var2 needs to be fixed
Definition at line 746 of file symmetry_graph.c.
References compareVars(), and NULL.
Referenced by SCIP_DECL_SORTINDCOMP().
◆ SCIP_DECL_SORTINDCOMP() [1/6]
|
static |
sorts nodes of a permutation symmetry detection graph
Variables are sorted first by whether they are fixed, then by their type, then by their objective coefficient, then by their lower bound, and then by their upper bound.
result: < 0: ind1 comes before (is better than) ind2 = 0: both indices have the same value
0: ind2 comes after (is worse than) ind2
Definition at line 776 of file symmetry_graph.c.
References compareVarsFixed(), SYM_Graph::isfixedvar, NULL, SCIP_Bool, and SYM_Graph::symvars.
◆ compareVarsSignedPerm()
|
static |
compares two variables for signed permutation symmetry detection
Variables are sorted first by their type, then by their objective coefficient, then by their lower bound, and then by their upper bound. To take signed permutations into account, variable domains are centered at origin if the domain is finite.
result: < 0: ind1 comes before (is better than) ind2 = 0: both indices have the same value
0: ind2 comes after (is worse than) ind2
- Parameters
-
scip SCIP pointer (or NULL for exact comparison) var1 first variable for comparison var2 second variable for comparison isneg1 whether var1 needs to be negated isneg2 whether var2 needs to be negated infinity values as least as large as this are regarded as infinite
Definition at line 807 of file symmetry_graph.c.
References infinity, NULL, SCIP_Real, SCIPisGT(), SCIPisLT(), SCIPvarGetLbGlobal(), SCIPvarGetObj(), SCIPvarGetType(), and SCIPvarGetUbGlobal().
Referenced by compareVarsFixedSignedPerm(), and SCIPcomputeSymgraphColors().
◆ compareVarsFixedSignedPerm()
|
static |
compares two variables for signed permutation symmetry detection
Variables are sorted first by whether they are fixed, then by their type, then by their objective coefficient, then by their lower bound and then by their upper bound. To take signed permutations into account, variable domains are centered at origin if the domain is finite.
result: < 0: ind1 comes before (is better than) ind2 = 0: both indices have the same value
0: ind2 comes after (is worse than) ind2
- Parameters
-
scip SCIP pointer (or NULL for exact comparison) var1 first variable for comparison var2 second variable for comparison isfixed1 whether var1 needs to be fixed isfixed2 whether var2 needs to be fixed isneg1 whether var1 needs to be negated isneg2 whether var2 needs to be negated infinity values as least as large as this are regarded as infinite
Definition at line 925 of file symmetry_graph.c.
References compareVarsSignedPerm(), infinity, and NULL.
Referenced by SCIP_DECL_SORTINDCOMP().
◆ SCIP_DECL_SORTINDCOMP() [2/6]
|
static |
sorts nodes of a signed permutation symmetry detection graph
Variables are sorted first by whether they are fixed, then by their type, then by their objective coefficient, then by their lower bound and then by their upper bound. To take signed permutations into account, variable domains are centered at origin if the domain is finite.
result: < 0: ind1 comes before (is better than) ind2 = 0: both indices have the same value
0: ind2 comes after (is worse than) ind2
Definition at line 960 of file symmetry_graph.c.
References compareVarsFixedSignedPerm(), FALSE, SYM_Graph::infinity, SYM_Graph::isfixedvar, SYM_Graph::nsymvars, NULL, SCIP_Bool, SYM_Graph::symvars, and TRUE.
◆ compareOps()
|
static |
compares two operators
Operators are sorted by their int values.
result: < 0: ind1 comes before (is better than) ind2 = 0: both indices have the same value
0: ind2 comes after (is worse than) ind2
- Parameters
-
op1 first operator in comparison op2 second operator in comparison
Definition at line 1009 of file symmetry_graph.c.
Referenced by SCIP_DECL_SORTINDCOMP(), and SCIPcomputeSymgraphColors().
◆ SCIP_DECL_SORTINDCOMP() [3/6]
|
static |
sorts operators corresponding to SCIP_EXPRHDLR*
result: < 0: ind1 comes before (is better than) ind2 = 0: both indices have the same value
0: ind2 comes after (is worse than) ind2
Definition at line 1030 of file symmetry_graph.c.
References compareOps().
◆ SCIP_DECL_SORTINDCOMP() [4/6]
|
static |
sorts real values
result: < 0: ind1 comes before (is better than) ind2 = 0: both indices have the same value
0: ind2 comes after (is worse than) ind2
Definition at line 1047 of file symmetry_graph.c.
References SCIP_Real.
◆ compareConsnodes()
compares constraint nodes
Nodes are sorted by their type of constraint, then by the lhs, and then by the rhs.
result: < 0: ind1 comes before (is better than) ind2 = 0: both indices have the same value
0: ind2 comes after (is worse than) ind2
- Parameters
-
scip SCIP data structure graph underlying symmetry detection graph ind1 index of first constraint node ind2 index of second constraint node
Definition at line 1071 of file symmetry_graph.c.
References SYM_Graph::conss, SYM_Graph::lhs, NULL, SYM_Graph::rhs, SCIPconsGetHdlr(), SCIPisGT(), and SCIPisLT().
Referenced by SCIP_DECL_SORTINDCOMP(), and SCIPcomputeSymgraphColors().
◆ SCIP_DECL_SORTINDCOMP() [5/6]
|
static |
sorts constraint nodes
Nodes are sorted by their type of constraint, then by the lhs, and then by the rhs.
result: < 0: ind1 comes before (is better than) ind2 = 0: both indices have the same value
0: ind2 comes after (is worse than) ind2
Definition at line 1132 of file symmetry_graph.c.
References compareConsnodes(), and NULL.
◆ SCIP_DECL_SORTINDCOMP() [6/6]
|
static |
sorts edges
Edges are sorted by their weights.
result: < 0: ind1 comes before (is better than) ind2 = 0: both indices have the same value
0: ind2 comes after (is worse than) ind2
Definition at line 1147 of file symmetry_graph.c.
References SYM_Graph::edgevals.
◆ isFixedVar()
returns whether a node of the symmetry detection graph needs to be fixed
- Parameters
-
var active problem variable fixedtype variable types that must be fixed by symmetries
Definition at line 1163 of file symmetry_graph.c.
References FALSE, NULL, SCIP_VARTYPE_BINARY, SCIP_VARTYPE_CONTINUOUS, SCIP_VARTYPE_IMPLINT, SCIP_VARTYPE_INTEGER, SCIPvarGetType(), SYM_SPEC_BINARY, SYM_SPEC_INTEGER, SYM_SPEC_REAL, and TRUE.
Referenced by SCIPcomputeSymgraphColors().