SCIP Doxygen Documentation
Loading...
Searching...
No Matches
pricer.h File Reference

Detailed Description

internal methods for variable pricers

Author
Tobias Achterberg

Definition in file pricer.h.

#include "scip/def.h"
#include "blockmemshell/memory.h"
#include "scip/type_retcode.h"
#include "scip/type_result.h"
#include "scip/type_set.h"
#include "scip/type_lp.h"
#include "scip/type_message.h"
#include "scip/type_prob.h"
#include "scip/type_pricestore.h"
#include "scip/type_pricer.h"
#include "scip/pub_pricer.h"

Go to the source code of this file.

Functions

SCIP_RETCODE SCIPpricerCopyInclude (SCIP_PRICER *pricer, SCIP_SET *set, SCIP_Bool *valid)
SCIP_RETCODE SCIPpricerCreate (SCIP_PRICER **pricer, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, int priority, SCIP_Bool delay, SCIP_DECL_PRICERCOPY((*pricercopy)), SCIP_DECL_PRICERFREE((*pricerfree)), SCIP_DECL_PRICERINIT((*pricerinit)), SCIP_DECL_PRICEREXIT((*pricerexit)), SCIP_DECL_PRICERINITSOL((*pricerinitsol)), SCIP_DECL_PRICEREXITSOL((*pricerexitsol)), SCIP_DECL_PRICERREDCOST((*pricerredcost)), SCIP_DECL_PRICERFARKAS((*pricerfarkas)), SCIP_PRICERDATA *pricerdata)
SCIP_RETCODE SCIPpricerFree (SCIP_PRICER **pricer, SCIP_SET *set)
SCIP_RETCODE SCIPpricerInit (SCIP_PRICER *pricer, SCIP_SET *set)
SCIP_RETCODE SCIPpricerExit (SCIP_PRICER *pricer, SCIP_SET *set)
SCIP_RETCODE SCIPpricerInitsol (SCIP_PRICER *pricer, SCIP_SET *set)
SCIP_RETCODE SCIPpricerExitsol (SCIP_PRICER *pricer, SCIP_SET *set)
SCIP_RETCODE SCIPpricerActivate (SCIP_PRICER *pricer, SCIP_SET *set)
SCIP_RETCODE SCIPpricerDeactivate (SCIP_PRICER *pricer, SCIP_SET *set)
void SCIPpricerEnableOrDisableClocks (SCIP_PRICER *pricer, SCIP_Bool enable)
SCIP_RETCODE SCIPpricerRedcost (SCIP_PRICER *pricer, SCIP_SET *set, SCIP_PROB *prob, SCIP_Real *lowerbound, SCIP_Bool *stopearly, SCIP_RESULT *result)
SCIP_RETCODE SCIPpricerFarkas (SCIP_PRICER *pricer, SCIP_SET *set, SCIP_PROB *prob, SCIP_RESULT *result)
SCIP_RETCODE SCIPpricerExec (SCIP_PRICER *pricer, SCIP_SET *set, SCIP_PROB *prob, SCIP_LP *lp, SCIP_PRICESTORE *pricestore, SCIP_Real *lowerbound, SCIP_Bool *stopearly, SCIP_RESULT *result)
void SCIPpricerSetPriority (SCIP_PRICER *pricer, SCIP_SET *set, int priority)
void SCIPpricerSetCopy (SCIP_PRICER *pricer,)
void SCIPpricerSetFree (SCIP_PRICER *pricer,)
void SCIPpricerSetInit (SCIP_PRICER *pricer,)
void SCIPpricerSetExit (SCIP_PRICER *pricer,)
void SCIPpricerSetInitsol (SCIP_PRICER *pricer,)
void SCIPpricerSetExitsol (SCIP_PRICER *pricer,)

Function Documentation

◆ SCIPpricerCopyInclude()

SCIP_RETCODE SCIPpricerCopyInclude ( SCIP_PRICER * pricer,
SCIP_SET * set,
SCIP_Bool * valid )

copies the given pricer to a new scip

Parameters
pricerpricer
setSCIP_SET of SCIP to copy to
validwas the copying process valid?

Definition at line 87 of file pricer.c.

References assert(), NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPpricerCopyInclude(), SCIPpricerGetName(), SCIPsetDebugMsg, and valid.

Referenced by SCIPpricerCopyInclude(), and SCIPsetCopyPlugins().

◆ SCIPpricerCreate()

SCIP_RETCODE SCIPpricerCreate ( SCIP_PRICER ** pricer,
SCIP_SET * set,
SCIP_MESSAGEHDLR * messagehdlr,
BMS_BLKMEM * blkmem,
const char * name,
const char * desc,
int priority,
SCIP_Bool delay,
SCIP_DECL_PRICERCOPY((*pricercopy)) ,
SCIP_DECL_PRICERFREE((*pricerfree)) ,
SCIP_DECL_PRICERINIT((*pricerinit)) ,
SCIP_DECL_PRICEREXIT((*pricerexit)) ,
SCIP_DECL_PRICERINITSOL((*pricerinitsol)) ,
SCIP_DECL_PRICEREXITSOL((*pricerexitsol)) ,
SCIP_DECL_PRICERREDCOST((*pricerredcost)) ,
SCIP_DECL_PRICERFARKAS((*pricerfarkas)) ,
SCIP_PRICERDATA * pricerdata )

creates a variable pricer

creates a variable pricer To use the variable pricer for solving a problem, it first has to be activated with a call to SCIPactivatePricer().

Parameters
pricerpointer to variable pricer data structure
setglobal SCIP settings
messagehdlrmessage handler
blkmemblock memory for parameter settings
namename of variable pricer
descdescription of variable pricer
prioritypriority of the variable pricer
delayshould the pricer be delayed until no other pricers or already existing problem variables with negative reduced costs are found
-copy method of pricer or NULL if you don't want to copy your plugin into sub-SCIPs
-destructor of variable pricer
-initialize variable pricer
-deinitialize variable pricer
-solving process initialization method of variable pricer
-solving process deinitialization method of variable pricer
-reduced cost pricing method of variable pricer for feasible LPs
-Farkas pricing method of variable pricer for infeasible LPs
pricerdatavariable pricer data

Definition at line 174 of file pricer.c.

References assert(), doPricerCreate(), NULL, SCIP_Bool, SCIP_CALL_FINALLY, SCIP_DECL_PRICERCOPY, SCIP_DECL_PRICEREXIT, SCIP_DECL_PRICEREXITSOL, SCIP_DECL_PRICERFARKAS, SCIP_DECL_PRICERFREE, SCIP_DECL_PRICERINIT, SCIP_DECL_PRICERINITSOL, SCIP_DECL_PRICERREDCOST, SCIP_OKAY, SCIPpricerCreate(), and SCIPpricerFree().

Referenced by SCIPincludePricer(), SCIPincludePricerBasic(), and SCIPpricerCreate().

◆ SCIPpricerFree()

SCIP_RETCODE SCIPpricerFree ( SCIP_PRICER ** pricer,
SCIP_SET * set )

calls destructor and frees memory of variable pricer

Parameters
pricerpointer to variable pricer data structure
setglobal SCIP settings

Definition at line 208 of file pricer.c.

References assert(), BMSfreeMemory, BMSfreeMemoryArrayNull, NULL, SCIP_CALL, SCIP_OKAY, SCIPclockFree(), and SCIPpricerFree().

Referenced by SCIPpricerCreate(), and SCIPpricerFree().

◆ SCIPpricerInit()

◆ SCIPpricerExit()

SCIP_RETCODE SCIPpricerExit ( SCIP_PRICER * pricer,
SCIP_SET * set )

calls exit method of variable pricer

Parameters
pricervariable pricer
setglobal SCIP settings

Definition at line 275 of file pricer.c.

References SCIP_Pricer::active, assert(), FALSE, SCIP_Pricer::initialized, SCIP_Pricer::name, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, SCIPpricerExit(), and SCIP_Pricer::setuptime.

Referenced by SCIPpricerExit().

◆ SCIPpricerInitsol()

SCIP_RETCODE SCIPpricerInitsol ( SCIP_PRICER * pricer,
SCIP_SET * set )

informs variable pricer that the branch and bound process is being started

Parameters
pricervariable pricer
setglobal SCIP settings

Definition at line 306 of file pricer.c.

References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), SCIPpricerInitsol(), and SCIP_Pricer::setuptime.

Referenced by SCIPpricerInitsol().

◆ SCIPpricerExitsol()

SCIP_RETCODE SCIPpricerExitsol ( SCIP_PRICER * pricer,
SCIP_SET * set )

informs variable pricer that the branch and bound process data is being freed

Parameters
pricervariable pricer
setglobal SCIP settings

Definition at line 330 of file pricer.c.

References assert(), NULL, SCIP_CALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), SCIPpricerExitsol(), and SCIP_Pricer::setuptime.

Referenced by SCIPpricerExitsol().

◆ SCIPpricerActivate()

SCIP_RETCODE SCIPpricerActivate ( SCIP_PRICER * pricer,
SCIP_SET * set )

activates pricer such that it is called in LP solving loop

Parameters
pricervariable pricer
setglobal SCIP settings

Definition at line 354 of file pricer.c.

References SCIP_Pricer::active, assert(), FALSE, NULL, SCIP_OKAY, SCIP_STAGE_INIT, SCIP_STAGE_PROBLEM, SCIPpricerActivate(), and TRUE.

Referenced by SCIPactivatePricer(), SCIPpricerActivate(), and SCIPsetCopyPlugins().

◆ SCIPpricerDeactivate()

SCIP_RETCODE SCIPpricerDeactivate ( SCIP_PRICER * pricer,
SCIP_SET * set )

deactivates pricer such that it is no longer called in LP solving loop

Parameters
pricervariable pricer
setglobal SCIP settings

Definition at line 377 of file pricer.c.

References SCIP_Pricer::active, assert(), FALSE, NULL, SCIP_OKAY, and SCIPpricerDeactivate().

Referenced by SCIPdeactivatePricer(), SCIPfreeProb(), and SCIPpricerDeactivate().

◆ SCIPpricerEnableOrDisableClocks()

void SCIPpricerEnableOrDisableClocks ( SCIP_PRICER * pricer,
SCIP_Bool enable )

enables or disables all clocks of pricer, depending on the value of the flag

Parameters
pricerthe pricer for which all clocks should be enabled or disabled
enableshould the clocks of the pricer be enabled?

Definition at line 703 of file pricer.c.

References assert(), NULL, SCIP_Pricer::pricerclock, SCIP_Bool, SCIPclockEnableOrDisable(), SCIPpricerEnableOrDisableClocks(), and SCIP_Pricer::setuptime.

Referenced by SCIPpricerEnableOrDisableClocks().

◆ SCIPpricerRedcost()

SCIP_RETCODE SCIPpricerRedcost ( SCIP_PRICER * pricer,
SCIP_SET * set,
SCIP_PROB * prob,
SCIP_Real * lowerbound,
SCIP_Bool * stopearly,
SCIP_RESULT * result )

calls reduced cost pricing method of variable pricer

Parameters
pricervariable pricer
setglobal SCIP settings
probtransformed problem
lowerboundlocal lower bound computed by the pricer
stopearlyshould pricing be stopped, although new variables were added?
resultresult of the pricing process

Definition at line 396 of file pricer.c.

References SCIP_Pricer::active, assert(), SCIP_Pricer::exact, SCIP_Pricer::name, SCIP_Pricer::ncalls, NULL, SCIP_Pricer::nvarsfound, SCIP_Pricer::pricerclock, result, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPclockStart(), SCIPclockStop(), SCIPpricerRedcost(), SCIPprobGetNVars(), and SCIPsetDebugMsg.

Referenced by SCIPpricerExec(), and SCIPpricerRedcost().

◆ SCIPpricerFarkas()

SCIP_RETCODE SCIPpricerFarkas ( SCIP_PRICER * pricer,
SCIP_SET * set,
SCIP_PROB * prob,
SCIP_RESULT * result )

calls Farkas pricing method of variable pricer

Parameters
pricervariable pricer
setglobal SCIP settings
probtransformed problem
resultresult of the pricing process

Definition at line 440 of file pricer.c.

References SCIP_Pricer::active, assert(), SCIP_Pricer::exact, SCIP_Pricer::name, SCIP_Pricer::ncalls, NULL, SCIP_Pricer::nvarsfound, SCIP_Pricer::pricerclock, result, SCIP_CALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), SCIPpricerFarkas(), SCIPprobGetNVars(), and SCIPsetDebugMsg.

Referenced by SCIPpricerExec(), and SCIPpricerFarkas().

◆ SCIPpricerExec()

SCIP_RETCODE SCIPpricerExec ( SCIP_PRICER * pricer,
SCIP_SET * set,
SCIP_PROB * prob,
SCIP_LP * lp,
SCIP_PRICESTORE * pricestore,
SCIP_Real * lowerbound,
SCIP_Bool * stopearly,
SCIP_RESULT * result )

depending on the LP's solution status, calls reduced cost or Farkas pricing method of variable pricer

Parameters
pricervariable pricer
setglobal SCIP settings
probtransformed problem
lpLP data
pricestorepricing storage
lowerboundlocal lower bound computed by the pricer
stopearlyshould pricing be stopped, although new variables were added?
resultresult of the pricing process

Definition at line 483 of file pricer.c.

References assert(), SCIP_Pricer::delay, FALSE, NULL, result, SCIP_Bool, SCIP_CALL, SCIP_DIDNOTRUN, SCIP_LPSOLSTAT_INFEASIBLE, SCIP_OKAY, SCIP_Real, SCIP_SUCCESS, SCIPlpGetSolstat(), SCIPpricerExec(), SCIPpricerFarkas(), SCIPpricerRedcost(), SCIPpricestoreGetNVars(), and SCIPsetInfinity().

Referenced by SCIPpriceLoop(), and SCIPpricerExec().

◆ SCIPpricerSetPriority()

void SCIPpricerSetPriority ( SCIP_PRICER * pricer,
SCIP_SET * set,
int priority )

sets priority of variable pricer

Parameters
pricervariable pricer
setglobal SCIP settings
prioritynew priority of the variable pricer

Definition at line 649 of file pricer.c.

References assert(), FALSE, NULL, SCIP_Pricer::priority, and SCIPpricerSetPriority().

Referenced by SCIPpricerSetPriority(), and SCIPsetPricerPriority().

◆ SCIPpricerSetCopy()

void SCIPpricerSetCopy ( SCIP_PRICER * pricer)

sets copy callback of pricer

Parameters
pricervariable pricer copy callback of pricer

Definition at line 543 of file pricer.c.

References assert(), NULL, SCIP_DECL_PRICERCOPY, and SCIPpricerSetCopy().

Referenced by SCIPpricerSetCopy(), and SCIPsetPricerCopy().

◆ SCIPpricerSetFree()

void SCIPpricerSetFree ( SCIP_PRICER * pricer)

sets destructor callback of pricer

Parameters
pricerpricer destructor of pricer

Definition at line 554 of file pricer.c.

References assert(), NULL, SCIP_DECL_PRICERFREE, and SCIPpricerSetFree().

Referenced by SCIPpricerSetFree(), and SCIPsetPricerFree().

◆ SCIPpricerSetInit()

void SCIPpricerSetInit ( SCIP_PRICER * pricer)

sets initialization callback of pricer

Parameters
pricerpricer initialize pricer

Definition at line 565 of file pricer.c.

References assert(), NULL, SCIP_DECL_PRICERINIT, and SCIPpricerSetInit().

Referenced by SCIPpricerSetInit(), and SCIPsetPricerInit().

◆ SCIPpricerSetExit()

void SCIPpricerSetExit ( SCIP_PRICER * pricer)

sets deinitialization callback of pricer

Parameters
pricerpricer deinitialize pricer

Definition at line 576 of file pricer.c.

References assert(), NULL, SCIP_DECL_PRICEREXIT, and SCIPpricerSetExit().

Referenced by SCIPpricerSetExit(), and SCIPsetPricerExit().

◆ SCIPpricerSetInitsol()

void SCIPpricerSetInitsol ( SCIP_PRICER * pricer)

sets solving process initialization callback of pricer

Parameters
pricerpricer solving process initialization callback of pricer

Definition at line 587 of file pricer.c.

References assert(), NULL, SCIP_DECL_PRICERINITSOL, and SCIPpricerSetInitsol().

Referenced by SCIPpricerSetInitsol(), and SCIPsetPricerInitsol().

◆ SCIPpricerSetExitsol()

void SCIPpricerSetExitsol ( SCIP_PRICER * pricer)

sets solving process deinitialization callback of pricer

Parameters
pricerpricer solving process deinitialization callback of pricer

Definition at line 598 of file pricer.c.

References assert(), NULL, SCIP_DECL_PRICEREXITSOL, and SCIPpricerSetExitsol().

Referenced by SCIPpricerSetExitsol(), and SCIPsetPricerExitsol().