Scippy

SCIP

Solving Constraint Integer Programs

cons_orbitope.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 cons_orbitope.h
26 * @ingroup CONSHDLRS
27 * @brief interface for constraint handlers of type partitioning, packing, and full
28 * @author Christopher Hojny
29 */
30
31/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
32
33#ifndef __SCIP_CONS_ORBITOPE_H__
34#define __SCIP_CONS_ORBITOPE_H__
35
36#include "scip/def.h"
37#include "scip/type_cons.h"
38#include "scip/type_retcode.h"
39#include "scip/type_scip.h"
40#include "scip/type_var.h"
42
43#ifdef __cplusplus
44extern "C" {
45#endif
46
47/** includes orbitope constraint handlers
48 *
49 * cons_orbitope serves as an interface for the constraint handlers cons_orbitope_full and cons_orbitope_pp;
50 * this function includes their respective constraint handlers
51 */
52SCIP_EXPORT
54 SCIP* scip /**< SCIP data structure */
55 );
56
57/** creates and captures a orbitope constraint
58 *
59 * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
60 */
61SCIP_EXPORT
63 SCIP* scip, /**< SCIP data structure */
64 SCIP_CONS** cons, /**< pointer to hold the created constraint */
65 const char* name, /**< name of constraint */
66 SCIP_VAR*** vars, /**< matrix of variables on which the symmetry acts */
67 SCIP_ORBITOPETYPE orbitopetype, /**< type of orbitope constraint */
68 int nrows, /**< number of rows of variable matrix */
69 int ncols, /**< number of columns of variable matrix */
70 SCIP_Bool resolveprop, /**< should propagation be resolved? */
71 SCIP_Bool ismodelcons, /**< whether the orbitope is a model constraint */
72 SCIP_Bool checkpporbitope, /**< Check if full orbitope constraints can be upgraded to pp-orbitopes? */
73 SCIP_Bool initial, /**< should the LP relaxation of constraint be in the initial LP?
74 * Usually set to TRUE. Set to FALSE for 'lazy constraints'. */
75 SCIP_Bool separate, /**< should the constraint be separated during LP processing?
76 * Usually set to TRUE. */
77 SCIP_Bool enforce, /**< should the constraint be enforced during node processing?
78 * TRUE for model constraints, FALSE for additional, redundant constraints. */
79 SCIP_Bool check, /**< should the constraint be checked for feasibility?
80 * TRUE for model constraints, FALSE for additional, redundant constraints. */
81 SCIP_Bool propagate, /**< should the constraint be propagated during node processing?
82 * Usually set to TRUE. */
83 SCIP_Bool local, /**< is constraint only valid locally?
84 * Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. */
85 SCIP_Bool modifiable, /**< is constraint modifiable (subject to column generation)?
86 * Usually set to FALSE. In column generation applications, set to TRUE if pricing
87 * adds coefficients to this constraint. */
88 SCIP_Bool dynamic, /**< is constraint subject to aging?
89 * Usually set to FALSE. Set to TRUE for own cuts which
90 * are separated as constraints. */
91 SCIP_Bool removable, /**< should the relaxation be removed from the LP due to aging or cleanup?
92 * Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. */
93 SCIP_Bool stickingatnode /**< should the constraint always be kept at the node where it was added, even
94 * if it may be moved to a more global node?
95 * Usually set to FALSE. Set to TRUE to for constraints that represent node data. */
96 );
97
98/** creates and captures an orbitope constraint in its most basic variant, i. e., with all constraint flags set to their
99 * default values, which can be set afterwards using SCIPsetConsFLAGNAME()
100 *
101 * @see SCIPcreateConsOrbitope() for the default constraint flag configuration
102 *
103 * @note the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
104 */
105SCIP_EXPORT
107 SCIP* scip, /**< SCIP data structure */
108 SCIP_CONS** cons, /**< pointer to hold the created constraint */
109 const char* name, /**< name of constraint */
110 SCIP_VAR*** vars, /**< matrix of variables on which the symmetry acts */
111 SCIP_ORBITOPETYPE orbitopetype, /**< type of orbitope constraint */
112 int nrows, /**< number of rows of variable matrix */
113 int ncols, /**< number of columns of variable matrix */
114 SCIP_Bool resolveprop, /**< should propagation be resolved? */
115 SCIP_Bool ismodelcons, /**< whether the orbitope is a model constraint */
116 SCIP_Bool checkpporbitope /**< Check if full orbitope constraints can be upgraded to pp-orbitopes? */
117 );
118
119#ifdef __cplusplus
120}
121#endif
122
123#endif
SCIP_RETCODE SCIPcreateConsBasicOrbitope(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR ***vars, SCIP_ORBITOPETYPE orbitopetype, int nrows, int ncols, SCIP_Bool resolveprop, SCIP_Bool ismodelcons, SCIP_Bool checkpporbitope)
SCIP_RETCODE SCIPincludeConshdlrOrbitope(SCIP *scip)
SCIP_RETCODE SCIPcreateConsOrbitope(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR ***vars, SCIP_ORBITOPETYPE orbitopetype, int nrows, int ncols, SCIP_Bool resolveprop, SCIP_Bool ismodelcons, SCIP_Bool checkpporbitope, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
common defines and data types used in all packages of SCIP
#define SCIP_Bool
Definition: def.h:91
static SCIP_RETCODE separate(SCIP *scip, SCIP_SEPA *sepa, SCIP_SOL *sol, SCIP_RESULT *result)
Main separation function.
Definition: sepa_flower.c:1221
type definitions for constraints and constraint handlers
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 SCIP_OrbitopeType SCIP_ORBITOPETYPE
type definitions for problem variables