Scippy

SCIP

Solving Constraint Integer Programs

cons_samediff.h File Reference

Detailed Description

Constraint handler stores the local branching decision data.

Author
Timo Berthold
Stefan Heinz

This constraint handler is used to store the branching decision of the Ryan/Foster branching rule which is implemented in branch_ryanfoster.c.

Definition in file cons_samediff.h.

#include "scip/scip.h"

Go to the source code of this file.

Typedefs

typedef enum ConsType CONSTYPE
 

Enumerations

enum  ConsType { DIFFER = 0, SAME = 1 }
 

Functions

SCIP_RETCODE SCIPincludeConshdlrSamediff (SCIP *scip)
 
SCIP_RETCODE SCIPcreateConsSamediff (SCIP *scip, SCIP_CONS **cons, const char *name, int itemid1, int itemid2, CONSTYPE type, SCIP_NODE *node, SCIP_Bool local)
 
int SCIPgetItemid1Samediff (SCIP *scip, SCIP_CONS *cons)
 
int SCIPgetItemid2Samediff (SCIP *scip, SCIP_CONS *cons)
 
CONSTYPE SCIPgetTypeSamediff (SCIP *scip, SCIP_CONS *cons)
 

Typedef Documentation

typedef enum ConsType CONSTYPE

Definition at line 40 of file cons_samediff.h.

Enumeration Type Documentation

enum ConsType
Enumerator
DIFFER 

constraint representing the branching decision differ(i,j)

SAME 

constraint representing the branching decision same(i,j)

Definition at line 35 of file cons_samediff.h.

Function Documentation

SCIP_RETCODE SCIPcreateConsSamediff ( SCIP *  scip,
SCIP_CONS **  cons,
const char *  name,
int  itemid1,
int  itemid2,
CONSTYPE  type,
SCIP_NODE *  node,
SCIP_Bool  local 
)

creates and captures a samediff constraint

Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
itemid1item id one
itemid2item id two
typestores whether the items have to be in the SAME or DIFFER packing
nodethe node in the B&B-tree at which the cons is sticking
localis constraint only valid locally?

Definition at line 552 of file cons_samediff.c.

References consdataCreate(), consdataPrint(), CONSHDLR_NAME, SCIP_ConsData::itemid1, SCIP_ConsData::itemid2, SCIP_ConsData::node, SCIPgetItemid1Samediff(), and SCIP_ConsData::type.

Referenced by SCIP_DECL_BRANCHEXECLP(), and SCIPincludeConshdlrSamediff().

int SCIPgetItemid1Samediff ( SCIP *  scip,
SCIP_CONS *  cons 
)

returns item id one

Parameters
scipSCIP data structure
conssamediff constraint

Definition at line 588 of file cons_samediff.c.

References SCIPgetItemid2Samediff().

Referenced by addBranchingDecisionConss(), and SCIPcreateConsSamediff().

int SCIPgetItemid2Samediff ( SCIP *  scip,
SCIP_CONS *  cons 
)

returns item id two

Parameters
scipSCIP data structure
conssamediff constraint

Definition at line 604 of file cons_samediff.c.

References SCIPgetTypeSamediff().

Referenced by addBranchingDecisionConss(), and SCIPgetItemid1Samediff().

CONSTYPE SCIPgetTypeSamediff ( SCIP *  scip,
SCIP_CONS *  cons 
)

return constraint type SAME or DIFFER

Parameters
scipSCIP data structure
conssamediff constraint

Definition at line 620 of file cons_samediff.c.

Referenced by addBranchingDecisionConss(), and SCIPgetItemid2Samediff().

SCIP_RETCODE SCIPincludeConshdlrSamediff ( SCIP *  scip)

creates the handler for element constraints and includes it in SCIP

creates the handler for samediff constraints and includes it in SCIP

Parameters
scipSCIP data structure

Definition at line 526 of file cons_samediff.c.

References consCheckSamediff, consEnfolpSamediff, consEnfopsSamediff, CONSHDLR_CHECKPRIORITY, CONSHDLR_DELAYPROP, CONSHDLR_DESC, CONSHDLR_EAGERFREQ, CONSHDLR_ENFOPRIORITY, CONSHDLR_NAME, CONSHDLR_NEEDSCONS, CONSHDLR_PROP_TIMING, CONSHDLR_PROPFREQ, consLockSamediff, and SCIPcreateConsSamediff().

Referenced by runShell(), and SCIP_DECL_CONSPRINT().