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().
- Instructions for implementing a constraint handler
- List of available constraint handlers
- Corresponding C interface
Definition at line 56 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 () |
ObjConshdlr & | operator= (const ObjConshdlr &o)=delete |
ObjConshdlr & | operator= (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) |
virtual | SCIP_DECL_CONSGETPERMSYMGRAPH (scip_getpermsymgraph) |
virtual | SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH (scip_getsignedpermsymgraph) |
Public Member Functions inherited from scip::ObjProbCloneable | |
virtual | ~ObjProbCloneable () |
ObjProbCloneable & | operator= (const ObjProbCloneable &o)=delete |
ObjProbCloneable & | operator= (ObjProbCloneable &&o)=delete |
virtual | SCIP_DECL_OBJPROBCLONE (ObjProbCloneable *clone) |
virtual | SCIP_DECL_OBJPROBISCLONEABLE (iscloneable) |
Data Fields | |
SCIP * | scip_ |
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]
|
inline |
default constructor
- Parameters
-
scip SCIP data structure name name of constraint handler desc description of constraint handler sepapriority priority of the constraint handler for separation enfopriority priority of the constraint handler for constraint enforcing checkpriority priority of the constraint handler for checking infeasibility (and propagation) sepafreq frequency for separating cuts; zero means to separate only in the root node propfreq frequency for propagating domains; zero means only preprocessing propagation eagerfreq frequency for using all instead of only the useful constraints in separation, propagation and enforcement, -1 for no eager evaluations, 0 for first only maxprerounds maximal number of presolving rounds the constraint handler participates in (-1: no limit) delaysepa should separation method be delayed, if other separators found cuts? delayprop should propagation method be delayed, if other propagators found reductions? needscons should the constraint handler be skipped, if no constraints are available? proptiming positions in the node solving loop where propagation method of constraint handlers should be executed presoltiming timing mask of the constraint handler's presolving method
Definition at line 107 of file objconshdlr.h.
References SCIP_CALL_ABORT, and SCIPduplicateMemoryArray.
◆ ObjConshdlr() [2/3]
|
inline |
copy constructor
Definition at line 147 of file objconshdlr.h.
◆ ObjConshdlr() [3/3]
|
inline |
move constructor
Definition at line 155 of file objconshdlr.h.
◆ ~ObjConshdlr()
|
inlinevirtual |
destructor
Definition at line 177 of file objconshdlr.h.
References operator=(), and SCIPfreeMemoryArray.
Member Function Documentation
◆ operator=() [1/2]
|
delete |
assignment of polymorphic classes causes slicing and is therefore disabled.
Referenced by ~ObjConshdlr().
◆ operator=() [2/2]
|
delete |
assignment of polymorphic classes causes slicing and is therefore disabled.
◆ SCIP_DECL_CONSFREE()
|
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 195 of file objconshdlr.h.
References SCIP_OKAY.
◆ SCIP_DECL_CONSINIT()
|
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 204 of file objconshdlr.h.
References SCIP_OKAY.
◆ SCIP_DECL_CONSEXIT()
|
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 213 of file objconshdlr.h.
References SCIP_OKAY.
◆ SCIP_DECL_CONSINITPRE()
|
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 222 of file objconshdlr.h.
References SCIP_OKAY.
◆ SCIP_DECL_CONSEXITPRE()
|
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 231 of file objconshdlr.h.
References SCIP_OKAY.
◆ SCIP_DECL_CONSINITSOL()
|
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 240 of file objconshdlr.h.
References SCIP_OKAY.
◆ SCIP_DECL_CONSEXITSOL()
|
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 249 of file objconshdlr.h.
References SCIP_OKAY.
◆ SCIP_DECL_CONSDELETE()
|
inlinevirtual |
frees specific constraint data
- See also
- SCIP_DECL_CONSDELETE(x) in type_cons.h
Reimplemented in tsp::ConshdlrSubtour.
Definition at line 258 of file objconshdlr.h.
References SCIP_DECL_CONSTRANS(), and SCIP_OKAY.
◆ SCIP_DECL_CONSTRANS()
|
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()
|
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 273 of file objconshdlr.h.
References SCIP_OKAY.
◆ SCIP_DECL_CONSSEPALP()
|
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 282 of file objconshdlr.h.
References NULL, SCIP_DIDNOTRUN, and SCIP_OKAY.
◆ SCIP_DECL_CONSSEPASOL()
|
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 293 of file objconshdlr.h.
References NULL, SCIP_DECL_CONSENFOLP(), SCIP_DIDNOTRUN, and SCIP_OKAY.
◆ SCIP_DECL_CONSENFOLP()
|
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()
|
inlinevirtual |
constraint enforcing method of constraint handler for relaxation solutions
- See also
- SCIP_DECL_CONSENFORELAX(x) in type_cons.h
Definition at line 310 of file objconshdlr.h.
References NULL, SCIP_DECL_CONSCHECK(), SCIP_DECL_CONSENFOPS(), SCIP_DIDNOTRUN, and SCIP_OKAY.
◆ SCIP_DECL_CONSENFOPS()
|
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()
|
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()
|
inlinevirtual |
domain propagation method of constraint handler
- See also
- SCIP_DECL_CONSPROP(x) in type_cons.h
Reimplemented in tsp::ConshdlrSubtour.
Definition at line 333 of file objconshdlr.h.
References NULL, SCIP_DIDNOTRUN, and SCIP_OKAY.
◆ SCIP_DECL_CONSPRESOL()
|
inlinevirtual |
presolving method of constraint handler
- See also
- SCIP_DECL_CONSPRESOL(x) in type_cons.h
Definition at line 344 of file objconshdlr.h.
References NULL, SCIP_DIDNOTRUN, and SCIP_OKAY.
◆ SCIP_DECL_CONSRESPROP()
|
inlinevirtual |
propagation conflict resolving method of constraint handler
- See also
- SCIP_DECL_CONSRESPROP(x) in type_cons.h
Definition at line 355 of file objconshdlr.h.
References NULL, SCIP_DECL_CONSLOCK(), SCIP_DIDNOTFIND, and SCIP_OKAY.
◆ SCIP_DECL_CONSLOCK()
|
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()
|
inlinevirtual |
constraint activation notification method of constraint handler
- See also
- SCIP_DECL_CONSACTIVE(x) in type_cons.h
Definition at line 372 of file objconshdlr.h.
References SCIP_OKAY.
◆ SCIP_DECL_CONSDEACTIVE()
|
inlinevirtual |
constraint deactivation notification method of constraint handler
- See also
- SCIP_DECL_CONSDEACTIVE(x) in type_cons.h
Definition at line 381 of file objconshdlr.h.
References SCIP_OKAY.
◆ SCIP_DECL_CONSENABLE()
|
inlinevirtual |
constraint enabling notification method of constraint handler
- See also
- SCIP_DECL_CONSENABLE(x) in type_cons.h
Definition at line 390 of file objconshdlr.h.
References SCIP_OKAY.
◆ SCIP_DECL_CONSDISABLE()
|
inlinevirtual |
constraint disabling notification method of constraint handler
- See also
- SCIP_DECL_CONSDISABLE(x) in type_cons.h
Definition at line 399 of file objconshdlr.h.
References SCIP_OKAY.
◆ SCIP_DECL_CONSDELVARS()
|
inlinevirtual |
variable deletion method of constraint handler
- See also
- SCIP_DECL_CONSDELVARS(x) in type_cons.h
Reimplemented in tsp::ConshdlrSubtour.
Definition at line 408 of file objconshdlr.h.
References SCIP_OKAY.
◆ SCIP_DECL_CONSPRINT()
|
inlinevirtual |
constraint display method of constraint handler
- See also
- SCIP_DECL_CONSPRINT(x) in type_cons.h
Reimplemented in tsp::ConshdlrSubtour.
Definition at line 417 of file objconshdlr.h.
References NULL, SCIP_OKAY, and SCIPconshdlrGetName().
◆ SCIP_DECL_CONSCOPY()
|
inlinevirtual |
constraint copying method of constraint handler
- See also
- SCIP_DECL_CONSCOPY(x) in type_cons.h
Reimplemented in tsp::ConshdlrSubtour.
Definition at line 430 of file objconshdlr.h.
◆ SCIP_DECL_CONSPARSE()
|
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()
|
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.
◆ SCIP_DECL_CONSGETNVARS()
|
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 461 of file objconshdlr.h.
◆ SCIP_DECL_CONSGETDIVEBDCHGS()
|
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 476 of file objconshdlr.h.
◆ SCIP_DECL_CONSGETPERMSYMGRAPH()
|
inlinevirtual |
constraint handler method which returns the permutation symmetry detection graph of a constraint (if possible)
- See also
- SCIP_DECL_CONSGETPERMSYMGRAPH(x) in type_cons.h
Definition at line 487 of file objconshdlr.h.
◆ SCIP_DECL_CONSGETSIGNEDPERMSYMGRAPH()
|
inlinevirtual |
constraint handler method which returns the signed permutation symmetry detection graph of a constraint (if possible)
Definition at line 498 of file objconshdlr.h.
References FALSE, NULL, SCIP_Bool, SCIP_OKAY, SCIPfindObjConshdlr(), SCIPgetObjConshdlr(), and SCIPincludeObjConshdlr().
Field Documentation
◆ scip_
SCIP* scip::ObjConshdlr::scip_ |
SCIP data structure
Definition at line 62 of file objconshdlr.h.
Referenced by SCIPincludeObjConshdlr().
◆ scip_name_
char* scip::ObjConshdlr::scip_name_ |
name of the constraint handler
Definition at line 65 of file objconshdlr.h.
Referenced by SCIPincludeObjConshdlr().
◆ scip_desc_
char* scip::ObjConshdlr::scip_desc_ |
description of the constraint handler
Definition at line 68 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 71 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 74 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 77 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 80 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 83 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 86 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 89 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 92 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 95 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 98 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 101 of file objconshdlr.h.
Referenced by SCIPincludeObjConshdlr().
◆ scip_presoltiming_
const SCIP_PRESOLTIMING scip::ObjConshdlr::scip_presoltiming_ |
Definition at line 104 of file objconshdlr.h.
Referenced by SCIPincludeObjConshdlr().