Scippy

SCIP

Solving Constraint Integer Programs

type_conflict.h File Reference

Detailed Description

type definitions for conflict analysis

Author
Tobias Achterberg

This file defines the interface for conflict handler implemented in C.

Definition in file type_conflict.h.

#include "scip/def.h"
#include "scip/type_scip.h"
#include "scip/type_retcode.h"
#include "scip/type_result.h"
#include "scip/type_tree.h"

Go to the source code of this file.

Macros

#define SCIP_DECL_CONFLICTCOPY(x)   SCIP_RETCODE x (SCIP* scip, SCIP_CONFLICTHDLR* conflicthdlr)
 
#define SCIP_DECL_CONFLICTFREE(x)   SCIP_RETCODE x (SCIP* scip, SCIP_CONFLICTHDLR* conflicthdlr)
 
#define SCIP_DECL_CONFLICTINIT(x)   SCIP_RETCODE x (SCIP* scip, SCIP_CONFLICTHDLR* conflicthdlr)
 
#define SCIP_DECL_CONFLICTEXIT(x)   SCIP_RETCODE x (SCIP* scip, SCIP_CONFLICTHDLR* conflicthdlr)
 
#define SCIP_DECL_CONFLICTINITSOL(x)   SCIP_RETCODE x (SCIP* scip, SCIP_CONFLICTHDLR* conflicthdlr)
 
#define SCIP_DECL_CONFLICTEXITSOL(x)   SCIP_RETCODE x (SCIP* scip, SCIP_CONFLICTHDLR* conflicthdlr)
 
#define SCIP_DECL_CONFLICTEXEC(x)
 

Typedefs

typedef struct SCIP_Conflicthdlr SCIP_CONFLICTHDLR
 
typedef struct SCIP_ConflicthdlrData SCIP_CONFLICTHDLRDATA
 
typedef struct SCIP_ConflictSet SCIP_CONFLICTSET
 
typedef struct SCIP_ProofSet SCIP_PROOFSET
 
typedef struct SCIP_LPBdChgs SCIP_LPBDCHGS
 
typedef struct SCIP_Conflict SCIP_CONFLICT
 
typedef enum SCIP_ConflictType SCIP_CONFTYPE
 
typedef enum SCIP_ConflictPresolStrat SCIP_CONFPRES
 

Enumerations

enum  SCIP_ConflictType {
  SCIP_CONFTYPE_UNKNOWN = 0,
  SCIP_CONFTYPE_PROPAGATION = 1,
  SCIP_CONFTYPE_INFEASLP = 2,
  SCIP_CONFTYPE_BNDEXCEEDING = 3,
  SCIP_CONFTYPE_ALTINFPROOF = 4,
  SCIP_CONFTYPE_ALTBNDPROOF = 5
}
 
enum  SCIP_ConflictPresolStrat {
  SCIP_CONFPRES_DISABLED = 0,
  SCIP_CONFPRES_ONLYLOCAL = 1,
  SCIP_CONFPRES_ONLYGLOBAL = 2,
  SCIP_CONFPRES_BOTH = 3
}
 

Macro Definition Documentation

◆ SCIP_DECL_CONFLICTCOPY

#define SCIP_DECL_CONFLICTCOPY (   x)    SCIP_RETCODE x (SCIP* scip, SCIP_CONFLICTHDLR* conflicthdlr)

copy method for conflict handler plugins (called when SCIP copies plugins)

input:

  • scip : SCIP main data structure
  • conflicthdlr : the conflict handler itself

Definition at line 87 of file type_conflict.h.

◆ SCIP_DECL_CONFLICTFREE

#define SCIP_DECL_CONFLICTFREE (   x)    SCIP_RETCODE x (SCIP* scip, SCIP_CONFLICTHDLR* conflicthdlr)

destructor of conflict handler to free conflict handler data (called when SCIP is exiting)

input:

  • scip : SCIP main data structure
  • conflicthdlr : the conflict handler itself

Definition at line 95 of file type_conflict.h.

◆ SCIP_DECL_CONFLICTINIT

#define SCIP_DECL_CONFLICTINIT (   x)    SCIP_RETCODE x (SCIP* scip, SCIP_CONFLICTHDLR* conflicthdlr)

initialization method of conflict handler (called after problem was transformed)

input:

  • scip : SCIP main data structure
  • conflicthdlr : the conflict handler itself

Definition at line 103 of file type_conflict.h.

◆ SCIP_DECL_CONFLICTEXIT

#define SCIP_DECL_CONFLICTEXIT (   x)    SCIP_RETCODE x (SCIP* scip, SCIP_CONFLICTHDLR* conflicthdlr)

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

input:

  • scip : SCIP main data structure
  • conflicthdlr : the conflict handler itself

Definition at line 111 of file type_conflict.h.

◆ SCIP_DECL_CONFLICTINITSOL

#define SCIP_DECL_CONFLICTINITSOL (   x)    SCIP_RETCODE x (SCIP* scip, SCIP_CONFLICTHDLR* conflicthdlr)

solving process initialization method of conflict handler (called when branch and bound process is about to begin)

This method is called when the presolving was finished and the branch and bound process is about to begin. The conflict handler may use this call to initialize its branch and bound specific data.

input:

  • scip : SCIP main data structure
  • conflicthdlr : the conflict handler itself

Definition at line 122 of file type_conflict.h.

◆ SCIP_DECL_CONFLICTEXITSOL

#define SCIP_DECL_CONFLICTEXITSOL (   x)    SCIP_RETCODE x (SCIP* scip, SCIP_CONFLICTHDLR* conflicthdlr)

solving process deinitialization method of conflict handler (called before branch and bound process data is freed)

This method is called before the branch and bound process is freed. The conflict handler should use this call to clean up its branch and bound data.

input:

  • scip : SCIP main data structure
  • conflicthdlr : the conflict handler itself

Definition at line 133 of file type_conflict.h.

◆ SCIP_DECL_CONFLICTEXEC

#define SCIP_DECL_CONFLICTEXEC (   x)
Value:
SCIP_RETCODE x (SCIP* scip, SCIP_CONFLICTHDLR* conflicthdlr, SCIP_NODE* node, \
SCIP_NODE* validnode, SCIP_BDCHGINFO** bdchginfos, SCIP_Real* relaxedbds, int nbdchginfos, SCIP_CONFTYPE conftype, \
SCIP_Bool cutoffinvolved, SCIP_Bool separate, SCIP_Bool local, SCIP_Bool dynamic, SCIP_Bool removable, \
SCIP_Bool resolved, SCIP_RESULT* result)
enum SCIP_Result SCIP_RESULT
Definition: type_result.h:61
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:63
SCIP_VAR ** x
Definition: circlepacking.c:63
#define SCIP_Bool
Definition: def.h:91
#define SCIP_Real
Definition: def.h:173
enum SCIP_ConflictType SCIP_CONFTYPE
Definition: type_conflict.h:66

conflict processing method of conflict handler (called when conflict was found)

This method is called, when the conflict analysis found a conflict on variable bounds. The conflict handler may update its data accordingly and create a constraint out of the conflict set. If the parameter "resolved" is set, the conflict handler should not create a constraint, because a different conflict handler with higher priority already created a constraint. The bounds in the conflict set lead to a conflict (i.e. an infeasibility) when all enforced at the same time. Thus, a feasible conflict constraint must demand that at least one of the variables in the conflict set violates its corresponding bound, i.e., fulfills the negation of the bound change in the conflict set. For continuous variables, the negation has to be defined in a relaxed way: if, e.g., the bound in the conflict set is "x <= u", the negation to be used has to be "x >= u", and not "x > u". The given "bdchginfos" array representing the conflict set is only a reference to an internal buffer, that may be modified at any time by SCIP. The user must copy the needed information from the "bdchginfos" array to own data structures, if (s)he wants to use the information later. (S)he should not keep a pointer to the array or pointers to the single bdchginfos in the array, because these may get invalid afterwards.

input:

  • scip : SCIP main data structure
  • conflicthdlr : the conflict handler itself
  • node : node to add resulting conflict constraint to (with SCIPaddConsNode())
  • validnode : node at which the conflict constraint is valid (should be passed to SCIPaddConsNode())
  • bdchginfos : array with bound changes that lead to a conflict
  • relaxedbds : array with relaxed bounds which are efficient to create a valid conflict
  • nbdchginfos : number of bound changes in the conflict set -.primalbound : the current primal bound, or -infininity if the conflict arises from an infeasible LP
  • separate : should the conflict constraint be separated?
  • local : is the conflict set only valid locally, i.e., should the constraint be created as local constraint?
  • dynamic : should the conflict constraint be made subject to aging?
  • removable : should the conflict's relaxation be made subject to LP aging and cleanup?
  • resolved : is the conflict set already used to create a constraint?
  • result : pointer to store the result of the conflict processing call

possible return values for *result:

  • SCIP_CONSADDED : the conflict handler created a constraint out of the conflict set
  • SCIP_DIDNOTFIND : the conflict handler could not create a constraint out of the conflict set
  • SCIP_DIDNOTRUN : the conflict handler was skipped

Definition at line 173 of file type_conflict.h.

Typedef Documentation

◆ SCIP_CONFLICTHDLR

conflict handler to process conflict sets

Definition at line 49 of file type_conflict.h.

◆ SCIP_CONFLICTHDLRDATA

typedef struct SCIP_ConflicthdlrData SCIP_CONFLICTHDLRDATA

conflict handler data

Definition at line 50 of file type_conflict.h.

◆ SCIP_CONFLICTSET

set of conflicting bound changes

Definition at line 51 of file type_conflict.h.

◆ SCIP_PROOFSET

typedef struct SCIP_ProofSet SCIP_PROOFSET

set of variables and coefficients describing a proof-constraint of type a^Tx <= rhs

Definition at line 52 of file type_conflict.h.

◆ SCIP_LPBDCHGS

typedef struct SCIP_LPBdChgs SCIP_LPBDCHGS

set of LP bound changes

Definition at line 53 of file type_conflict.h.

◆ SCIP_CONFLICT

typedef struct SCIP_Conflict SCIP_CONFLICT

conflict analysis data structure

Definition at line 54 of file type_conflict.h.

◆ SCIP_CONFTYPE

Definition at line 66 of file type_conflict.h.

◆ SCIP_CONFPRES

Definition at line 79 of file type_conflict.h.

Enumeration Type Documentation

◆ SCIP_ConflictType

types of conflicts

Enumerator
SCIP_CONFTYPE_UNKNOWN 

unknown type

SCIP_CONFTYPE_PROPAGATION 

conflict results from propagation

SCIP_CONFTYPE_INFEASLP 

conflict results from an infeasible LP relaxation

SCIP_CONFTYPE_BNDEXCEEDING 

conflict results from a boundexceeding LP relaxation

SCIP_CONFTYPE_ALTINFPROOF 

alternative proof of an infeasible LP relaxation

SCIP_CONFTYPE_ALTBNDPROOF 

alternative proof of a boundexceeding LP relaxation

Definition at line 57 of file type_conflict.h.

◆ SCIP_ConflictPresolStrat

dualray presolving strategy

Enumerator
SCIP_CONFPRES_DISABLED 

no presolving

SCIP_CONFPRES_ONLYLOCAL 

keep variables contributing with its local bound

SCIP_CONFPRES_ONLYGLOBAL 

keep variables contributing with its global bound

SCIP_CONFPRES_BOTH 

keep variables contributing with its global bound and add a few variables contributing with its local bound such that the constraint is not globally redundant

Definition at line 69 of file type_conflict.h.