Scippy

SCIP

Solving Constraint Integer Programs

symmetry_lexred.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 symmetry_lexred.h
26 * @ingroup OTHER_CFILES
27 * @brief methods for handling symmetries by dynamic lexicographic ordering reduction
28 * @author Jasper van Doornmalen
29 */
30
31/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
32
33#ifndef __SCIP_SYMMETRY_LEXRED_H__
34#define __SCIP_SYMMETRY_LEXRED_H__
35
36#include "scip/def.h"
37#include "scip/type_retcode.h"
38#include "scip/type_scip.h"
39#include "scip/type_var.h"
40#include "scip/type_event.h"
42
43#ifdef __cplusplus
44extern "C" {
45#endif
46
47
48/*
49 * Data structures
50 */
51
52/** data for dynamic lexicographic reduction propagator */
53struct SCIP_LexRedData;
54typedef struct SCIP_LexRedData SCIP_LEXREDDATA; /**< data for dynamic lexicographic reduction propagator */
55
56/*
57 * Interface methods
58 */
59
60/** prints lexicographic reduction propagation data */
61SCIP_EXPORT
63 SCIP* scip, /**< SCIP data structure */
64 SCIP_LEXREDDATA* masterdata, /**< pointer to global data for lexicographic reduction propagator */
65 int* nred, /**< total number of reductions applied */
66 int* ncutoff /**< total number of cutoffs applied */
67 );
68
69
70/** prints lexicographic reduction propagation data */
71SCIP_EXPORT
73 SCIP* scip, /**< SCIP data structure */
74 SCIP_LEXREDDATA* masterdata /**< pointer to global data for lexicographic reduction propagator */
75 );
76
77
78/** applies lexicographic reduction propagation */
79SCIP_EXPORT
81 SCIP* scip, /**< SCIP data structure */
82 SCIP_LEXREDDATA* masterdata, /**< pointer to global data for lexicographic reduction propagator */
83 SCIP_Bool* infeasible, /**< pointer to store whether infeasibility is found */
84 int* nred, /**< pointer to store the number of domain reductions */
85 SCIP_Bool* didrun /**< a global pointer maintaining if any symmetry propagator has run
86 * only set this to TRUE when a reduction is found, never set to FALSE */
87 );
88
89/** adds permutation for lexicographic reduction propagation */
90SCIP_EXPORT
92 SCIP* scip, /**< SCIP data structure */
93 SCIP_LEXREDDATA* masterdata, /**< pointer to global data for lexicographic reduction propagator */
94 SCIP_VAR** permvars, /**< variable array of the permutation */
95 int npermvars, /**< number of variables in that array */
96 int* perm, /**< permutation */
97 SYM_SYMTYPE symtype, /**< type of symmetries in perm */
98 SCIP_Real* permvardomaincenter, /**< array containing center point for each variable domain */
99 SCIP_Bool usedynamicorder, /**< whether a dynamic variable order shall be used */
100 SCIP_Bool* success /**< to store whether the component is successfully added */
101 );
102
103/** resets lexicographic reduction propagation (removes all permutations) */
104SCIP_EXPORT
106 SCIP* scip, /**< SCIP data structure */
107 SCIP_LEXREDDATA* masterdata /**< pointer to global data for lexicographic reduction propagator */
108 );
109
110
111/** frees lexicographic reduction data */
112SCIP_EXPORT
114 SCIP* scip, /**< SCIP data structure */
115 SCIP_LEXREDDATA** masterdata /**< pointer to global data for lexicographic reduction propagator */
116 );
117
118
119/** initializes structures needed for lexicographic reduction propagation
120 *
121 * This is only done exactly once.
122 */
123SCIP_EXPORT
125 SCIP* scip, /**< SCIP data structure */
126 SCIP_LEXREDDATA** masterdata, /**< pointer to global data for lexicographic reduction propagator */
127 SCIP_EVENTHDLR* shadowtreeeventhdlr /**< pointer to the shadow tree eventhdlr */
128 );
129
130#ifdef __cplusplus
131}
132#endif
133
134#endif
common defines and data types used in all packages of SCIP
#define SCIP_Bool
Definition: def.h:91
#define SCIP_Real
Definition: def.h:172
SCIP_RETCODE SCIPlexicographicReductionPropagate(SCIP *scip, SCIP_LEXREDDATA *masterdata, SCIP_Bool *infeasible, int *nred, SCIP_Bool *didrun)
SCIP_RETCODE SCIPlexicographicReductionGetStatistics(SCIP *scip, SCIP_LEXREDDATA *masterdata, int *nred, int *ncutoff)
SCIP_RETCODE SCIPlexicographicReductionReset(SCIP *scip, SCIP_LEXREDDATA *masterdata)
struct SCIP_LexRedData SCIP_LEXREDDATA
SCIP_RETCODE SCIPlexicographicReductionPrintStatistics(SCIP *scip, SCIP_LEXREDDATA *masterdata)
SCIP_RETCODE SCIPlexicographicReductionFree(SCIP *scip, SCIP_LEXREDDATA **masterdata)
SCIP_RETCODE SCIPlexicographicReductionAddPermutation(SCIP *scip, SCIP_LEXREDDATA *masterdata, SCIP_VAR **permvars, int npermvars, int *perm, SYM_SYMTYPE symtype, SCIP_Real *permvardomaincenter, SCIP_Bool usedynamicorder, SCIP_Bool *success)
SCIP_RETCODE SCIPincludeLexicographicReduction(SCIP *scip, SCIP_LEXREDDATA **masterdata, SCIP_EVENTHDLR *shadowtreeeventhdlr)
type definitions for managing events
type definitions for return codes for SCIP methods
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
type definitions for SCIP's main datastructure
type definitions for symmetry computations
enum SYM_Symtype SYM_SYMTYPE
Definition: type_symmetry.h:64
type definitions for problem variables