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"
40
41#ifdef __cplusplus
42extern "C" {
43#endif
44
45/** include symmetry propagator */
46SCIP_EXPORT
48 SCIP* scip /**< SCIP data structure */
49 );
50
51/** return currently available symmetry group information */
52SCIP_EXPORT
54 SCIP* scip, /**< SCIP data structure */
55 int* npermvars, /**< pointer to store number of variables for permutations */
56 SCIP_VAR*** permvars, /**< pointer to store variables on which permutations act */
57 SCIP_HASHMAP** permvarmap, /**< pointer to store hash map of permvars (or NULL) */
58 int* nperms, /**< pointer to store number of permutations */
59 int*** perms, /**< pointer to store permutation generators as (nperms x npermvars) matrix (or NULL)*/
60 int*** permstrans, /**< pointer to store permutation generators as (npermvars x nperms) matrix (or NULL)*/
61 SCIP_Real* log10groupsize, /**< pointer to store log10 of group size (or NULL) */
62 SCIP_Bool* binvaraffected, /**< pointer to store whether binary variables are affected */
63 int** components, /**< pointer to store components of symmetry group (or NULL) */
64 int** componentbegins, /**< pointer to store begin positions of components in components array (or NULL) */
65 int** vartocomponent, /**< pointer to store assignment from variable to its component (or NULL) */
66 int* ncomponents /**< pointer to store number of components (or NULL) */
67 );
68
69/** return number of the symmetry group's generators */
70SCIP_EXPORT
72 SCIP* scip /**< SCIP data structure */
73 );
74
75/** creates new operator node type (used for symmetry detection) and returns its representation
76 *
77 * If the operator node already exists, the function terminates with SCIP_INVALIDDATA.
78 */
79SCIP_EXPORT
81 SCIP* scip, /**< SCIP pointer */
82 const char* opnodename, /**< name of new operator node type */
83 int* nodetype /**< pointer to store the new node type */
84 );
85
86/** returns representation of an operator node type.
87 *
88 * If the node type does not already exist, a new node type will be created.
89 */
90SCIP_EXPORT
92 SCIP* scip, /**< SCIP pointer */
93 const char* opnodename, /**< name of new operator node type */
94 int* nodetype /**< pointer to store the node type */
95 );
96
97#ifdef __cplusplus
98}
99#endif
100
101#endif
#define SCIP_Bool
Definition: def.h:91
#define SCIP_Real
Definition: def.h:172
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_RETCODE SCIPcreateSymOpNodeType(SCIP *scip, const char *opnodename, int *nodetype)
SCIP_RETCODE SCIPincludePropSymmetry(SCIP *scip)
int SCIPgetSymmetryNGenerators(SCIP *scip)
SCIP_RETCODE SCIPgetSymOpNodeType(SCIP *scip, const char *opnodename, int *nodetype)
SCIP callable library.
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
type definitions for symmetry computations