Scippy

SCIP

Solving Constraint Integer Programs

scip::ObjConshdlr Class Referenceabstract

Detailed Description

C++ wrapper for constraint handlers.

This class defines the interface for constraint handlers implemented in C++. Note that there are pure virtual functions (these have to be implemented). These functions are: scip_trans(), scip_enfolp(), scip_enforelax(), scip_enfops(), scip_check(), and scip_lock().

Definition at line 57 of file objconshdlr.h.

C++ wrapper for constraint handlers. More...

#include <objconshdlr.h>

Public Member Functions

 ObjConshdlr (SCIP *scip, const char *name, const char *desc, int sepapriority, int enfopriority, int checkpriority, int sepafreq, int propfreq, int eagerfreq, int maxprerounds, SCIP_Bool delaysepa, SCIP_Bool delayprop, SCIP_Bool needscons, SCIP_PROPTIMING proptiming, SCIP_PRESOLTIMING presoltiming)
 
 ObjConshdlr (const ObjConshdlr &o)
 
 ObjConshdlr (ObjConshdlr &&o)
 
virtual ~ObjConshdlr ()
 
ObjConshdlroperator= (const ObjConshdlr &o)=delete
 
ObjConshdlroperator= (ObjConshdlr &&o)=delete
 
virtual SCIP_DECL_CONSFREE (scip_free)
 
virtual SCIP_DECL_CONSINIT (scip_init)
 
virtual SCIP_DECL_CONSEXIT (scip_exit)
 
virtual SCIP_DECL_CONSINITPRE (scip_initpre)
 
virtual SCIP_DECL_CONSEXITPRE (scip_exitpre)
 
virtual SCIP_DECL_CONSINITSOL (scip_initsol)
 
virtual SCIP_DECL_CONSEXITSOL (scip_exitsol)
 
virtual SCIP_DECL_CONSDELETE (scip_delete)
 
virtual SCIP_DECL_CONSTRANS (scip_trans)=0
 
virtual SCIP_DECL_CONSINITLP (scip_initlp)
 
virtual SCIP_DECL_CONSSEPALP (scip_sepalp)
 
virtual SCIP_DECL_CONSSEPASOL (scip_sepasol)
 
virtual SCIP_DECL_CONSENFOLP (scip_enfolp)=0
 
virtual SCIP_DECL_CONSENFORELAX (scip_enforelax)
 
virtual SCIP_DECL_CONSENFOPS (scip_enfops)=0
 
virtual SCIP_DECL_CONSCHECK (scip_check)=0
 
virtual SCIP_DECL_CONSPROP (scip_prop)
 
virtual SCIP_DECL_CONSPRESOL (scip_presol)
 
virtual SCIP_DECL_CONSRESPROP (scip_resprop)
 
virtual SCIP_DECL_CONSLOCK (scip_lock)=0
 
virtual SCIP_DECL_CONSACTIVE (scip_active)
 
virtual SCIP_DECL_CONSDEACTIVE (scip_deactive)
 
virtual SCIP_DECL_CONSENABLE (scip_enable)
 
virtual SCIP_DECL_CONSDISABLE (scip_disable)
 
virtual SCIP_DECL_CONSDELVARS (scip_delvars)
 
virtual SCIP_DECL_CONSPRINT (scip_print)
 
virtual SCIP_DECL_CONSCOPY (scip_copy)
 
virtual SCIP_DECL_CONSPARSE (scip_parse)
 
virtual SCIP_DECL_CONSGETVARS (scip_getvars)
 
virtual SCIP_DECL_CONSGETNVARS (scip_getnvars)
 
virtual SCIP_DECL_CONSGETDIVEBDCHGS (scip_getdivebdchgs)
 
- Public Member Functions inherited from scip::ObjProbCloneable
virtual ~ObjProbCloneable ()
 
ObjProbCloneableoperator= (const ObjProbCloneable &o)=delete
 
ObjProbCloneableoperator= (ObjProbCloneable &&o)=delete
 
virtual SCIP_DECL_OBJPROBCLONE (ObjProbCloneable *clone)
 
virtual SCIP_DECL_OBJPROBISCLONEABLE (iscloneable)
 

Data Fields

SCIPscip_
 
char * scip_name_
 
char * scip_desc_
 
const int scip_sepapriority_
 
const int scip_enfopriority_
 
const int scip_checkpriority_
 
const int scip_sepafreq_
 
const int scip_propfreq_
 
const int scip_eagerfreq_
 
const int scip_maxprerounds_
 
const SCIP_Bool scip_delaysepa_
 
const SCIP_Bool scip_delayprop_
 
const SCIP_Bool scip_needscons_
 
const SCIP_PROPTIMING scip_proptiming_
 
const SCIP_PRESOLTIMING scip_presoltiming_
 

Constructor & Destructor Documentation

◆ ObjConshdlr() [1/3]

scip::ObjConshdlr::ObjConshdlr ( SCIP scip,
const char *  name,
const char *  desc,
int  sepapriority,
int  enfopriority,
int  checkpriority,
int  sepafreq,
int  propfreq,
int  eagerfreq,
int  maxprerounds,
SCIP_Bool  delaysepa,
SCIP_Bool  delayprop,
SCIP_Bool  needscons,
SCIP_PROPTIMING  proptiming,
SCIP_PRESOLTIMING  presoltiming 
)
inline

default constructor

Parameters
scipSCIP data structure
namename of constraint handler
descdescription of constraint handler
sepaprioritypriority of the constraint handler for separation
enfoprioritypriority of the constraint handler for constraint enforcing
checkprioritypriority of the constraint handler for checking infeasibility (and propagation)
sepafreqfrequency for separating cuts; zero means to separate only in the root node
propfreqfrequency for propagating domains; zero means only preprocessing propagation
eagerfreqfrequency for using all instead of only the useful constraints in separation, propagation and enforcement, -1 for no eager evaluations, 0 for first only
maxpreroundsmaximal number of presolving rounds the constraint handler participates in (-1: no limit)
delaysepashould separation method be delayed, if other separators found cuts?
delaypropshould propagation method be delayed, if other propagators found reductions?
needsconsshould the constraint handler be skipped, if no constraints are available?
proptimingpositions in the node solving loop where propagation method of constraint handlers should be executed
presoltimingtiming mask of the constraint handler's presolving method

Definition at line 108 of file objconshdlr.h.

References SCIP_CALL_ABORT, and SCIPduplicateMemoryArray.

◆ ObjConshdlr() [2/3]

scip::ObjConshdlr::ObjConshdlr ( const ObjConshdlr o)
inline

copy constructor

Definition at line 148 of file objconshdlr.h.

◆ ObjConshdlr() [3/3]

scip::ObjConshdlr::ObjConshdlr ( ObjConshdlr &&  o)
inline

move constructor

Definition at line 156 of file objconshdlr.h.

◆ ~ObjConshdlr()

virtual scip::ObjConshdlr::~ObjConshdlr ( )
inlinevirtual

destructor

Definition at line 178 of file objconshdlr.h.

References operator=(), and SCIPfreeMemoryArray.

Member Function Documentation

◆ operator=() [1/2]

ObjConshdlr& scip::ObjConshdlr::operator= ( const ObjConshdlr o)
delete

assignment of polymorphic classes causes slicing and is therefore disabled.

Referenced by ~ObjConshdlr().

◆ operator=() [2/2]

ObjConshdlr& scip::ObjConshdlr::operator= ( ObjConshdlr &&  o)
delete

assignment of polymorphic classes causes slicing and is therefore disabled.

◆ SCIP_DECL_CONSFREE()

virtual scip::ObjConshdlr::SCIP_DECL_CONSFREE ( scip_free  )
inlinevirtual

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

See also
SCIP_DECL_CONSFREE(x) in type_cons.h

Definition at line 196 of file objconshdlr.h.

References SCIP_OKAY.

◆ SCIP_DECL_CONSINIT()

virtual scip::ObjConshdlr::SCIP_DECL_CONSINIT ( scip_init  )
inlinevirtual

initialization method of constraint handler (called after problem has been transformed)

See also
SCIP_DECL_CONSINIT(x) in type_cons.h

Definition at line 205 of file objconshdlr.h.

References SCIP_OKAY.

◆ SCIP_DECL_CONSEXIT()

virtual scip::ObjConshdlr::SCIP_DECL_CONSEXIT ( scip_exit  )
inlinevirtual

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

See also
SCIP_DECL_CONSEXIT(x) in type_cons.h

Definition at line 214 of file objconshdlr.h.

References SCIP_OKAY.

◆ SCIP_DECL_CONSINITPRE()

virtual scip::ObjConshdlr::SCIP_DECL_CONSINITPRE ( scip_initpre  )
inlinevirtual

presolving initialization method of constraint handler (called when presolving is about to begin)

See also
SCIP_DECL_CONSINITPRE(x) in type_cons.h

Definition at line 223 of file objconshdlr.h.

References SCIP_OKAY.

◆ SCIP_DECL_CONSEXITPRE()

virtual scip::ObjConshdlr::SCIP_DECL_CONSEXITPRE ( scip_exitpre  )
inlinevirtual

presolving deinitialization method of constraint handler (called after presolving has been finished)

See also
SCIP_DECL_CONSEXITPRE(x) in type_cons.h

Definition at line 232 of file objconshdlr.h.

References SCIP_OKAY.

◆ SCIP_DECL_CONSINITSOL()

virtual scip::ObjConshdlr::SCIP_DECL_CONSINITSOL ( scip_initsol  )
inlinevirtual

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

See also
SCIP_DECL_CONSINITSOL(x) in type_cons.h

Definition at line 241 of file objconshdlr.h.

References SCIP_OKAY.

◆ SCIP_DECL_CONSEXITSOL()

virtual scip::ObjConshdlr::SCIP_DECL_CONSEXITSOL ( scip_exitsol  )
inlinevirtual

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

See also
SCIP_DECL_CONSEXITSOL(x) in type_cons.h

Definition at line 250 of file objconshdlr.h.

References SCIP_OKAY.

◆ SCIP_DECL_CONSDELETE()

virtual scip::ObjConshdlr::SCIP_DECL_CONSDELETE ( scip_delete  )
inlinevirtual

frees specific constraint data

See also
SCIP_DECL_CONSDELETE(x) in type_cons.h

Reimplemented in tsp::ConshdlrSubtour.

Definition at line 259 of file objconshdlr.h.

References SCIP_DECL_CONSTRANS(), and SCIP_OKAY.

◆ SCIP_DECL_CONSTRANS()

virtual scip::ObjConshdlr::SCIP_DECL_CONSTRANS ( scip_trans  )
pure virtual

transforms constraint data into data belonging to the transformed problem

See also
SCIP_DECL_CONSTRANS(x) in type_cons.h

Implemented in tsp::ConshdlrSubtour.

Referenced by SCIP_DECL_CONSDELETE().

◆ SCIP_DECL_CONSINITLP()

virtual scip::ObjConshdlr::SCIP_DECL_CONSINITLP ( scip_initlp  )
inlinevirtual

LP initialization method of constraint handler (called before the initial LP relaxation at a node is solved)

See also
SCIP_DECL_CONSINITLP(x) in type_cons.h

Definition at line 274 of file objconshdlr.h.

References SCIP_OKAY.

◆ SCIP_DECL_CONSSEPALP()

virtual scip::ObjConshdlr::SCIP_DECL_CONSSEPALP ( scip_sepalp  )
inlinevirtual

separation method of constraint handler for LP solution

See also
SCIP_DECL_CONSSEPALP(x) in type_cons.h

Reimplemented in tsp::ConshdlrSubtour.

Definition at line 283 of file objconshdlr.h.

References NULL, SCIP_DIDNOTRUN, and SCIP_OKAY.

◆ SCIP_DECL_CONSSEPASOL()

virtual scip::ObjConshdlr::SCIP_DECL_CONSSEPASOL ( scip_sepasol  )
inlinevirtual

separation method of constraint handler for arbitrary primal solution

See also
SCIP_DECL_CONSSEPASOL(x) in type_cons.h

Reimplemented in tsp::ConshdlrSubtour.

Definition at line 294 of file objconshdlr.h.

References NULL, SCIP_DECL_CONSENFOLP(), SCIP_DIDNOTRUN, and SCIP_OKAY.

◆ SCIP_DECL_CONSENFOLP()

virtual scip::ObjConshdlr::SCIP_DECL_CONSENFOLP ( scip_enfolp  )
pure virtual

constraint enforcing method of constraint handler for LP solutions

See also
SCIP_DECL_CONSENFOLP(x) in type_cons.h

Implemented in tsp::ConshdlrSubtour.

Referenced by SCIP_DECL_CONSSEPASOL().

◆ SCIP_DECL_CONSENFORELAX()

virtual scip::ObjConshdlr::SCIP_DECL_CONSENFORELAX ( scip_enforelax  )
inlinevirtual

constraint enforcing method of constraint handler for relaxation solutions

See also
SCIP_DECL_CONSENFORELAX(x) in type_cons.h

Definition at line 311 of file objconshdlr.h.

References NULL, SCIP_DECL_CONSCHECK(), SCIP_DECL_CONSENFOPS(), SCIP_DIDNOTRUN, and SCIP_OKAY.

◆ SCIP_DECL_CONSENFOPS()

virtual scip::ObjConshdlr::SCIP_DECL_CONSENFOPS ( scip_enfops  )
pure virtual

constraint enforcing method of constraint handler for pseudo solutions

See also
SCIP_DECL_CONSENFOPS(x) in type_cons.h

Implemented in tsp::ConshdlrSubtour.

Referenced by SCIP_DECL_CONSENFORELAX().

◆ SCIP_DECL_CONSCHECK()

virtual scip::ObjConshdlr::SCIP_DECL_CONSCHECK ( scip_check  )
pure virtual

feasibility check method of constraint handler for primal solutions

See also
SCIP_DECL_CONSCHECK(x) in type_cons.h

Implemented in tsp::ConshdlrSubtour.

Referenced by SCIP_DECL_CONSENFORELAX().

◆ SCIP_DECL_CONSPROP()

virtual scip::ObjConshdlr::SCIP_DECL_CONSPROP ( scip_prop  )
inlinevirtual

domain propagation method of constraint handler

See also
SCIP_DECL_CONSPROP(x) in type_cons.h

Reimplemented in tsp::ConshdlrSubtour.

Definition at line 334 of file objconshdlr.h.

References NULL, SCIP_DIDNOTRUN, and SCIP_OKAY.

◆ SCIP_DECL_CONSPRESOL()

virtual scip::ObjConshdlr::SCIP_DECL_CONSPRESOL ( scip_presol  )
inlinevirtual

presolving method of constraint handler

See also
SCIP_DECL_CONSPRESOL(x) in type_cons.h

Definition at line 345 of file objconshdlr.h.

References NULL, SCIP_DIDNOTRUN, and SCIP_OKAY.

◆ SCIP_DECL_CONSRESPROP()

virtual scip::ObjConshdlr::SCIP_DECL_CONSRESPROP ( scip_resprop  )
inlinevirtual

propagation conflict resolving method of constraint handler

See also
SCIP_DECL_CONSRESPROP(x) in type_cons.h

Definition at line 356 of file objconshdlr.h.

References NULL, SCIP_DECL_CONSLOCK(), SCIP_DIDNOTFIND, and SCIP_OKAY.

◆ SCIP_DECL_CONSLOCK()

virtual scip::ObjConshdlr::SCIP_DECL_CONSLOCK ( scip_lock  )
pure virtual

variable rounding lock method of constraint handler

See also
SCIP_DECL_CONSLOCK(x) in type_cons.h

Implemented in tsp::ConshdlrSubtour.

Referenced by SCIP_DECL_CONSRESPROP().

◆ SCIP_DECL_CONSACTIVE()

virtual scip::ObjConshdlr::SCIP_DECL_CONSACTIVE ( scip_active  )
inlinevirtual

constraint activation notification method of constraint handler

See also
SCIP_DECL_CONSACTIVE(x) in type_cons.h

Definition at line 373 of file objconshdlr.h.

References SCIP_OKAY.

◆ SCIP_DECL_CONSDEACTIVE()

virtual scip::ObjConshdlr::SCIP_DECL_CONSDEACTIVE ( scip_deactive  )
inlinevirtual

constraint deactivation notification method of constraint handler

See also
SCIP_DECL_CONSDEACTIVE(x) in type_cons.h

Definition at line 382 of file objconshdlr.h.

References SCIP_OKAY.

◆ SCIP_DECL_CONSENABLE()

virtual scip::ObjConshdlr::SCIP_DECL_CONSENABLE ( scip_enable  )
inlinevirtual

constraint enabling notification method of constraint handler

See also
SCIP_DECL_CONSENABLE(x) in type_cons.h

Definition at line 391 of file objconshdlr.h.

References SCIP_OKAY.

◆ SCIP_DECL_CONSDISABLE()

virtual scip::ObjConshdlr::SCIP_DECL_CONSDISABLE ( scip_disable  )
inlinevirtual

constraint disabling notification method of constraint handler

See also
SCIP_DECL_CONSDISABLE(x) in type_cons.h

Definition at line 400 of file objconshdlr.h.

References SCIP_OKAY.

◆ SCIP_DECL_CONSDELVARS()

virtual scip::ObjConshdlr::SCIP_DECL_CONSDELVARS ( scip_delvars  )
inlinevirtual

variable deletion method of constraint handler

See also
SCIP_DECL_CONSDELVARS(x) in type_cons.h

Reimplemented in tsp::ConshdlrSubtour.

Definition at line 409 of file objconshdlr.h.

References SCIP_OKAY.

◆ SCIP_DECL_CONSPRINT()

virtual scip::ObjConshdlr::SCIP_DECL_CONSPRINT ( scip_print  )
inlinevirtual

constraint display method of constraint handler

See also
SCIP_DECL_CONSPRINT(x) in type_cons.h

Reimplemented in tsp::ConshdlrSubtour.

Definition at line 418 of file objconshdlr.h.

References NULL, SCIP_OKAY, and SCIPconshdlrGetName().

◆ SCIP_DECL_CONSCOPY()

virtual scip::ObjConshdlr::SCIP_DECL_CONSCOPY ( scip_copy  )
inlinevirtual

constraint copying method of constraint handler

See also
SCIP_DECL_CONSCOPY(x) in type_cons.h

Reimplemented in tsp::ConshdlrSubtour.

Definition at line 431 of file objconshdlr.h.

References FALSE, and SCIP_OKAY.

◆ SCIP_DECL_CONSPARSE()

virtual scip::ObjConshdlr::SCIP_DECL_CONSPARSE ( scip_parse  )
inlinevirtual

constraint parsing method of constraint handler

See also
SCIP_DECL_CONSPARSE(x) in type_cons.h

Definition at line 441 of file objconshdlr.h.

References SCIP_OKAY.

◆ SCIP_DECL_CONSGETVARS()

virtual scip::ObjConshdlr::SCIP_DECL_CONSGETVARS ( scip_getvars  )
inlinevirtual

constraint method of constraint handler which returns the variables (if possible)

See also
SCIP_DECL_CONSGETVARS(x) in type_cons.h

Definition at line 450 of file objconshdlr.h.

References FALSE, and SCIP_OKAY.

◆ SCIP_DECL_CONSGETNVARS()

virtual scip::ObjConshdlr::SCIP_DECL_CONSGETNVARS ( scip_getnvars  )
inlinevirtual

constraint method of constraint handler which returns the number of variables (if possible)

See also
SCIP_DECL_CONSGETNVARS(x) in type_cons.h

Definition at line 462 of file objconshdlr.h.

References FALSE, and SCIP_OKAY.

◆ SCIP_DECL_CONSGETDIVEBDCHGS()

virtual scip::ObjConshdlr::SCIP_DECL_CONSGETDIVEBDCHGS ( scip_getdivebdchgs  )
inlinevirtual

constraint handler method to suggest dive bound changes during the generic diving algorithm

See also
SCIP_DECL_CONSGETDIVEBDCHGS(x) in type_cons.h

Definition at line 475 of file objconshdlr.h.

References FALSE, SCIP_Bool, SCIP_OKAY, SCIPfindObjConshdlr(), SCIPgetObjConshdlr(), and SCIPincludeObjConshdlr().

Field Documentation

◆ scip_

SCIP* scip::ObjConshdlr::scip_

SCIP data structure

Definition at line 63 of file objconshdlr.h.

Referenced by SCIPincludeObjConshdlr().

◆ scip_name_

char* scip::ObjConshdlr::scip_name_

name of the constraint handler

Definition at line 66 of file objconshdlr.h.

Referenced by SCIPincludeObjConshdlr().

◆ scip_desc_

char* scip::ObjConshdlr::scip_desc_

description of the constraint handler

Definition at line 69 of file objconshdlr.h.

Referenced by SCIPincludeObjConshdlr().

◆ scip_sepapriority_

const int scip::ObjConshdlr::scip_sepapriority_

default separation priority of the constraint handler

Definition at line 72 of file objconshdlr.h.

Referenced by SCIPincludeObjConshdlr().

◆ scip_enfopriority_

const int scip::ObjConshdlr::scip_enfopriority_

default enforcing priority of the constraint handler

Definition at line 75 of file objconshdlr.h.

Referenced by SCIPincludeObjConshdlr().

◆ scip_checkpriority_

const int scip::ObjConshdlr::scip_checkpriority_

default checking priority of the constraint handler

Definition at line 78 of file objconshdlr.h.

Referenced by SCIPincludeObjConshdlr().

◆ scip_sepafreq_

const int scip::ObjConshdlr::scip_sepafreq_

default separation frequency of the constraint handler

Definition at line 81 of file objconshdlr.h.

Referenced by SCIPincludeObjConshdlr().

◆ scip_propfreq_

const int scip::ObjConshdlr::scip_propfreq_

default propagation frequency of the constraint handler

Definition at line 84 of file objconshdlr.h.

Referenced by SCIPincludeObjConshdlr().

◆ scip_eagerfreq_

const int scip::ObjConshdlr::scip_eagerfreq_

default frequency of the constraint handler for eager evaluations in separation, propagation and enforcement

Definition at line 87 of file objconshdlr.h.

Referenced by SCIPincludeObjConshdlr().

◆ scip_maxprerounds_

const int scip::ObjConshdlr::scip_maxprerounds_

maximal number of presolving rounds the constraint handler participates in (-1: no limit)

Definition at line 90 of file objconshdlr.h.

Referenced by SCIPincludeObjConshdlr().

◆ scip_delaysepa_

const SCIP_Bool scip::ObjConshdlr::scip_delaysepa_

should separation method be delayed, if other separators found cuts?

Definition at line 93 of file objconshdlr.h.

Referenced by SCIPincludeObjConshdlr().

◆ scip_delayprop_

const SCIP_Bool scip::ObjConshdlr::scip_delayprop_

should propagation method be delayed, if other propagators found reductions?

Definition at line 96 of file objconshdlr.h.

Referenced by SCIPincludeObjConshdlr().

◆ scip_needscons_

const SCIP_Bool scip::ObjConshdlr::scip_needscons_

should the constraint handler be skipped, if no constraints are available?

Definition at line 99 of file objconshdlr.h.

Referenced by SCIPincludeObjConshdlr().

◆ scip_proptiming_

const SCIP_PROPTIMING scip::ObjConshdlr::scip_proptiming_

positions in the node solving loop where propagation method of constraint handler should be executed timing mask of the constraint handler's presolving method

Definition at line 102 of file objconshdlr.h.

Referenced by SCIPincludeObjConshdlr().

◆ scip_presoltiming_

const SCIP_PRESOLTIMING scip::ObjConshdlr::scip_presoltiming_

Definition at line 105 of file objconshdlr.h.

Referenced by SCIPincludeObjConshdlr().