Scippy

SCIP

Solving Constraint Integer Programs

objconshdlr.h File Reference

Detailed Description

C++ wrapper for constraint handlers.

Author
Tobias Achterberg

Definition in file objconshdlr.h.

#include <cassert>
#include <cstring>
#include "scip/scip.h"
#include "objscip/objprobcloneable.h"

Go to the source code of this file.

Data Structures

class  scip::ObjConshdlr
 C++ wrapper for constraint handlers. More...
 

Namespaces

 scip
 

Functions

SCIP_RETCODE SCIPincludeObjConshdlr (SCIP *scip, scip::ObjConshdlr *objconshdlr, SCIP_Bool deleteobject)
 
scip::ObjConshdlrSCIPfindObjConshdlr (SCIP *scip, const char *name)
 
scip::ObjConshdlrSCIPgetObjConshdlr (SCIP *scip, SCIP_CONSHDLR *conshdlr)
 

Function Documentation

◆ SCIPincludeObjConshdlr()

SCIP_RETCODE SCIPincludeObjConshdlr ( SCIP scip,
scip::ObjConshdlr objconshdlr,
SCIP_Bool  deleteobject 
)

creates the constraint handler for the given constraint handler object and includes it in SCIP

The method should be called in one of the following ways:

  1. The user is resposible of deleting the object: SCIP_CALL( SCIPcreate(&scip) ); ... MyConshdlr* myconshdlr = new MyConshdlr(...); SCIP_CALL( SCIPincludeObjConshdlr(scip, &myconshdlr, FALSE) ); ... SCIP_CALL( SCIPfree(&scip) ); delete myconshdlr; // delete conshdlr AFTER SCIPfree() !
  2. The object pointer is passed to SCIP and deleted by SCIP in the SCIPfree() call: SCIP_CALL( SCIPcreate(&scip) ); ... SCIP_CALL( SCIPincludeObjConshdlr(scip, new MyConshdlr(...), TRUE) ); ... SCIP_CALL( SCIPfree(&scip) ); // destructor of MyConshdlr is called here

creates the constraint handler for the given constraint handler object and includes it in SCIP

Parameters
scipSCIP data structure
objconshdlrconstraint handler object
deleteobjectshould the constraint handler object be deleted when conshdlr is freed?

Definition at line 621 of file objconshdlr.cpp.

References NULL, scip::ObjConshdlr::scip_, SCIP_CALL, scip::ObjConshdlr::scip_checkpriority_, scip::ObjConshdlr::scip_delayprop_, scip::ObjConshdlr::scip_delaysepa_, scip::ObjConshdlr::scip_desc_, scip::ObjConshdlr::scip_eagerfreq_, scip::ObjConshdlr::scip_enfopriority_, scip::ObjConshdlr::scip_maxprerounds_, scip::ObjConshdlr::scip_name_, scip::ObjConshdlr::scip_needscons_, SCIP_OKAY, scip::ObjConshdlr::scip_presoltiming_, scip::ObjConshdlr::scip_propfreq_, scip::ObjConshdlr::scip_proptiming_, scip::ObjConshdlr::scip_sepafreq_, scip::ObjConshdlr::scip_sepapriority_, and SCIPincludeConshdlr().

Referenced by runSCIP(), scip::ObjConshdlr::SCIP_DECL_CONSGETDIVEBDCHGS(), and SCIP_DECL_CONSHDLRCOPY().

◆ SCIPfindObjConshdlr()

scip::ObjConshdlr* SCIPfindObjConshdlr ( SCIP scip,
const char *  name 
)

returns the conshdlr object of the given name, or 0 if not existing

Parameters
scipSCIP data structure
namename of constraint handler

Definition at line 660 of file objconshdlr.cpp.

References NULL, SCIPconshdlrGetData(), and SCIPfindConshdlr().

Referenced by scip::ObjConshdlr::SCIP_DECL_CONSGETDIVEBDCHGS().

◆ SCIPgetObjConshdlr()

scip::ObjConshdlr* SCIPgetObjConshdlr ( SCIP scip,
SCIP_CONSHDLR conshdlr 
)

returns the conshdlr object for the given constraint handler

Parameters
scipSCIP data structure
conshdlrconstraint handler

Definition at line 679 of file objconshdlr.cpp.

References NULL, and SCIPconshdlrGetData().

Referenced by scip::ObjConshdlr::SCIP_DECL_CONSGETDIVEBDCHGS().