GOBNILP  f164d83
Macros | Functions
cons_partialordering.c File Reference

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>
Include dependency graph for cons_partialordering.c:

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...
 

Detailed Description

example constraint handler for partial ordering constraints

Author
Marc Pfetsch
James Cussens

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)

Function Documentation

◆ PartialOrderingSeparate()

static SCIP_RETCODE PartialOrderingSeparate ( SCIP *  scip,
SCIP_CONSHDLR *  conshdlr,
int  n,
SCIP_VAR ***  vars,
SCIP_SOL *  sol,
int *  nGen,
SCIP_Bool *  cutoff 
)
static

separate symmetry equations and triangle inequalities

Parameters
scipSCIP pointer
conshdlrconstraint handler
nnumber of elements
varsn x n matrix of variables
solsolution to be separated
nGenoutput: pointer to store number of added rows
cutoffoutput: pointer to store whether we detected a cutoff

References SCIP_DECL_CONSHDLRCOPY().

Here is the call graph for this function:

◆ SCIPcreateConsBasicPartialOrdering()

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

Note
the constraint gets captured, hence at one point you have to release it using the method SCIPreleaseCons()
Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nnumber of elements
varsn x n matrix of binary variables
psdcontains arrow and parent set variables
minimalwhether the partial order must minimal while being consistent with arrows

References SCIPcreateConsPartialOrdering().

Here is the call graph for this function:

◆ 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

Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nnumber of elements
varsn x n matrix of binary variables
psdcontains arrow and parent set variables
minimalwhether the partial order must minimal while being consistent with arrows
initialshould the LP relaxation of constraint be in the initial LP?
separateshould the constraint be separated during LP processing?
enforceshould the constraint be enforced during node processing?
checkshould the constraint be checked for feasibility?
propagateshould the constraint be propagated during node processing?
localis constraint only valid locally?
modifiableis constraint modifiable (subject to column generation)?
dynamicis constraint subject to aging?
removableshould the relaxation be removed from the LP due to aging or cleanup?
stickingatnodeshould 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().

◆ SCIPincludeConshdlrPartialOrdering()

SCIP_RETCODE SCIPincludeConshdlrPartialOrdering ( SCIP *  scip)

creates the handler for partial ordering constraints and includes it in SCIP

Parameters
scipSCIP data structure

Referenced by BN_includePlugins().