GOBNILP
f164d83
|
example constraint handler for partial ordering constraints More...
#include <cons_partialordering.h>
#include "utils.h"
#include "parent_set_data.h"
#include <assert.h>
#include <string.h>
Macros | |
#define | CONSHDLR_CHECKPRIORITY -100 |
priority of the constraint handler for checking feasibility | |
#define | CONSHDLR_DELAYPROP FALSE |
should propagation method be delayed, if other propagators found reductions? | |
#define | CONSHDLR_DELAYSEPA FALSE |
should separation method be delayed, if other separators found cuts? | |
#define | CONSHDLR_DESC "partial ordering constraint handler" |
#define | CONSHDLR_EAGERFREQ 100 |
frequency for using all instead of only the useful constraints in separation, propagation and enforcement, -1 for no eager evaluations, 0 for first only | |
#define | CONSHDLR_ENFOPRIORITY -200 |
priority of the constraint handler for constraint enforcing | |
#define | CONSHDLR_NAME "partialordering" |
#define | CONSHDLR_NEEDSCONS TRUE |
should the constraint handler be skipped, if no constraints are available? | |
#define | CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP |
#define | CONSHDLR_PROPFREQ 1 |
frequency for propagating domains; zero means only preprocessing propagation | |
#define | CONSHDLR_SEPAFREQ 10 |
frequency for separating cuts; zero means to separate only in the root node | |
#define | CONSHDLR_SEPAPRIORITY 100 |
priority of the constraint handler for separation | |
#define | consRespropPartialOrdering NULL |
propagation conflict resolving method of constraint handler | |
Functions | |
static SCIP_RETCODE | PartialOrderingSeparate (SCIP *scip, SCIP_CONSHDLR *conshdlr, int n, SCIP_VAR ***vars, SCIP_SOL *sol, int *nGen, SCIP_Bool *cutoff) |
separate symmetry equations and triangle inequalities More... | |
static | SCIP_DECL_CONSCHECK (consCheckPartialOrdering) |
feasibility check method of constraint handler for integral solutions | |
static | SCIP_DECL_CONSCOPY (consCopyPartialOrdering) |
constraint copying method of constraint handler | |
static | SCIP_DECL_CONSDELETE (consDeletePartialOrdering) |
frees specific constraint data | |
static | SCIP_DECL_CONSENFOLP (consEnfolpPartialOrdering) |
constraint enforcing method of constraint handler for LP solutions | |
static | SCIP_DECL_CONSENFOPS (consEnfopsPartialOrdering) |
constraint enforcing method of constraint handler for pseudo solutions | |
static | SCIP_DECL_CONSHDLRCOPY (conshdlrCopyPartialOrdering) |
copy method for constraint handler plugins (called when SCIP copies plugins) | |
static | SCIP_DECL_CONSINITLP (consInitlpPartialOrdering) |
LP initialization method of constraint handler. | |
static | SCIP_DECL_CONSLOCK (consLockPartialOrdering) |
variable rounding lock method of constraint handler | |
static | SCIP_DECL_CONSPRINT (consPrintPartialOrdering) |
constraint display method of constraint handler | |
static | SCIP_DECL_CONSPROP (consPropPartialOrdering) |
domain propagation method of constraint handler | |
static | SCIP_DECL_CONSSEPALP (consSepalpPartialOrdering) |
separation method of constraint handler for LP solutions | |
static | SCIP_DECL_CONSSEPASOL (consSepasolPartialOrdering) |
separation method of constraint handler for arbitrary primal solutions | |
static | SCIP_DECL_CONSTRANS (consTransPartialOrdering) |
transforms constraint data into data belonging to the transformed problem | |
SCIP_RETCODE | SCIPcreateConsBasicPartialOrdering (SCIP *scip, SCIP_CONS **cons, const char *name, int n, SCIP_VAR ***vars, ParentSetData *psd, SCIP_Bool minimal) |
creates and captures a partial ordering constraint with all its constraint flags set to their default values More... | |
SCIP_RETCODE | SCIPcreateConsPartialOrdering (SCIP *scip, SCIP_CONS **cons, const char *name, int n, SCIP_VAR ***vars, ParentSetData *psd, SCIP_Bool minimal, 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 a partial ordering constraint More... | |
SCIP_RETCODE | SCIPincludeConshdlrPartialOrdering (SCIP *scip) |
creates the handler for partial ordering constraints and includes it in SCIP More... | |
example constraint handler for partial ordering constraints
We handle the following system of partial constraints:
The partial order must be consistent with the arrow variables which are also in the constraint If minimal=TRUE, the partial order must be the minimal one consistent with the arrows (ie the ancestor relation)
|
static |
separate symmetry equations and triangle inequalities
scip | SCIP pointer |
conshdlr | constraint handler |
n | number of elements |
vars | n x n matrix of variables |
sol | solution to be separated |
nGen | output: pointer to store number of added rows |
cutoff | output: pointer to store whether we detected a cutoff |
References SCIP_DECL_CONSHDLRCOPY().
SCIP_RETCODE SCIPcreateConsBasicPartialOrdering | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | n, | ||
SCIP_VAR *** | vars, | ||
ParentSetData * | psd, | ||
SCIP_Bool | minimal | ||
) |
creates and captures a partial ordering constraint with all its constraint flags set to their default values
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
n | number of elements |
vars | n x n matrix of binary variables |
psd | contains arrow and parent set variables |
minimal | whether the partial order must minimal while being consistent with arrows |
References SCIPcreateConsPartialOrdering().
SCIP_RETCODE SCIPcreateConsPartialOrdering | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | n, | ||
SCIP_VAR *** | vars, | ||
ParentSetData * | psd, | ||
SCIP_Bool | minimal, | ||
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 a partial ordering constraint
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
n | number of elements |
vars | n x n matrix of binary variables |
psd | contains arrow and parent set variables |
minimal | whether the partial order must minimal while being consistent with arrows |
initial | should the LP relaxation of constraint be in the initial LP? |
separate | should the constraint be separated during LP processing? |
enforce | should the constraint be enforced during node processing? |
check | should the constraint be checked for feasibility? |
propagate | should the constraint be propagated during node processing? |
local | is constraint only valid locally? |
modifiable | is constraint modifiable (subject to column generation)? |
dynamic | is constraint subject to aging? |
removable | should the relaxation be removed from the LP due to aging or cleanup? |
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? |
Referenced by addAncestorVariables(), and SCIPcreateConsBasicPartialOrdering().
SCIP_RETCODE SCIPincludeConshdlrPartialOrdering | ( | SCIP * | scip | ) |
creates the handler for partial ordering constraints and includes it in SCIP
scip | SCIP data structure |
Referenced by BN_includePlugins().