1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 2 /* */ 3 /* This file is part of the program and library */ 4 /* SCIP --- Solving Constraint Integer Programs */ 5 /* */ 6 /* Copyright (c) 2002-2023 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 48 SCIP_RETCODE SCIPincludePropSymmetry( 49 SCIP* scip /**< SCIP data structure */ 50 ); 51 52 /** return currently available symmetry group information */ 53 SCIP_EXPORT 54 SCIP_RETCODE SCIPgetSymmetry( 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 72 int SCIPgetSymmetryNGenerators( 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 81 SCIP_RETCODE SCIPcreateSymOpNodeType( 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 92 SCIP_RETCODE SCIPgetSymOpNodeType( 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 103