Scippy

SCIP

Solving Constraint Integer Programs

objrelax.h File Reference

Detailed Description

C++ wrapper for relaxation handlers.

Author
Tobias Achterberg

Definition in file objrelax.h.

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

Go to the source code of this file.

Data Structures

class  scip::ObjRelax
 C++ wrapper for relaxation handlers. More...
 

Namespaces

 scip
 

Functions

SCIP_RETCODE SCIPincludeObjRelax (SCIP *scip, scip::ObjRelax *objrelax, SCIP_Bool deleteobject)
 
scip::ObjRelaxSCIPfindObjRelax (SCIP *scip, const char *name)
 
scip::ObjRelaxSCIPgetObjRelax (SCIP *scip, SCIP_RELAX *relax)
 

Function Documentation

◆ SCIPincludeObjRelax()

SCIP_RETCODE SCIPincludeObjRelax ( SCIP scip,
scip::ObjRelax objrelax,
SCIP_Bool  deleteobject 
)

creates the relaxator for the given relaxator 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) ); ... MyRelax* myrelax = new MyRelax(...); SCIP_CALL( SCIPincludeObjRelax(scip, &myrelax, FALSE) ); ... SCIP_CALL( SCIPfree(&scip) ); delete myrelax; // delete relax AFTER SCIPfree() !
  2. The object pointer is passed to SCIP and deleted by SCIP in the SCIPfree() call: SCIP_CALL( SCIPcreate(&scip) ); ... SCIP_CALL( SCIPincludeObjRelax(scip, new MyRelax(...), TRUE) ); ... SCIP_CALL( SCIPfree(&scip) ); // destructor of MyRelax is called here

creates the relaxator for the given relaxator object and includes it in SCIP

Parameters
scipSCIP data structure
objrelaxrelaxator object
deleteobjectshould the relaxator object be deleted when relaxator is freed?

Definition at line 204 of file objrelax.cpp.

References NULL, SCIP_CALL, scip::ObjRelax::scip_desc_, scip::ObjRelax::scip_freq_, scip::ObjRelax::scip_name_, SCIP_OKAY, scip::ObjRelax::scip_priority_, and SCIPincludeRelax().

Referenced by SCIP_DECL_RELAXCOPY(), and scip::ObjRelax::SCIP_DECL_RELAXEXITSOL().

◆ SCIPfindObjRelax()

scip::ObjRelax* SCIPfindObjRelax ( SCIP scip,
const char *  name 
)

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

Parameters
scipSCIP data structure
namename of relaxator

Definition at line 231 of file objrelax.cpp.

References NULL, SCIPfindRelax(), and SCIPrelaxGetData().

Referenced by scip::ObjRelax::SCIP_DECL_RELAXEXITSOL().

◆ SCIPgetObjRelax()

scip::ObjRelax* SCIPgetObjRelax ( SCIP scip,
SCIP_RELAX relax 
)

returns the relax object for the given relaxator

Parameters
scipSCIP data structure
relaxrelaxator

Definition at line 250 of file objrelax.cpp.

References NULL, and SCIPrelaxGetData().

Referenced by scip::ObjRelax::SCIP_DECL_RELAXEXITSOL().