Scippy

SCIP

Solving Constraint Integer Programs

objnodesel.h File Reference

Detailed Description

C++ wrapper for node selectors.

Author
Tobias Achterberg

Definition in file objnodesel.h.

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

Go to the source code of this file.

Functions

SCIP_RETCODE SCIPincludeObjNodesel (SCIP *scip, scip::ObjNodesel *objnodesel, SCIP_Bool deleteobject)
 
scip::ObjNodeselSCIPfindObjNodesel (SCIP *scip, const char *name)
 
scip::ObjNodeselSCIPgetObjNodesel (SCIP *scip, SCIP_NODESEL *nodesel)
 

Function Documentation

SCIP_RETCODE SCIPincludeObjNodesel ( SCIP scip,
scip::ObjNodesel objnodesel,
SCIP_Bool  deleteobject 
)

creates the node selector for the given node selector 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) ); ... MyNodesel* mynodesel = new MyNodesel(...); SCIP_CALL( SCIPincludeObjNodesel(scip, &mynodesel, FALSE) ); ... SCIP_CALL( SCIPfree(&scip) ); delete mynodesel; // delete nodesel AFTER SCIPfree() !
  2. The object pointer is passed to SCIP and deleted by SCIP in the SCIPfree() call: SCIP_CALL( SCIPcreate(&scip) ); ... SCIP_CALL( SCIPincludeObjNodesel(scip, new MyNodesel(...), TRUE) ); ... SCIP_CALL( SCIPfree(&scip) ); // destructor of MyNodesel is called here
Parameters
scipSCIP data structure
objnodeselnode selector object
deleteobjectshould the node selector object be deleted when node selector is freed?
scip::ObjNodesel* SCIPfindObjNodesel ( SCIP scip,
const char *  name 
)

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

Parameters
scipSCIP data structure
namename of node selector
scip::ObjNodesel* SCIPgetObjNodesel ( SCIP scip,
SCIP_NODESEL nodesel 
)

returns the nodesel object for the given node selector

Parameters
scipSCIP data structure
nodeselnode selector