GOBNILP
f164d83
|
constraint handler for vanilla constraints More...
#include <assert.h>
#include "cons_vanilla.h"
#include "utils.h"
#include <string.h>
#include "parent_set_data.h"
Macros | |
#define | CONSHDLR_CHECKPRIORITY 0 |
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 "constraint handler template" |
#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 0 |
priority of the constraint handler for constraint enforcing | |
#define | CONSHDLR_MAXPREROUNDS -1 |
maximal number of presolving rounds the constraint handler participates in (-1: no limit) | |
#define | CONSHDLR_NAME "vanilla" |
#define | CONSHDLR_NEEDSCONS TRUE |
should the constraint handler be skipped, if no constraints are available? | |
#define | CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_MEDIUM |
presolving timing of the constraint handler (fast, medium, or exhaustive) | |
#define | CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP |
propagation timing mask of the constraint handler | |
#define | CONSHDLR_PROPFREQ 1 |
frequency for propagating domains; zero means only preprocessing propagation | |
#define | CONSHDLR_SEPAFREQ -1 |
frequency for separating cuts; zero means to separate only in the root node | |
#define | CONSHDLR_SEPAPRIORITY 0 |
priority of the constraint handler for separation | |
Functions | |
static SCIP_Bool | arrow_preferred (ParentSetData *psd, SCIP_Bool ***store, int child, int parent) |
Returns true if adding parent to any parent set for child increases the score. More... | |
static SCIP_RETCODE | createConsData (SCIP *scip, SCIP_CONSDATA **consdata, ParentSetData *psd, SCIP_VAR ***ancestorvars) |
Creates the data for a constraint. More... | |
static | SCIP_DECL_CONSCHECK (consCheckVanilla) |
feasibility check method of constraint handler for integral solutions | |
static | SCIP_DECL_CONSDELETE (consDeleteVanilla) |
frees specific constraint data | |
static | SCIP_DECL_CONSENFOLP (consEnfolpVanilla) |
constraint enforcing method of constraint handler for LP solutions | |
static | SCIP_DECL_CONSENFOPS (consEnfopsVanilla) |
constraint enforcing method of constraint handler for pseudo solutions | |
static | SCIP_DECL_CONSINITLP (consInitlpVanilla) |
LP initialization method of constraint handler (called before the initial LP relaxation at a node is solved) | |
static | SCIP_DECL_CONSLOCK (consLockVanilla) |
variable rounding lock method of constraint handler | |
static | SCIP_DECL_CONSPRESOL (consPresolVanilla) |
presolving method of constraint handler | |
static | SCIP_DECL_CONSPROP (consPropVanilla) |
domain propagation method of constraint handler | |
SCIP_RETCODE | SCIPcreateConsBasicVanilla (SCIP *scip, SCIP_CONS **cons, const char *name, ParentSetData *psd, SCIP_VAR ***ancestorvars) |
creates and captures a vanilla constraint with all its constraint flags set to their default values More... | |
SCIP_RETCODE | SCIPcreateConsVanilla (SCIP *scip, SCIP_CONS **cons, const char *name, ParentSetData *psd, SCIP_VAR ***ancestorvars, 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 vanilla constraint More... | |
SCIP_RETCODE | SCIPincludeConshdlrVanilla (SCIP *scip) |
creates the handler for vanilla constraints and includes it in SCIP More... | |
constraint handler for vanilla constraints
|
static |
Returns true if adding parent to any parent set for child increases the score.
psd | parent sets data structure |
child | child BN variable |
parent | parent BN variable |
References createConsData(), ParentSetData::nParents, ParentSetData::nParentSets, and ParentSetData::ParentSets.
|
static |
Creates the data for a constraint.
scip | The SCIP instance to which the constraaint belongs. |
consdata | The location to store the new constraint data. |
psd | The parent set data on which the constraint is based. |
References ParentSetData::n, ParentSetData::nParents, ParentSetData::nParentSets, ParentSetData::ParentSets, PS_copyParentSetData(), and SCIP_DECL_CONSDELETE().
Referenced by arrow_preferred().
SCIP_RETCODE SCIPcreateConsBasicVanilla | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
ParentSetData * | psd, | ||
SCIP_VAR *** | ancestorvars | ||
) |
creates and captures a vanilla 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 |
psd | parent set data |
ancestorvars | ancestor vars (or NULL if not used ) |
References SCIPcreateConsVanilla().
SCIP_RETCODE SCIPcreateConsVanilla | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
ParentSetData * | psd, | ||
SCIP_VAR *** | ancestorvars, | ||
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 vanilla constraint
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
psd | parent set data |
ancestorvars | ancestor vars (or NULL if not used ) |
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. |
Referenced by addAdditionalConstraints(), and SCIPcreateConsBasicVanilla().
SCIP_RETCODE SCIPincludeConshdlrVanilla | ( | SCIP * | scip | ) |
creates the handler for vanilla constraints and includes it in SCIP
scip | SCIP data structure |
Referenced by addAdditionalConstraints().