Scippy

SCIP

Solving Constraint Integer Programs

objpricer.h File Reference

Detailed Description

C++ wrapper for variable pricers.

Author
Tobias Achterberg

Definition in file objpricer.h.

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

Go to the source code of this file.

Functions

SCIP_RETCODE SCIPincludeObjPricer (SCIP *scip, scip::ObjPricer *objpricer, SCIP_Bool deleteobject)
 
scip::ObjPricerSCIPfindObjPricer (SCIP *scip, const char *name)
 
scip::ObjPricerSCIPgetObjPricer (SCIP *scip, SCIP_PRICER *pricer)
 

Function Documentation

SCIP_RETCODE SCIPincludeObjPricer ( SCIP scip,
scip::ObjPricer objpricer,
SCIP_Bool  deleteobject 
)

creates the variable pricer for the given variable pricer 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) ); ... MyPricer* mypricer = new MyPricer(...); SCIP_CALL( SCIPincludeObjPricer(scip, &mypricer, FALSE) ); ... SCIP_CALL( SCIPfree(&scip) ); delete mypricer; // delete pricer AFTER SCIPfree() !
  2. The object pointer is passed to SCIP and deleted by SCIP in the SCIPfree() call: SCIP_CALL( SCIPcreate(&scip) ); ... SCIP_CALL( SCIPincludeObjPricer(scip, new MyPricer(...), TRUE) ); ... SCIP_CALL( SCIPfree(&scip) ); // destructor of MyPricer is called here
Parameters
scipSCIP data structure
objpricervariable pricer object
deleteobjectshould the pricer object be deleted when pricer is freed?

Referenced by scip::ObjPricer::SCIP_DECL_PRICERFARKAS().

scip::ObjPricer* SCIPfindObjPricer ( SCIP scip,
const char *  name 
)

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

Parameters
scipSCIP data structure
namename of variable pricer

Referenced by scip::ObjPricer::SCIP_DECL_PRICERFARKAS().

scip::ObjPricer* SCIPgetObjPricer ( SCIP scip,
SCIP_PRICER pricer 
)

returns the variable pricer object for the given pricer

Parameters
scipSCIP data structure
pricerpricer

Referenced by scip::ObjPricer::SCIP_DECL_PRICERFARKAS().