GOBNILP  f164d83
Macros | Functions
cons_lop.c File Reference

example constraint handler for linear ordering constraints More...

#include "cons_lop.h"
#include <assert.h>
#include <string.h>
Include dependency graph for cons_lop.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   "linear 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   -100
 priority of the constraint handler for constraint enforcing
 
#define CONSHDLR_NAME   "lop"
 
#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
 

Functions

static SCIP_RETCODE LOPseparate (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 (consCheckLOP)
 feasibility check method of constraint handler for integral solutions
 
static SCIP_DECL_CONSCOPY (consCopyLOP)
 constraint copying method of constraint handler
 
static SCIP_DECL_CONSDELETE (consDeleteLOP)
 frees specific constraint data
 
static SCIP_DECL_CONSENFOLP (consEnfolpLOP)
 constraint enforcing method of constraint handler for LP solutions
 
static SCIP_DECL_CONSENFOPS (consEnfopsLOP)
 constraint enforcing method of constraint handler for pseudo solutions
 
static SCIP_DECL_CONSEXIT (consExitLOP)
 deinitialization method of constraint handler (called before transformed problem is freed) More...
 
static SCIP_DECL_CONSHDLRCOPY (conshdlrCopyLOP)
 copy method for constraint handler plugins (called when SCIP copies plugins)
 
static SCIP_DECL_CONSINITLP (consInitlpLOP)
 LP initialization method of constraint handler.
 
static SCIP_DECL_CONSLOCK (consLockLOP)
 variable rounding lock method of constraint handler
 
static SCIP_DECL_CONSPRINT (consPrintLOP)
 constraint display method of constraint handler
 
static SCIP_DECL_CONSPROP (consPropLOP)
 domain propagation method of constraint handler
 
static SCIP_DECL_CONSRESPROP (consRespropLOP)
 propagation conflict resolving method of constraint handler
 
static SCIP_DECL_CONSSEPALP (consSepalpLOP)
 separation method of constraint handler for LP solutions
 
static SCIP_DECL_CONSSEPASOL (consSepasolLOP)
 separation method of constraint handler for arbitrary primal solutions
 
static SCIP_DECL_CONSTRANS (consTransLOP)
 transforms constraint data into data belonging to the transformed problem
 
SCIP_RETCODE SCIPcreateConsLOP (SCIP *scip, SCIP_CONS **cons, const char *name, int n, SCIP_VAR ***vars, 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 linear ordering constraint More...
 
SCIP_RETCODE SCIPincludeConshdlrLOP (SCIP *scip)
 creates the handler for linear ordering constraints and includes it in SCIP More...
 

Detailed Description

example constraint handler for linear ordering constraints

Author
Marc Pfetsch

We handle the following system of linear constraints:

Function Documentation

◆ LOPseparate()

static SCIP_RETCODE LOPseparate ( 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:

◆ SCIP_DECL_CONSEXIT()

static SCIP_DECL_CONSEXIT ( consExitLOP  )
static

deinitialization method of constraint handler (called before transformed problem is freed)

We output the final linear ordering.

◆ SCIPcreateConsLOP()

SCIP_RETCODE SCIPcreateConsLOP ( SCIP *  scip,
SCIP_CONS **  cons,
const char *  name,
int  n,
SCIP_VAR ***  vars,
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 linear 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
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 addTotalorderVariables().

◆ SCIPincludeConshdlrLOP()

SCIP_RETCODE SCIPincludeConshdlrLOP ( SCIP *  scip)

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

Parameters
scipSCIP data structure

Referenced by BN_includePlugins().