SCIP Doxygen Documentation
Loading...
Searching...
No Matches
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-2025 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 struct_symmetry.h
26
* @brief structs 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_STRUCT_SYMMETRY_H_
34
#define __SCIP_STRUCT_SYMMETRY_H_
35
36
#include "
scip/scip.h
"
37
#include "
symmetry/type_symmetry.h
"
38
#include "
scip/type_expr.h
"
39
40
#ifdef __cplusplus
41
extern
"C"
{
42
#endif
43
44
/** data to encode a symmetry detection graph */
45
struct
SYM_Graph
46
{
47
/* general information about graph */
48
SYM_SYMTYPE
symtype
;
/**< type of symmetries encoded in graph */
49
SCIP_Bool
islocked
;
/**< whether graph is locked, i.e., cannot be modified anymore
50
* (computing colors will lock the graph to avoid inconsistencies) */
51
SCIP_Real
infinity
;
/**< values as least as large as this are regarded as infinite */
52
53
/* information about nodes and node arrays */
54
int
nnodes
;
/**< number of nodes in graph */
55
int
maxnnodes
;
/**< maximum number of entries in node-based arrays */
56
int
nopnodes
;
/**< number of operator nodes in graph */
57
int
maxnopnodes
;
/**< maximum number of entries in operator-based arrays */
58
int
nvalnodes
;
/**< number of value nodes in graph */
59
int
maxnvalnodes
;
/**< maximum number of entries in value-based arrays */
60
int
nconsnodes
;
/**< number of constraint nodes */
61
int
maxnconsnodes
;
/**< maximum number of constraint-based arrays */
62
int
nvarcolors
;
/**< number of variable colors */
63
64
/* node-based arrays */
65
SYM_NODETYPE
*
nodetypes
;
/**< array storing each node's type */
66
int
*
nodeinfopos
;
/**< array assigning each node the position in the corresponding array
67
* containing its information (operator, variable, or value) */
68
int
*
consnodeperm
;
/**< array to hold permutation to sort constraint nodes
69
* (graph needs to be locked to avoid inconsistencies) */
70
71
/* information-based arrays */
72
int
*
ops
;
/**< operators corresponding to nodes in graph */
73
SCIP_Real
*
vals
;
/**< values corresponding to nodes in graph */
74
SCIP_CONS
**
conss
;
/**< constraints corresponding to cons nodes */
75
SCIP_Real
*
lhs
;
/**< array of left-hand sides for cons nodes */
76
SCIP_Real
*
rhs
;
/**< array of right-hand sides for cons nodes */
77
78
/* information about edges and edge arrays */
79
int
nedges
;
/**< number of edges in graph */
80
int
maxnedges
;
/**< maximum number of entries in edge-based arrays */
81
82
/* edge-based arrays; negative entries in edge-first and edge-second correspond to variables */
83
int
*
edgefirst
;
/**< array of first nodes of edges */
84
int
*
edgesecond
;
/**< array of second nodes of edges */
85
SCIP_Real
*
edgevals
;
/**< array assigning each edge a value (SCIPinfinity if unassigned) */
86
87
/* information about variables */
88
SCIP_VAR
**
symvars
;
/**< variables on which symmetries act */
89
int
nsymvars
;
/**< number of variables in symvars */
90
SCIP_Bool
*
isfixedvar
;
/**< whether a variable needs to be fixed */
91
92
/* arrays of colors used for symmetry detection */
93
int
*
varcolors
;
/**< variable colors for symmetry detection */
94
int
*
opcolors
;
/**< operator colors for symmetry detection */
95
int
*
valcolors
;
/**< value colors for symmetry detection */
96
int
*
conscolors
;
/**< constraint colors for symmetry detection */
97
int
*
edgecolors
;
/**< edge colors used for symmetry detection (-1 uncolored) */
98
SCIP_Bool
uniqueedgetype
;
/**< whether all edges are equivalent */
99
};
100
101
/** (additional) data used to encode an expression, which is not encoded as another expression */
102
struct
SYM_ExprData
103
{
104
SCIP_Real
*
constants
;
/**< constants used in an expression */
105
int
nconstants
;
/**< number of constants */
106
SCIP_Real
*
coefficients
;
/**< coefficients of children */
107
int
ncoefficients
;
/**< number of coefficients */
108
SCIP_EXPR
**
children
;
/**< children of expression with a coefficient */
109
};
110
111
#ifdef __cplusplus
112
}
113
#endif
114
115
#endif
SCIP_Bool
#define SCIP_Bool
Definition
def.h:91
SCIP_Real
#define SCIP_Real
Definition
def.h:172
scip.h
SCIP callable library.
SYM_ExprData
Definition
struct_symmetry.h:103
SYM_ExprData::children
SCIP_EXPR ** children
Definition
struct_symmetry.h:108
SYM_ExprData::nconstants
int nconstants
Definition
struct_symmetry.h:105
SYM_ExprData::ncoefficients
int ncoefficients
Definition
struct_symmetry.h:107
SYM_ExprData::coefficients
SCIP_Real * coefficients
Definition
struct_symmetry.h:106
SYM_ExprData::constants
SCIP_Real * constants
Definition
struct_symmetry.h:104
SYM_Graph
Definition
struct_symmetry.h:46
SYM_Graph::nodeinfopos
int * nodeinfopos
Definition
struct_symmetry.h:66
SYM_Graph::nvarcolors
int nvarcolors
Definition
struct_symmetry.h:62
SYM_Graph::conscolors
int * conscolors
Definition
struct_symmetry.h:96
SYM_Graph::infinity
SCIP_Real infinity
Definition
struct_symmetry.h:51
SYM_Graph::nodetypes
SYM_NODETYPE * nodetypes
Definition
struct_symmetry.h:65
SYM_Graph::valcolors
int * valcolors
Definition
struct_symmetry.h:95
SYM_Graph::nedges
int nedges
Definition
struct_symmetry.h:79
SYM_Graph::edgevals
SCIP_Real * edgevals
Definition
struct_symmetry.h:85
SYM_Graph::varcolors
int * varcolors
Definition
struct_symmetry.h:93
SYM_Graph::consnodeperm
int * consnodeperm
Definition
struct_symmetry.h:68
SYM_Graph::maxnedges
int maxnedges
Definition
struct_symmetry.h:80
SYM_Graph::nopnodes
int nopnodes
Definition
struct_symmetry.h:56
SYM_Graph::edgefirst
int * edgefirst
Definition
struct_symmetry.h:83
SYM_Graph::nnodes
int nnodes
Definition
struct_symmetry.h:54
SYM_Graph::nconsnodes
int nconsnodes
Definition
struct_symmetry.h:60
SYM_Graph::symvars
SCIP_VAR ** symvars
Definition
struct_symmetry.h:88
SYM_Graph::maxnnodes
int maxnnodes
Definition
struct_symmetry.h:55
SYM_Graph::nsymvars
int nsymvars
Definition
struct_symmetry.h:89
SYM_Graph::isfixedvar
SCIP_Bool * isfixedvar
Definition
struct_symmetry.h:90
SYM_Graph::maxnopnodes
int maxnopnodes
Definition
struct_symmetry.h:57
SYM_Graph::maxnvalnodes
int maxnvalnodes
Definition
struct_symmetry.h:59
SYM_Graph::vals
SCIP_Real * vals
Definition
struct_symmetry.h:73
SYM_Graph::edgecolors
int * edgecolors
Definition
struct_symmetry.h:97
SYM_Graph::rhs
SCIP_Real * rhs
Definition
struct_symmetry.h:76
SYM_Graph::maxnconsnodes
int maxnconsnodes
Definition
struct_symmetry.h:61
SYM_Graph::islocked
SCIP_Bool islocked
Definition
struct_symmetry.h:49
SYM_Graph::uniqueedgetype
SCIP_Bool uniqueedgetype
Definition
struct_symmetry.h:98
SYM_Graph::nvalnodes
int nvalnodes
Definition
struct_symmetry.h:58
SYM_Graph::lhs
SCIP_Real * lhs
Definition
struct_symmetry.h:75
SYM_Graph::ops
int * ops
Definition
struct_symmetry.h:72
SYM_Graph::conss
SCIP_CONS ** conss
Definition
struct_symmetry.h:74
SYM_Graph::opcolors
int * opcolors
Definition
struct_symmetry.h:94
SYM_Graph::symtype
SYM_SYMTYPE symtype
Definition
struct_symmetry.h:48
SYM_Graph::edgesecond
int * edgesecond
Definition
struct_symmetry.h:84
SCIP_CONS
struct SCIP_Cons SCIP_CONS
Definition
type_cons.h:63
type_expr.h
type and macro definitions related to algebraic expressions
SCIP_EXPR
struct SCIP_Expr SCIP_EXPR
Definition
type_expr.h:55
type_symmetry.h
type definitions for symmetry computations
SYM_SYMTYPE
enum SYM_Symtype SYM_SYMTYPE
Definition
type_symmetry.h:64
SYM_NODETYPE
enum SYM_Nodetype SYM_NODETYPE
Definition
type_symmetry.h:74
SCIP_VAR
struct SCIP_Var SCIP_VAR
Definition
type_var.h:119
symmetry
struct_symmetry.h
© 2002-2025 by Zuse Institute Berlin (ZIB),
Imprint
Generated by
1.13.2