Scippy

SCIP

Solving Constraint Integer Programs

objprop.h File Reference

Detailed Description

C++ wrapper for propagators.

Author
Tobias Achterberg

Definition in file objprop.h.

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

Go to the source code of this file.

Functions

SCIP_RETCODE SCIPincludeObjProp (SCIP *scip, scip::ObjProp *objprop, SCIP_Bool deleteobject)
 
scip::ObjPropSCIPfindObjProp (SCIP *scip, const char *name)
 
scip::ObjPropSCIPgetObjProp (SCIP *scip, SCIP_PROP *prop)
 

Function Documentation

SCIP_RETCODE SCIPincludeObjProp ( SCIP scip,
scip::ObjProp objprop,
SCIP_Bool  deleteobject 
)

creates the propagator for the given propagator 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) ); ... MyProp* myprop = new MyProp(...); SCIP_CALL( SCIPincludeObjProp(scip, &myprop, FALSE) ); ... SCIP_CALL( SCIPfree(&scip) ); delete myprop; // delete prop AFTER SCIPfree() !
  2. The object pointer is passed to SCIP and deleted by SCIP in the SCIPfree() call: SCIP_CALL( SCIPcreate(&scip) ); ... SCIP_CALL( SCIPincludeObjProp(scip, new MyProp(...), TRUE) ); ... SCIP_CALL( SCIPfree(&scip) ); // destructor of MyProp is called here
Parameters
scipSCIP data structure
objproppropagator object
deleteobjectshould the propagator object be deleted when propagator is freed?
scip::ObjProp* SCIPfindObjProp ( SCIP scip,
const char *  name 
)

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

Parameters
scipSCIP data structure
namename of propagator
scip::ObjProp* SCIPgetObjProp ( SCIP scip,
SCIP_PROP prop 
)

returns the prop object for the given propagator

Parameters
scipSCIP data structure
proppropagator