Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

methods to include and access pricer plugins of SCIP

Functions

 SCIP_DECL_SORTPTRCOMP (SCIPpricerComp)
 
 SCIP_DECL_SORTPTRCOMP (SCIPpricerCompName)
 
SCIP_PRICERDATASCIPpricerGetData (SCIP_PRICER *pricer)
 
void SCIPpricerSetData (SCIP_PRICER *pricer, SCIP_PRICERDATA *pricerdata)
 
const char * SCIPpricerGetName (SCIP_PRICER *pricer)
 
const char * SCIPpricerGetDesc (SCIP_PRICER *pricer)
 
int SCIPpricerGetPriority (SCIP_PRICER *pricer)
 
int SCIPpricerGetNCalls (SCIP_PRICER *pricer)
 
int SCIPpricerGetNVarsFound (SCIP_PRICER *pricer)
 
SCIP_Real SCIPpricerGetSetupTime (SCIP_PRICER *pricer)
 
SCIP_Real SCIPpricerGetTime (SCIP_PRICER *pricer)
 
SCIP_Bool SCIPpricerIsActive (SCIP_PRICER *pricer)
 
SCIP_Bool SCIPpricerIsDelayed (SCIP_PRICER *pricer)
 
SCIP_Bool SCIPpricerIsInitialized (SCIP_PRICER *pricer)
 
SCIP_RETCODE SCIPincludePricer (SCIP *scip, 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 SCIPincludePricerBasic (SCIP *scip, SCIP_PRICER **pricerptr, const char *name, const char *desc, int priority, SCIP_Bool delay, SCIP_DECL_PRICERREDCOST((*pricerredcost)), SCIP_DECL_PRICERFARKAS((*pricerfarkas)), SCIP_PRICERDATA *pricerdata)
 
SCIP_RETCODE SCIPsetPricerCopy (SCIP *scip, SCIP_PRICER *pricer, SCIP_DECL_PRICERCOPY((*pricercopy)))
 
SCIP_RETCODE SCIPsetPricerFree (SCIP *scip, SCIP_PRICER *pricer, SCIP_DECL_PRICERFREE((*pricerfree)))
 
SCIP_RETCODE SCIPsetPricerInit (SCIP *scip, SCIP_PRICER *pricer, SCIP_DECL_PRICERINIT((*pricerinit)))
 
SCIP_RETCODE SCIPsetPricerExit (SCIP *scip, SCIP_PRICER *pricer, SCIP_DECL_PRICEREXIT((*pricerexit)))
 
SCIP_RETCODE SCIPsetPricerInitsol (SCIP *scip, SCIP_PRICER *pricer, SCIP_DECL_PRICERINITSOL((*pricerinitsol)))
 
SCIP_RETCODE SCIPsetPricerExitsol (SCIP *scip, SCIP_PRICER *pricer, SCIP_DECL_PRICEREXITSOL((*pricerexitsol)))
 
SCIP_PRICERSCIPfindPricer (SCIP *scip, const char *name)
 
SCIP_PRICER ** SCIPgetPricers (SCIP *scip)
 
int SCIPgetNPricers (SCIP *scip)
 
int SCIPgetNActivePricers (SCIP *scip)
 
SCIP_RETCODE SCIPsetPricerPriority (SCIP *scip, SCIP_PRICER *pricer, int priority)
 
SCIP_RETCODE SCIPactivatePricer (SCIP *scip, SCIP_PRICER *pricer)
 
SCIP_RETCODE SCIPdeactivatePricer (SCIP *scip, SCIP_PRICER *pricer)
 

Function Documentation

◆ SCIP_DECL_SORTPTRCOMP() [1/2]

SCIP_DECL_SORTPTRCOMP ( SCIPpricerComp  )

compares two pricers w. r. to their priority

compares two pricers w. r. to their activity and their priority

Definition at line 44 of file pricer.c.

References active.

◆ SCIP_DECL_SORTPTRCOMP() [2/2]

SCIP_DECL_SORTPTRCOMP ( SCIPpricerCompName  )

comparison method for sorting pricers w.r.t. to their name

Definition at line 53 of file pricer.c.

References active, and SCIPpricerGetName().

◆ SCIPpricerGetData()

◆ SCIPpricerSetData()

void SCIPpricerSetData ( SCIP_PRICER pricer,
SCIP_PRICERDATA pricerdata 
)

sets user data of variable pricer; user has to free old data in advance!

Parameters
pricervariable pricer
pricerdatanew variable pricer user data

Definition at line 473 of file pricer.c.

References SCIP_Pricer::pricerdata.

Referenced by SCIP_DECL_PRICERFREE().

◆ SCIPpricerGetName()

const char* SCIPpricerGetName ( SCIP_PRICER pricer)

◆ SCIPpricerGetDesc()

const char* SCIPpricerGetDesc ( SCIP_PRICER pricer)

gets description of variable pricer

Parameters
pricervariable pricer

Definition at line 560 of file pricer.c.

References SCIP_Pricer::desc.

Referenced by SCIP_DECL_DIALOGEXEC(), SCIPincludeDialogDefaultFix(), and SCIPincludeDialogDefaultSet().

◆ SCIPpricerGetPriority()

int SCIPpricerGetPriority ( SCIP_PRICER pricer)

gets priority of variable pricer

Parameters
pricervariable pricer

Definition at line 570 of file pricer.c.

References SCIP_Pricer::priority.

Referenced by SCIP_DECL_DIALOGEXEC().

◆ SCIPpricerGetNCalls()

int SCIPpricerGetNCalls ( SCIP_PRICER pricer)

gets the number of times, the pricer was called and tried to find a variable with negative reduced costs

Parameters
pricervariable pricer

Definition at line 594 of file pricer.c.

References SCIP_Pricer::ncalls.

Referenced by SCIPprintPricerStatistics().

◆ SCIPpricerGetNVarsFound()

int SCIPpricerGetNVarsFound ( SCIP_PRICER pricer)

gets the number of variables with negative reduced costs found by this pricer

Parameters
pricervariable pricer

Definition at line 604 of file pricer.c.

References SCIP_Pricer::nvarsfound.

Referenced by SCIPprintPricerStatistics().

◆ SCIPpricerGetSetupTime()

SCIP_Real SCIPpricerGetSetupTime ( SCIP_PRICER pricer)

gets time in seconds used in this pricer for setting up for next stages

Parameters
pricervariable pricer

Definition at line 614 of file pricer.c.

References SCIPclockGetTime(), and SCIP_Pricer::setuptime.

Referenced by SCIPprintPricerStatistics().

◆ SCIPpricerGetTime()

SCIP_Real SCIPpricerGetTime ( SCIP_PRICER pricer)

gets time in seconds used in this pricer

Parameters
pricervariable pricer

Definition at line 624 of file pricer.c.

References SCIP_Pricer::pricerclock, and SCIPclockGetTime().

Referenced by SCIPprintPricerStatistics().

◆ SCIPpricerIsActive()

SCIP_Bool SCIPpricerIsActive ( SCIP_PRICER pricer)

returns whether the given pricer is in use in the current problem

Parameters
pricervariable pricer

Definition at line 646 of file pricer.c.

References SCIP_Pricer::active.

Referenced by SCIPsetEnableOrDisablePluginClocks().

◆ SCIPpricerIsDelayed()

SCIP_Bool SCIPpricerIsDelayed ( SCIP_PRICER pricer)

returns whether the pricer should be delayed until no other pricer finds a new variable

Parameters
pricervariable pricer

Definition at line 656 of file pricer.c.

References SCIP_Pricer::delay.

Referenced by SCIP_DECL_DIALOGEXEC().

◆ SCIPpricerIsInitialized()

SCIP_Bool SCIPpricerIsInitialized ( SCIP_PRICER pricer)

is variable pricer initialized?

Parameters
pricervariable pricer

Definition at line 666 of file pricer.c.

References SCIP_Pricer::initialized.

◆ SCIPincludePricer()

SCIP_RETCODE SCIPincludePricer ( SCIP scip,
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 and includes it in SCIP To use the variable pricer for solving a problem, it first has to be activated with a call to SCIPactivatePricer(). This should be done during the problem creation stage.

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Note
method has all pricer callbacks as arguments and is thus changed every time a new callback is added in future releases; consider using SCIPincludePricerBasic() and setter functions if you seek for a method which is less likely to change in future releases
Parameters
scipSCIP data structure
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? if this is set to FALSE it may happen that the pricer produces columns that already exist in the problem (which are also priced in by the default problem variable pricing in the same round)
pricerdatavariable pricer data

Definition at line 5439 of file scip.c.

References checkStage(), FALSE, Scip::mem, Scip::messagehdlr, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPerrorMessage, SCIPfindPricer(), SCIPpricerCreate(), SCIPsetIncludePricer(), Scip::set, SCIP_Mem::setmem, and TRUE.

Referenced by SCIPincludeObjPricer().

◆ SCIPincludePricerBasic()

SCIP_RETCODE SCIPincludePricerBasic ( SCIP scip,
SCIP_PRICER **  pricerptr,
const char *  name,
const char *  desc,
int  priority,
SCIP_Bool  delay,
SCIP_DECL_PRICERREDCOST((*pricerredcost))  ,
SCIP_DECL_PRICERFARKAS((*pricerfarkas))  ,
SCIP_PRICERDATA pricerdata 
)

creates a variable pricer and includes it in SCIP with all non-fundamental callbacks set to NULL; if needed, these can be added afterwards via setter functions SCIPsetPricerCopy(), SCIPsetPricerFree(), SCIPsetPricerInity(), SCIPsetPricerExit(), SCIPsetPricerInitsol(), SCIPsetPricerExitsol(), SCIPsetPricerFarkas();

To use the variable pricer for solving a problem, it first has to be activated with a call to SCIPactivatePricer(). This should be done during the problem creation stage.

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Note
if you want to set all callbacks with a single method call, consider using SCIPincludePricer() instead
Parameters
scipSCIP data structure
pricerptrreference to a pricer, or NULL
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? if this is set to FALSE it may happen that the pricer produces columns that already exist in the problem (which are also priced in by the default problem variable pricing in the same round)
pricerdatavariable pricer data

Definition at line 5497 of file scip.c.

References checkStage(), FALSE, Scip::mem, Scip::messagehdlr, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPerrorMessage, SCIPfindPricer(), SCIPpricerCreate(), SCIPsetIncludePricer(), Scip::set, SCIP_Mem::setmem, and TRUE.

Referenced by SCIPincludePricerBinpacking().

◆ SCIPsetPricerCopy()

SCIP_RETCODE SCIPsetPricerCopy ( SCIP scip,
SCIP_PRICER pricer,
SCIP_DECL_PRICERCOPY((*pricercopy))   
)

sets copy method of pricer

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
pricerpricer

Definition at line 5545 of file scip.c.

References checkStage(), FALSE, SCIP_CALL, SCIP_OKAY, SCIPpricerSetCopy(), and TRUE.

◆ SCIPsetPricerFree()

SCIP_RETCODE SCIPsetPricerFree ( SCIP scip,
SCIP_PRICER pricer,
SCIP_DECL_PRICERFREE((*pricerfree))   
)

sets destructor method of pricer

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
pricerpricer

Definition at line 5569 of file scip.c.

References checkStage(), FALSE, SCIP_CALL, SCIP_OKAY, SCIPpricerSetFree(), and TRUE.

Referenced by SCIPincludePricerBinpacking().

◆ SCIPsetPricerInit()

SCIP_RETCODE SCIPsetPricerInit ( SCIP scip,
SCIP_PRICER pricer,
SCIP_DECL_PRICERINIT((*pricerinit))   
)

sets initialization method of pricer

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
pricerpricer

Definition at line 5593 of file scip.c.

References checkStage(), FALSE, SCIP_CALL, SCIP_OKAY, SCIPpricerSetInit(), and TRUE.

Referenced by SCIPincludePricerBinpacking().

◆ SCIPsetPricerExit()

SCIP_RETCODE SCIPsetPricerExit ( SCIP scip,
SCIP_PRICER pricer,
SCIP_DECL_PRICEREXIT((*pricerexit))   
)

sets deinitialization method of pricer

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
pricerpricer

Definition at line 5617 of file scip.c.

References checkStage(), FALSE, SCIP_CALL, SCIP_OKAY, SCIPpricerSetExit(), and TRUE.

◆ SCIPsetPricerInitsol()

SCIP_RETCODE SCIPsetPricerInitsol ( SCIP scip,
SCIP_PRICER pricer,
SCIP_DECL_PRICERINITSOL((*pricerinitsol))   
)

sets solving process initialization method of pricer

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
pricerpricer

Definition at line 5641 of file scip.c.

References checkStage(), FALSE, SCIP_CALL, SCIP_OKAY, SCIPpricerSetInitsol(), and TRUE.

◆ SCIPsetPricerExitsol()

SCIP_RETCODE SCIPsetPricerExitsol ( SCIP scip,
SCIP_PRICER pricer,
SCIP_DECL_PRICEREXITSOL((*pricerexitsol))   
)

sets solving process deinitialization method of pricer

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
pricerpricer

Definition at line 5665 of file scip.c.

References checkStage(), FALSE, SCIP_CALL, SCIP_OKAY, SCIPpricerSetExitsol(), and TRUE.

Referenced by SCIPincludePricerBinpacking().

◆ SCIPfindPricer()

SCIP_PRICER* SCIPfindPricer ( SCIP scip,
const char *  name 
)

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

Parameters
scipSCIP data structure
namename of variable pricer

Definition at line 5681 of file scip.c.

References SCIPsetFindPricer(), and Scip::set.

Referenced by SCIPfindObjPricer(), SCIPincludePricer(), SCIPincludePricerBasic(), and SCIPpricerBinpackingActivate().

◆ SCIPgetPricers()

SCIP_PRICER** SCIPgetPricers ( SCIP scip)

returns the array of currently available variable pricers; active pricers are in the first slots of the array

Parameters
scipSCIP data structure

Definition at line 5694 of file scip.c.

References SCIP_Set::pricers, SCIPsetSortPricers(), and Scip::set.

Referenced by SCIP_DECL_DIALOGEXEC(), SCIPincludeDialogDefaultFix(), and SCIPincludeDialogDefaultSet().

◆ SCIPgetNPricers()

int SCIPgetNPricers ( SCIP scip)

returns the number of currently available variable pricers

Parameters
scipSCIP data structure

Definition at line 5707 of file scip.c.

References SCIP_Set::npricers, and Scip::set.

Referenced by SCIP_DECL_DIALOGEXEC(), SCIPincludeDialogDefaultFix(), and SCIPincludeDialogDefaultSet().

◆ SCIPgetNActivePricers()

int SCIPgetNActivePricers ( SCIP scip)

returns the number of currently active variable pricers, that are used in the LP solving loop

Parameters
scipSCIP data structure

Definition at line 5718 of file scip.c.

References SCIP_Set::nactivepricers, and Scip::set.

Referenced by determineSymmetry(), doCopy(), SCIP_DECL_BRANCHEXECLP(), SCIP_DECL_CONSPRESOL(), SCIP_DECL_CONSPROP(), SCIP_DECL_PRESOLEXEC(), and SCIPapplyHeurSubNlp().

◆ SCIPsetPricerPriority()

SCIP_RETCODE SCIPsetPricerPriority ( SCIP scip,
SCIP_PRICER pricer,
int  priority 
)

sets the priority of a variable pricer

sets the priority priority of a variable pricer

Parameters
scipSCIP data structure
pricervariable pricer
prioritynew priority of the variable pricer

Definition at line 5729 of file scip.c.

References SCIP_OKAY, SCIPpricerSetPriority(), and Scip::set.

Referenced by SCIP_DECL_PARAMCHGD().

◆ SCIPactivatePricer()

SCIP_RETCODE SCIPactivatePricer ( SCIP scip,
SCIP_PRICER pricer 
)

activates pricer to be used for the current problem This method should be called during the problem creation stage for all pricers that are necessary to solve the problem model. The pricers are automatically deactivated when the problem is freed.

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
pricervariable pricer

Definition at line 5754 of file scip.c.

References checkStage(), FALSE, SCIP_CALL, SCIP_OKAY, SCIPpricerActivate(), Scip::set, and TRUE.

Referenced by SCIPpricerBinpackingActivate(), and SCIPsetEnableOrDisablePluginClocks().

◆ SCIPdeactivatePricer()

SCIP_RETCODE SCIPdeactivatePricer ( SCIP scip,
SCIP_PRICER pricer 
)

deactivates pricer

Returns
SCIP_OKAY is returned if everything worked. Otherwise a suitable error code is passed. See SCIP_RETCODE for a complete list of error codes.
Precondition
This method can be called if SCIP is in one of the following stages:
Parameters
scipSCIP data structure
pricervariable pricer

Definition at line 5775 of file scip.c.

References checkStage(), FALSE, SCIP_CALL, SCIP_OKAY, SCIPpricerDeactivate(), Scip::set, and TRUE.