Scippy

SCIP

Solving Constraint Integer Programs

objsepa.h File Reference

Detailed Description

C++ wrapper for cut separators.

Author
Tobias Achterberg

Definition in file objsepa.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::ObjSepa
 C++ wrapper for cut separators. More...
 

Namespaces

 scip
 

Functions

SCIP_RETCODE SCIPincludeObjSepa (SCIP *scip, scip::ObjSepa *objsepa, SCIP_Bool deleteobject)
 
scip::ObjSepaSCIPfindObjSepa (SCIP *scip, const char *name)
 
scip::ObjSepaSCIPgetObjSepa (SCIP *scip, SCIP_SEPA *sepa)
 

Function Documentation

◆ SCIPincludeObjSepa()

SCIP_RETCODE SCIPincludeObjSepa ( SCIP scip,
scip::ObjSepa objsepa,
SCIP_Bool  deleteobject 
)

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

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

Parameters
scipSCIP data structure
objsepacut separator object
deleteobjectshould the cut separator object be deleted when cut separator is freed?

Definition at line 220 of file objsepa.cpp.

References NULL, SCIP_CALL, scip::ObjSepa::scip_delay_, scip::ObjSepa::scip_desc_, scip::ObjSepa::scip_freq_, scip::ObjSepa::scip_maxbounddist_, scip::ObjSepa::scip_name_, SCIP_OKAY, scip::ObjSepa::scip_priority_, scip::ObjSepa::scip_usessubscip_, and SCIPincludeSepa().

Referenced by SCIP_DECL_SEPACOPY(), and scip::ObjSepa::SCIP_DECL_SEPAEXECSOL().

◆ SCIPfindObjSepa()

scip::ObjSepa* SCIPfindObjSepa ( SCIP scip,
const char *  name 
)

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

Parameters
scipSCIP data structure
namename of cut separator

Definition at line 247 of file objsepa.cpp.

References NULL, SCIPfindSepa(), and SCIPsepaGetData().

Referenced by scip::ObjSepa::SCIP_DECL_SEPAEXECSOL().

◆ SCIPgetObjSepa()

scip::ObjSepa* SCIPgetObjSepa ( SCIP scip,
SCIP_SEPA sepa 
)

returns the sepa object for the given cut separator

Parameters
scipSCIP data structure
sepacut separator

Definition at line 266 of file objsepa.cpp.

References NULL, and SCIPsepaGetData().

Referenced by scip::ObjSepa::SCIP_DECL_SEPAEXECSOL().