Scippy

SCIP

Solving Constraint Integer Programs

objcutsel.h File Reference

Detailed Description

C++ wrapper for cut selectors.

Author
Felipe Serrano
Mark Turner

Definition in file objcutsel.h.

#include <cstring>
#include "scip/scip.h"
#include "objscip/objcloneable.h"

Go to the source code of this file.

Data Structures

class  scip::ObjCutsel
 C++ wrapper for cut selectors. More...
 

Namespaces

 scip
 

Functions

SCIP_RETCODE SCIPincludeObjCutsel (SCIP *scip, scip::ObjCutsel *objcutsel, SCIP_Bool deleteobject)
 
scip::ObjCutselSCIPfindObjCutsel (SCIP *scip, const char *name)
 
scip::ObjCutselSCIPgetObjCutsel (SCIP *scip, SCIP_CUTSEL *cutsel)
 

Function Documentation

◆ SCIPincludeObjCutsel()

SCIP_RETCODE SCIPincludeObjCutsel ( SCIP scip,
scip::ObjCutsel objcutsel,
SCIP_Bool  deleteobject 
)

creates the cut selector for the given cut selector object and includes it in SCIP

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

  1. The user is responsible for deleting the object: SCIP_CALL( SCIPcreate(&scip) ); ... MyCutsel* mycutsel = new MyCutsel(...); SCIP_CALL( SCIPincludeObjCutsel(scip, &mycutsel, FALSE) ); ... SCIP_CALL( SCIPfree(&scip) ); delete mycutsel; // delete cutsel AFTER SCIPfree() !
  2. The object pointer is passed to SCIP and deleted by SCIP in the SCIPfree() call: SCIP_CALL( SCIPcreate(&scip) ); ... SCIP_CALL( SCIPincludeObjCutsel(scip, new MyCutsel(...), TRUE) ); ... SCIP_CALL( SCIPfree(&scip) ); // destructor of MyCutsel is called here

creates the cut selector for the given cut selector object and includes it in SCIP

Parameters
scipSCIP data structure
objcutselcut selector object
deleteobjectshould the cut selector object be deleted when cut selector is freed?

Definition at line 197 of file objcutsel.cpp.

References NULL, SCIP_CALL, scip::ObjCutsel::scip_desc_, scip::ObjCutsel::scip_name_, SCIP_OKAY, scip::ObjCutsel::scip_priority_, and SCIPincludeCutsel().

Referenced by SCIP_DECL_CUTSELCOPY(), and scip::ObjCutsel::SCIP_DECL_CUTSELEXITSOL().

◆ SCIPfindObjCutsel()

scip::ObjCutsel* SCIPfindObjCutsel ( SCIP scip,
const char *  name 
)

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

Parameters
scipSCIP data structure
namename of cut selector

Definition at line 225 of file objcutsel.cpp.

References NULL, SCIPcutselGetData(), and SCIPfindCutsel().

Referenced by scip::ObjCutsel::SCIP_DECL_CUTSELEXITSOL().

◆ SCIPgetObjCutsel()

scip::ObjCutsel* SCIPgetObjCutsel ( SCIP scip,
SCIP_CUTSEL cutsel 
)

returns the cutsel object for the given cut selector

Parameters
scipSCIP data structure
cutselcut selector

Definition at line 244 of file objcutsel.cpp.

References NULL, and SCIPcutselGetData().

Referenced by scip::ObjCutsel::SCIP_DECL_CUTSELEXITSOL().