Scippy

GCG

Branch-and-Price & Column Generation for Everyone

pricingcb.h File Reference

Detailed Description

internal methods for the pricing callback

Author
Stephen J. Maher

Definition in file pricingcb.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 "gcg/type_pricingcb.h"
#include "gcg/pub_pricingcb.h"

Go to the source code of this file.

Functions

SCIP_RETCODE GCGpricingcbCreate (GCG *gcg, GCG_PRICINGCB **pricingcb, const char *name, const char *desc, int priority, GCG_DECL_PRICINGCBFREE((*pricingcbfree)), GCG_DECL_PRICINGCBINIT((*pricingcbinit)), GCG_DECL_PRICINGCBEXIT((*pricingcbexit)), GCG_DECL_PRICINGCBINITSOL((*pricingcbinitsol)), GCG_DECL_PRICINGCBEXITSOL((*pricingcbexitsol)), GCG_DECL_PRICINGCBPREPRICING((*pricingcbprepricing)), GCG_DECL_PRICINGCBPOSTPRICING((*pricingcbpostpricing)), GCG_PRICINGCBDATA *pricingcbdata)
 
SCIP_RETCODE GCGpricingcbFree (GCG *gcg, GCG_PRICINGCB **pricingcb)
 
SCIP_RETCODE GCGpricingcbInit (GCG *gcg, GCG_PRICINGCB *pricingcb)
 
SCIP_RETCODE GCGpricingcbExit (GCG *gcg, GCG_PRICINGCB *pricingcb)
 
SCIP_RETCODE GCGpricingcbInitsol (GCG *gcg, GCG_PRICINGCB *pricingcb)
 
SCIP_RETCODE GCGpricingcbExitsol (GCG *gcg, GCG_PRICINGCB *pricingcb)
 
SCIP_RETCODE GCGpricingcbPrepricing (GCG *gcg, GCG_PRICINGCB *pricingcb, SCIP_PRICER *pricer, GCG_PRICETYPE type, SCIP_Bool *abort, SCIP_RESULT *result)
 
SCIP_RETCODE GCGpricingcbPostpricing (GCG *gcg, GCG_PRICINGCB *pricingcb, SCIP_PRICER *pricer, GCG_PRICETYPE type, SCIP_RESULT *result)
 
void GCGpricingcbSetPriority (GCG_PRICINGCB *pricingcb, int priority)
 
void GCGpricingcbSetFree (GCG_PRICINGCB *pricingcb, GCG_DECL_PRICINGCBFREE((*pricingcbfree)))
 
void GCGpricingcbSetInit (GCG_PRICINGCB *pricingcb, GCG_DECL_PRICINGCBINIT((*pricingcbinit)))
 
void GCGpricingcbSetExit (GCG_PRICINGCB *pricingcb, GCG_DECL_PRICINGCBEXIT((*pricingcbexit)))
 
void GCGpricingcbSetInitsol (GCG_PRICINGCB *pricingcb, GCG_DECL_PRICINGCBINITSOL((*pricingcbinitsol)))
 
void GCGpricingcbSetExitsol (GCG_PRICINGCB *pricingcb, GCG_DECL_PRICINGCBEXITSOL((*pricingcbexitsol)))
 

Function Documentation

◆ GCGpricingcbCreate()

SCIP_RETCODE GCGpricingcbCreate ( GCG *  gcg,
GCG_PRICINGCB **  pricingcb,
const char *  name,
const char *  desc,
int  priority,
GCG_DECL_PRICINGCBFREE((*pricingcbfree))  ,
GCG_DECL_PRICINGCBINIT((*pricingcbinit))  ,
GCG_DECL_PRICINGCBEXIT((*pricingcbexit))  ,
GCG_DECL_PRICINGCBINITSOL((*pricingcbinitsol))  ,
GCG_DECL_PRICINGCBEXITSOL((*pricingcbexitsol))  ,
GCG_DECL_PRICINGCBPREPRICING((*pricingcbprepricing))  ,
GCG_DECL_PRICINGCBPOSTPRICING((*pricingcbpostpricing))  ,
GCG_PRICINGCBDATA *  pricingcbdata 
)

creates a pricing callback

Parameters
gcgGCG data structure
pricingcbpointer to the pricing callback data structure
namename of the pricing callback
descdescription of the pricing callback
prioritypriority of the the pricing callback
pricingcbdatapricing callback data

Definition at line 137 of file pricingcb.c.

References doPricingcbCreate(), GCGgetMasterprob(), GCGpricingcbFree(), NULL, SCIP_CALL_FINALLY, and SCIP_OKAY.

Referenced by GCGpricerIncludePricingcb().

◆ GCGpricingcbFree()

SCIP_RETCODE GCGpricingcbFree ( GCG *  gcg,
GCG_PRICINGCB **  pricingcb 
)

calls destructor and frees memory of the pricing callback

Parameters
gcgGCG data structure
pricingcbpointer to the pricing callback data structure

Definition at line 168 of file pricingcb.c.

References BMSfreeMemory, BMSfreeMemoryArray, GCGgetMasterprob(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPfreeClock().

Referenced by GCGpricingcbCreate().

◆ GCGpricingcbInit()

SCIP_RETCODE GCGpricingcbInit ( GCG *  gcg,
GCG_PRICINGCB *  pricingcb 
)

initializes the pricing callback

Parameters
gcgGCG data structure
pricingcbpricing callback

Definition at line 196 of file pricingcb.c.

References GCGgetMasterprob(), GCG_Pricingcb::npostpricingcalls, GCG_Pricingcb::nprepricingcalls, NULL, GCG_Pricingcb::pricingcbclock, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIPgetBoolParam(), SCIPresetClock(), SCIPstartClock(), SCIPstopClock(), and GCG_Pricingcb::setuptime.

◆ GCGpricingcbExit()

SCIP_RETCODE GCGpricingcbExit ( GCG *  gcg,
GCG_PRICINGCB *  pricingcb 
)

calls exit method of the pricing callback

Parameters
gcgGCG data structure
pricingcbpricing callback

Definition at line 234 of file pricingcb.c.

References GCGgetMasterprob(), NULL, SCIP_CALL, SCIP_OKAY, SCIPstartClock(), SCIPstopClock(), and GCG_Pricingcb::setuptime.

◆ GCGpricingcbInitsol()

SCIP_RETCODE GCGpricingcbInitsol ( GCG *  gcg,
GCG_PRICINGCB *  pricingcb 
)

informs the pricing callback that the branch and bound process is being started

informs pricing callback that the branch and bound process is being started

Parameters
gcgGCG data structure
pricingcbpricing callback

Definition at line 260 of file pricingcb.c.

References GCGgetMasterprob(), NULL, SCIP_CALL, SCIP_OKAY, SCIPstartClock(), SCIPstopClock(), and GCG_Pricingcb::setuptime.

◆ GCGpricingcbExitsol()

SCIP_RETCODE GCGpricingcbExitsol ( GCG *  gcg,
GCG_PRICINGCB *  pricingcb 
)

informs the pricing callback that the branch and bound process data is being freed

informs pricing callback that the branch and bound process data is being freed

Parameters
gcgGCG data structure
pricingcbpricing callback

Definition at line 287 of file pricingcb.c.

References GCGgetMasterprob(), NULL, SCIP_CALL, SCIP_OKAY, SCIPstartClock(), SCIPstopClock(), and GCG_Pricingcb::setuptime.

◆ GCGpricingcbPrepricing()

SCIP_RETCODE GCGpricingcbPrepricing ( GCG *  gcg,
GCG_PRICINGCB *  pricingcb,
SCIP_PRICER *  pricer,
GCG_PRICETYPE  type,
SCIP_Bool *  abort,
SCIP_RESULT *  result 
)

calls pre-pricing method of the pricing callback

Parameters
gcgGCG data structure
pricingcbpricing callback
pricerthe pricer
typethe type of pricing, either redcost or farkas
abortshould the pricing be aborted?
resultpointer to store the result of the callback method

Definition at line 314 of file pricingcb.c.

References GCG_Pricingcb::enabled, FALSE, GCGgetMasterprob(), GCG_Pricingcb::name, GCG_Pricingcb::nprepricingcalls, NULL, GCG_Pricingcb::pricingcbclock, SCIP_CALL, SCIP_DIDNOTRUN, SCIP_INVALIDRESULT, SCIP_OKAY, SCIP_SUCCESS, SCIPdebugMsg, SCIPerrorMessage, SCIPstartClock(), and SCIPstopClock().

◆ GCGpricingcbPostpricing()

SCIP_RETCODE GCGpricingcbPostpricing ( GCG *  gcg,
GCG_PRICINGCB *  pricingcb,
SCIP_PRICER *  pricer,
GCG_PRICETYPE  type,
SCIP_RESULT *  result 
)

calls post-pricing method of the pricing callback

Parameters
gcgGCG data structure
pricingcbpricing callback
pricerthe pricer
typethe type of pricing, either redcost or farkas
resultpointer to store the result of the callback method

Definition at line 363 of file pricingcb.c.

References GCG_Pricingcb::enabled, GCGgetMasterprob(), GCG_Pricingcb::name, GCG_Pricingcb::npostpricingcalls, NULL, GCG_Pricingcb::pricingcbclock, SCIP_CALL, SCIP_DIDNOTRUN, SCIP_INVALIDRESULT, SCIP_OKAY, SCIP_SUCCESS, SCIPdebugMsg, SCIPerrorMessage, SCIPstartClock(), and SCIPstopClock().

◆ GCGpricingcbSetPriority()

void GCGpricingcbSetPriority ( GCG_PRICINGCB *  pricingcb,
int  priority 
)

sets priority of the pricing callback

Parameters
pricingcbpricing callback
prioritynew priority of the pricing callback

Definition at line 433 of file pricingcb.c.

References NULL, and GCG_Pricingcb::priority.

◆ GCGpricingcbSetFree()

void GCGpricingcbSetFree ( GCG_PRICINGCB *  pricingcb,
GCG_DECL_PRICINGCBFREE((*pricingcbfree))   
)

sets destructor callback of the pricing callback

Parameters
pricingcbpricing callback

Definition at line 443 of file pricingcb.c.

References NULL.

◆ GCGpricingcbSetInit()

void GCGpricingcbSetInit ( GCG_PRICINGCB *  pricingcb,
GCG_DECL_PRICINGCBINIT((*pricingcbinit))   
)

sets initialization callback of the pricing callback

Parameters
pricingcbpricing callback

Definition at line 454 of file pricingcb.c.

References NULL.

◆ GCGpricingcbSetExit()

void GCGpricingcbSetExit ( GCG_PRICINGCB *  pricingcb,
GCG_DECL_PRICINGCBEXIT((*pricingcbexit))   
)

sets deinitialization callback of the pricing callback

Parameters
pricingcbpricing callback

Definition at line 465 of file pricingcb.c.

References NULL.

◆ GCGpricingcbSetInitsol()

void GCGpricingcbSetInitsol ( GCG_PRICINGCB *  pricingcb,
GCG_DECL_PRICINGCBINITSOL((*pricingcbinitsol))   
)

sets solving process initialization callback of the pricing callback

Parameters
pricingcbpricing callback

Definition at line 476 of file pricingcb.c.

References NULL.

◆ GCGpricingcbSetExitsol()

void GCGpricingcbSetExitsol ( GCG_PRICINGCB *  pricingcb,
GCG_DECL_PRICINGCBEXITSOL((*pricingcbexitsol))   
)

sets solving process deinitialization callback of the pricing callback

sets solving process deinitialization callback of pricing callback

Parameters
pricingcbpricing callback

Definition at line 487 of file pricingcb.c.

References NULL.