interface for constraint handlers of type partitioning, packing, and full to ensure backwards compatibility
This interface ensures backwards compatibility to be able to add packing, partitioning, and full orbitopes via the same function call.
Definition in file cons_orbitope.c.
#include "blockmemshell/memory.h"#include "scip/cons_orbitope.h"#include "scip/cons_orbitope_full.h"#include "scip/cons_orbitope_pp.h"#include "scip/symmetry.h"#include <symmetry/type_symmetry.h>Go to the source code of this file.
Functions | |
| static SCIP_RETCODE | strengthenOrbitopeConstraint (SCIP *scip, SCIP_VAR ***vars, int *nrows, int ncols, SCIP_ORBITOPETYPE *type) |
| 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) |
| 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) |
|
static |
strengthen full orbitopes to packing/partitioning orbitopes if possible
| scip | SCIP data structure |
| vars | variable matrix of orbitope constraint |
| nrows | pointer to number of rows of variable matrix |
| ncols | number of columns of variable matrix |
| type | pointer to store type of orbitope constraint after strengthening |
Definition at line 49 of file cons_orbitope.c.
References assert(), i, NULL, r, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_ORBITOPETYPE_PACKING, SCIPfreeBlockMemoryArray, SCIPisPackingPartitioningOrbitope(), and vars.
Referenced by SCIPcreateConsOrbitope().
| SCIP_RETCODE SCIPincludeConshdlrOrbitope | ( | SCIP * | scip | ) |
includes the orbitope constraint handlers used by this interface
Definition at line 116 of file cons_orbitope.c.
References SCIP_CALL, SCIP_OKAY, SCIPincludeConshdlrOrbitopeFull(), and SCIPincludeConshdlrOrbitopePP().
Referenced by SCIPincludeDefaultPlugins().
| 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 ) |
creates and captures an orbitope constraint
| scip | SCIP data structure |
| cons | pointer to hold the created constraint |
| name | name of constraint |
| vars | matrix of variables on which the symmetry acts |
| orbitopetype | type of orbitope constraint |
| nrows | number of rows of variable matrix |
| ncols | number of columns of variable matrix |
| resolveprop | should propagation be resolved? |
| ismodelcons | whether the orbitope is a model constraint |
| checkpporbitope | Check if full orbitope constraints can be upgraded to pp-orbitope? |
| initial | should the LP relaxation of constraint be in the initial LP? Usually set to TRUE. Set to FALSE for 'lazy constraints'. |
| separate | should the constraint be separated during LP processing? Usually set to TRUE. |
| enforce | should the constraint be enforced during node processing? TRUE for model constraints, FALSE for additional, redundant constraints. |
| check | should the constraint be checked for feasibility? TRUE for model constraints, FALSE for additional, redundant constraints. |
| propagate | should the constraint be propagated during node processing? Usually set to TRUE. |
| local | is constraint only valid locally? Usually set to FALSE. Has to be set to TRUE, e.g., for branching constraints. |
| modifiable | is constraint modifiable (subject to column generation)? Usually set to FALSE. In column generation applications, set to TRUE if pricing adds coefficients to this constraint. |
| dynamic | is constraint subject to aging? Usually set to FALSE. Set to TRUE for own cuts which are separated as constraints. |
| removable | should the relaxation be removed from the LP due to aging or cleanup? Usually set to FALSE. Set to TRUE for 'lazy constraints' and 'user cuts'. |
| stickingatnode | should the constraint always be kept at the node where it was added, even if it may be moved to a more global node? Usually set to FALSE. Set to TRUE to for constraints that represent node data. |
Definition at line 131 of file cons_orbitope.c.
References assert(), propagate, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_ORBITOPETYPE_FULL, SCIP_ORBITOPETYPE_PACKING, SCIP_ORBITOPETYPE_PARTITIONING, SCIPcreateConsOrbitopeFull(), SCIPcreateConsOrbitopePP(), separate(), strengthenOrbitopeConstraint(), and vars.
Referenced by addOrbitopesDynamic(), addOrbitopeSubgroup(), componentPackingPartitioningOrbisackUpgrade(), handleOrbitope(), SCIPcreateConsBasicOrbitope(), and SCIPcreateConsOrbisack().
| 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 ) |
creates and captures an orbitope constraint in its most basic variant, i. e., with all constraint flags set to their default values, which can be set afterwards using SCIPsetConsFLAGNAME()
| scip | SCIP data structure |
| cons | pointer to hold the created constraint |
| name | name of constraint |
| vars | matrix of variables on which the symmetry acts |
| orbitopetype | type of orbitope constraint |
| nrows | number of rows of variable matrix |
| ncols | number of columns of variable matrix |
| resolveprop | should propagation be resolved? |
| ismodelcons | whether the orbitope is a model constraint |
| checkpporbitope | Check if full orbitope constraints can be upgraded to pp-orbitope? |
Definition at line 198 of file cons_orbitope.c.
References FALSE, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPcreateConsOrbitope(), TRUE, and vars.