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.

Data Structures

class  scip::ObjProp
 C++ wrapper for propagators. More...
 

Namespaces

 scip
 

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

◆ SCIPincludeObjProp()

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

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

Parameters
scipSCIP data structure
objproppropagator object
deleteobjectshould the propagator object be deleted when propagator is freed?

Definition at line 267 of file objprop.cpp.

References NULL, SCIP_CALL, scip::ObjProp::scip_delay_, scip::ObjProp::scip_desc_, scip::ObjProp::scip_freq_, scip::ObjProp::scip_name_, SCIP_OKAY, scip::ObjProp::scip_presol_maxrounds_, scip::ObjProp::scip_presol_priority_, scip::ObjProp::scip_presol_timing_, scip::ObjProp::scip_priority_, scip::ObjProp::scip_timingmask_, and SCIPincludeProp().

Referenced by SCIP_DECL_PROPCOPY(), and scip::ObjProp::SCIP_DECL_PROPRESPROP().

◆ SCIPfindObjProp()

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

Definition at line 295 of file objprop.cpp.

References NULL, SCIPfindProp(), and SCIPpropGetData().

Referenced by scip::ObjProp::SCIP_DECL_PROPRESPROP().

◆ SCIPgetObjProp()

scip::ObjProp* SCIPgetObjProp ( SCIP scip,
SCIP_PROP prop 
)

returns the prop object for the given propagator

Parameters
scipSCIP data structure
proppropagator

Definition at line 314 of file objprop.cpp.

References NULL, and SCIPpropGetData().

Referenced by scip::ObjProp::SCIP_DECL_PROPRESPROP().