Detailed Description
methods to include and access pricer plugins of SCIP
Function Documentation
◆ SCIP_DECL_SORTPTRCOMP() [1/2]
SCIP_DECL_SORTPTRCOMP | ( | SCIPpricerComp | ) |
◆ 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()
SCIP_PRICERDATA* SCIPpricerGetData | ( | SCIP_PRICER * | pricer | ) |
gets user data of variable pricer
- Parameters
-
pricer variable pricer
Definition at line 501 of file pricer.c.
References NULL, and SCIP_Pricer::pricerdata.
Referenced by pricing(), SCIP_DECL_PRICERCOPY(), SCIP_DECL_PRICEREXIT(), SCIP_DECL_PRICEREXITSOL(), SCIP_DECL_PRICERFARKAS(), SCIP_DECL_PRICERFREE(), SCIP_DECL_PRICERINIT(), SCIP_DECL_PRICERINITSOL(), SCIP_DECL_PRICERREDCOST(), SCIPfindObjPricer(), SCIPgetObjPricer(), and SCIPpricerBinpackingActivate().
◆ SCIPpricerSetData()
void SCIPpricerSetData | ( | SCIP_PRICER * | pricer, |
SCIP_PRICERDATA * | pricerdata | ||
) |
sets user data of variable pricer; user has to free old data in advance!
- Parameters
-
pricer variable pricer pricerdata new variable pricer user data
Definition at line 511 of file pricer.c.
References NULL, and SCIP_Pricer::pricerdata.
Referenced by SCIP_DECL_PRICERFREE().
◆ SCIPpricerGetName()
const char* SCIPpricerGetName | ( | SCIP_PRICER * | pricer | ) |
gets name of variable pricer
- Parameters
-
pricer variable pricer
Definition at line 588 of file pricer.c.
References SCIP_Pricer::name, and NULL.
Referenced by SCIP_DECL_DIALOGEXEC(), SCIP_DECL_PRICERCOPY(), SCIP_DECL_SORTPTRCOMP(), SCIPincludeDialogDefaultFix(), SCIPincludeDialogDefaultSet(), SCIPpriceLoop(), SCIPpricerCopyInclude(), SCIPprintPricerStatistics(), and SCIPsetIncludeReader().
◆ SCIPpricerGetDesc()
const char* SCIPpricerGetDesc | ( | SCIP_PRICER * | pricer | ) |
gets description of variable pricer
- Parameters
-
pricer variable pricer
Definition at line 598 of file pricer.c.
References SCIP_Pricer::desc, and NULL.
Referenced by SCIP_DECL_DIALOGEXEC(), SCIPincludeDialogDefaultFix(), and SCIPincludeDialogDefaultSet().
◆ SCIPpricerGetPriority()
int SCIPpricerGetPriority | ( | SCIP_PRICER * | pricer | ) |
gets priority of variable pricer
- Parameters
-
pricer variable pricer
Definition at line 608 of file pricer.c.
References NULL, and 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
-
pricer variable pricer
Definition at line 632 of file pricer.c.
References SCIP_Pricer::ncalls, and NULL.
Referenced by SCIPprintPricerStatistics().
◆ SCIPpricerGetNVarsFound()
int SCIPpricerGetNVarsFound | ( | SCIP_PRICER * | pricer | ) |
gets the number of variables with negative reduced costs found by this pricer
- Parameters
-
pricer variable pricer
Definition at line 642 of file pricer.c.
References NULL, and 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
-
pricer variable pricer
Definition at line 652 of file pricer.c.
References NULL, SCIPclockGetTime(), and SCIP_Pricer::setuptime.
Referenced by SCIPprintPricerStatistics().
◆ SCIPpricerGetTime()
SCIP_Real SCIPpricerGetTime | ( | SCIP_PRICER * | pricer | ) |
gets time in seconds used in this pricer
- Parameters
-
pricer variable pricer
Definition at line 662 of file pricer.c.
References NULL, 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
-
pricer variable pricer
Definition at line 684 of file pricer.c.
References SCIP_Pricer::active, and NULL.
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
-
pricer variable pricer
Definition at line 694 of file pricer.c.
References SCIP_Pricer::delay, and NULL.
Referenced by SCIP_DECL_DIALOGEXEC().
◆ SCIPpricerIsInitialized()
SCIP_Bool SCIPpricerIsInitialized | ( | SCIP_PRICER * | pricer | ) |
is variable pricer initialized?
- Parameters
-
pricer variable pricer
Definition at line 704 of file pricer.c.
References SCIP_Pricer::initialized, and NULL.
◆ 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
-
scip SCIP data structure name name of variable pricer desc description of variable pricer priority priority of the variable pricer delay should 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) pricerdata variable pricer data
Definition at line 139 of file scip_pricer.c.
References FALSE, Scip::mem, Scip::messagehdlr, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPcheckStage(), 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
-
scip SCIP data structure pricerptr reference to a pricer, or NULL name name of variable pricer desc description of variable pricer priority priority of the variable pricer delay should 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) pricerdata variable pricer data
Definition at line 197 of file scip_pricer.c.
References FALSE, Scip::mem, Scip::messagehdlr, NULL, SCIP_CALL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPcheckStage(), SCIPerrorMessage, SCIPfindPricer(), SCIPpricerCreate(), SCIPsetIncludePricer(), Scip::set, SCIP_Mem::setmem, and TRUE.
Referenced by SCIPincludePricerBinpacking(), SCIPincludePricerColoring(), SCIPincludePricerRpa(), and SCIPincludePricerStp().
◆ 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
-
scip SCIP data structure pricer pricer
Definition at line 245 of file scip_pricer.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPpricerSetCopy(), and TRUE.
Referenced by SCIPincludePricerColoring(), and SCIPincludePricerStp().
◆ 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
-
scip SCIP data structure pricer pricer
Definition at line 269 of file scip_pricer.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPpricerSetFree(), and TRUE.
Referenced by SCIPincludePricerBinpacking(), SCIPincludePricerColoring(), SCIPincludePricerRpa(), and SCIPincludePricerStp().
◆ 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
-
scip SCIP data structure pricer pricer
Definition at line 293 of file scip_pricer.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPpricerSetInit(), and TRUE.
Referenced by SCIPincludePricerBinpacking(), SCIPincludePricerRpa(), and SCIPincludePricerStp().
◆ 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
-
scip SCIP data structure pricer pricer
Definition at line 317 of file scip_pricer.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPpricerSetExit(), and TRUE.
Referenced by SCIPincludePricerRpa().
◆ 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
-
scip SCIP data structure pricer pricer
Definition at line 341 of file scip_pricer.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPpricerSetInitsol(), and TRUE.
Referenced by SCIPincludePricerColoring(), and SCIPincludePricerStp().
◆ 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
-
scip SCIP data structure pricer pricer
Definition at line 365 of file scip_pricer.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPpricerSetExitsol(), and TRUE.
Referenced by SCIPincludePricerBinpacking(), SCIPincludePricerColoring(), and SCIPincludePricerStp().
◆ SCIPfindPricer()
SCIP_PRICER* SCIPfindPricer | ( | SCIP * | scip, |
const char * | name | ||
) |
returns the variable pricer of the given name, or NULL if not existing
- Parameters
-
scip SCIP data structure name name of variable pricer
Definition at line 381 of file scip_pricer.c.
References NULL, SCIPsetFindPricer(), and Scip::set.
Referenced by execmain(), readCol(), SCIP_DECL_READERREAD(), SCIPfindObjPricer(), SCIPincludePricer(), SCIPincludePricerBasic(), SCIPpricerBinpackingActivate(), and SCIPpricerRpaActivate().
◆ 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
-
scip SCIP data structure
Definition at line 394 of file scip_pricer.c.
References NULL, 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
-
scip SCIP data structure
Definition at line 407 of file scip_pricer.c.
References SCIP_Set::npricers, NULL, 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
-
scip SCIP data structure
Definition at line 418 of file scip_pricer.c.
References SCIP_Set::nactivepricers, NULL, 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
-
scip SCIP data structure pricer variable pricer priority new priority of the variable pricer
Definition at line 429 of file scip_pricer.c.
References NULL, 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
-
scip SCIP data structure pricer variable pricer
Definition at line 454 of file scip_pricer.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPpricerActivate(), Scip::set, and TRUE.
Referenced by execmain(), readCol(), SCIP_DECL_READERREAD(), SCIPpricerBinpackingActivate(), SCIPpricerRpaActivate(), 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
-
scip SCIP data structure pricer variable pricer
Definition at line 475 of file scip_pricer.c.
References FALSE, SCIP_CALL, SCIP_OKAY, SCIPcheckStage(), SCIPpricerDeactivate(), Scip::set, and TRUE.