Scippy

SCIP

Solving Constraint Integer Programs

prop_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 prop_symmetry.h
26  * @ingroup PROPAGATORS
27  * @brief propagator for symmetry handling
28  * @author Marc Pfetsch
29  * @author Thomas Rehn
30  * @author Christopher Hojny
31  */
32 
33 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
34 
35 #ifndef __SCIP_PROP_SYMMETRY_H_
36 #define __SCIP_PROP_SYMMETRY_H_
37 
38 #include <scip/scip.h>
39 
40 #include <symmetry/type_symmetry.h>
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 /** include symmetry propagator */
47 SCIP_EXPORT
49  SCIP* scip /**< SCIP data structure */
50  );
51 
52 /** return currently available symmetry group information */
53 SCIP_EXPORT
55  SCIP* scip, /**< SCIP data structure */
56  int* npermvars, /**< pointer to store number of variables for permutations */
57  SCIP_VAR*** permvars, /**< pointer to store variables on which permutations act */
58  SCIP_HASHMAP** permvarmap, /**< pointer to store hash map of permvars (or NULL) */
59  int* nperms, /**< pointer to store number of permutations */
60  int*** perms, /**< pointer to store permutation generators as (nperms x npermvars) matrix (or NULL)*/
61  int*** permstrans, /**< pointer to store permutation generators as (npermvars x nperms) matrix (or NULL)*/
62  SCIP_Real* log10groupsize, /**< pointer to store log10 of group size (or NULL) */
63  SCIP_Bool* binvaraffected, /**< pointer to store whether binary variables are affected */
64  int** components, /**< pointer to store components of symmetry group (or NULL) */
65  int** componentbegins, /**< pointer to store begin positions of components in components array (or NULL) */
66  int** vartocomponent, /**< pointer to store assignment from variable to its component (or NULL) */
67  int* ncomponents /**< pointer to store number of components (or NULL) */
68  );
69 
70 /** return number of the symmetry group's generators */
71 SCIP_EXPORT
73  SCIP* scip /**< SCIP data structure */
74  );
75 
76 /** creates new operator node type (used for symmetry detection) and returns its representation
77  *
78  * If the operator node already exists, the function terminates with SCIP_INVALIDDATA.
79  */
80 SCIP_EXPORT
82  SCIP* scip, /**< SCIP pointer */
83  const char* opnodename, /**< name of new operator node type */
84  int* nodetype /**< pointer to store the new node type */
85  );
86 
87 /** returns representation of an operator node type.
88  *
89  * If the node type does not already exist, a new node type will be created.
90  */
91 SCIP_EXPORT
93  SCIP* scip, /**< SCIP pointer */
94  const char* opnodename, /**< name of new operator node type */
95  int* nodetype /**< pointer to store the node type */
96  );
97 
98 #ifdef __cplusplus
99 }
100 #endif
101 
102 #endif
int SCIPgetSymmetryNGenerators(SCIP *scip)
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
SCIP_RETCODE SCIPincludePropSymmetry(SCIP *scip)
#define SCIP_Bool
Definition: def.h:91
type definitions for symmetry computations
#define SCIP_Real
Definition: def.h:173
SCIP_RETCODE SCIPcreateSymOpNodeType(SCIP *scip, const char *opnodename, int *nodetype)
SCIP_RETCODE SCIPgetSymOpNodeType(SCIP *scip, const char *opnodename, int *nodetype)
SCIP_RETCODE SCIPgetSymmetry(SCIP *scip, int *npermvars, SCIP_VAR ***permvars, SCIP_HASHMAP **permvarmap, int *nperms, int ***perms, int ***permstrans, SCIP_Real *log10groupsize, SCIP_Bool *binvaraffected, int **components, int **componentbegins, int **vartocomponent, int *ncomponents)
SCIP callable library.