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.

Data Structures

class  scip::ObjNodesel
 C++ wrapper for primal heuristics. More...
 

Namespaces

 scip
 

Functions

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

Function Documentation

◆ SCIPincludeObjNodesel()

SCIP_EXPORT 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

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

Parameters
scipSCIP data structure
objnodeselnode selector object
deleteobjectshould the node selector object be deleted when node selector is freed?

Definition at line 210 of file objnodesel.cpp.

References NULL, SCIP_CALL, scip::ObjNodesel::scip_desc_, scip::ObjNodesel::scip_memsavepriority_, scip::ObjNodesel::scip_name_, SCIP_OKAY, scip::ObjNodesel::scip_stdpriority_, and SCIPincludeNodesel().

Referenced by SCIP_DECL_NODESELCOPY(), and scip::ObjNodesel::SCIP_DECL_NODESELEXITSOL().

◆ SCIPfindObjNodesel()

SCIP_EXPORT 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

Definition at line 238 of file objnodesel.cpp.

References NULL, SCIPfindNodesel(), and SCIPnodeselGetData().

Referenced by scip::ObjNodesel::SCIP_DECL_NODESELEXITSOL().

◆ SCIPgetObjNodesel()

SCIP_EXPORT scip::ObjNodesel* SCIPgetObjNodesel ( SCIP scip,
SCIP_NODESEL nodesel 
)

returns the nodesel object for the given node selector

Parameters
scipSCIP data structure
nodeselnode selector

Definition at line 257 of file objnodesel.cpp.

References NULL, and SCIPnodeselGetData().

Referenced by scip::ObjNodesel::SCIP_DECL_NODESELEXITSOL().