Scippy

SCIP

Solving Constraint Integer Programs

objpresol.h File Reference

Detailed Description

C++ wrapper for presolvers.

Author
Tobias Achterberg

Definition in file objpresol.h.

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

Go to the source code of this file.

Functions

SCIP_RETCODE SCIPincludeObjPresol (SCIP *scip, scip::ObjPresol *objpresol, SCIP_Bool deleteobject)
 
scip::ObjPresolSCIPfindObjPresol (SCIP *scip, const char *name)
 
scip::ObjPresolSCIPgetObjPresol (SCIP *scip, SCIP_PRESOL *presol)
 

Function Documentation

SCIP_RETCODE SCIPincludeObjPresol ( SCIP scip,
scip::ObjPresol objpresol,
SCIP_Bool  deleteobject 
)

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

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

Parameters
scipSCIP data structure
objpresolpresolver object
deleteobjectshould the presolver object be deleted when presolver is freed?

Definition at line 199 of file objpresol.cpp.

References NULL, SCIP_CALL, scip::ObjPresol::scip_delay_, scip::ObjPresol::scip_desc_, scip::ObjPresol::scip_maxrounds_, scip::ObjPresol::scip_name_, SCIP_OKAY, scip::ObjPresol::scip_priority_, and SCIPincludePresol().

Referenced by SCIP_DECL_PRESOLCOPY().

scip::ObjPresol* SCIPfindObjPresol ( SCIP scip,
const char *  name 
)

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

Parameters
scipSCIP data structure
namename of presolver

Definition at line 227 of file objpresol.cpp.

References NULL, SCIPfindPresol(), and SCIPpresolGetData().

scip::ObjPresol* SCIPgetObjPresol ( SCIP scip,
SCIP_PRESOL presol 
)

returns the presol object for the given presolver

Parameters
scipSCIP data structure
presolpresolver

Definition at line 246 of file objpresol.cpp.

References NULL, and SCIPpresolGetData().