GCG 4.1.1 (dev)

Generic Column Generation

Loading...
Searching...
No Matches
heur_ipcolgen.c File Reference

Detailed Description

The integer programming column generation heuristic.

Author
Stephen J. Maher

Definition in file heur_ipcolgen.c.

#include <assert.h>
#include <string.h>
#include "gcg/heur_ipcolgen.h"
#include "gcg/gcg.h"
#include "gcg/pricer_gcg.h"
#include "gcg/scip_misc.h"
#include "scip/scipdefplugins.h"
#include "scip/scip_event.h"

Go to the source code of this file.

Data Structures

struct  SCIP_HeurData

Macros

#define HEUR_NAME   "ipcolgen"
#define HEUR_DESC   "A destroy and repair heuristic for the master problem that uses a modified pricing problem"
#define HEUR_DISPCHAR   'I'
#define HEUR_PRIORITY   -1110000
#define HEUR_FREQ   -1
#define HEUR_FREQOFS   0
#define HEUR_MAXDEPTH   -1
#define HEUR_TIMING   SCIP_HEURTIMING_DURINGLPLOOP | SCIP_HEURTIMING_DURINGPRICINGLOOP | SCIP_HEURTIMING_AFTERNODE
#define HEUR_USESSUBSCIP   TRUE
#define DEFAULT_MAXNODES   5000LL
#define DEFAULT_MINFIXINGRATE   0.2
#define DEFAULT_MINIMPROVE   0.01
#define DEFAULT_MINNODES   50LL
#define DEFAULT_NODESOFS   500LL
#define DEFAULT_NODESQUOT   0.5
#define DEFAULT_LPLIMFAC   2.0
#define DEFAULT_USELPROWS   FALSE
#define DEFAULT_COPYCUTS   TRUE
#define DEFAULT_SOLVEAUXPROB   TRUE
#define DEFAULT_DUALWEIGHT   0.25
#define DEFAULT_INITDYNAMICPEN   0.1
#define DEFAULT_BIGM   1234.56
#define DEFAULT_WAITNEWSOL   TRUE
#define DEFAULT_MININITIALGAP   0.5
#define DEFAULT_CALLSPERNODE   4
#define DEFAULT_MAXITER   10
#define DEFAULT_NOIMPROVEITER   3
#define DEFAULT_RINSFIXING   FALSE
#define DEFAULT_RANDSEED   31
#define DEFAULT_ARRAYSIZE   100
#define PREVLPOBJSIZE   5
#define EVENTHDLR_NAME   "IPColGen"
#define EVENTHDLR_DESC   "LP event handler for " HEUR_NAME " heuristic"
#define PRICINGCB_NAME   "IPColGen"
#define PRICINGCB_DESC   "pre- and post-pricing methods for adding relaxation and dual weights to the pricing problem objective"
#define PRICINGCB_PRIORITY   1000000
#define PRICINGCB_EXCLUSIVE   TRUE
#define heurCopyIPcolgen   NULL
#define heurInitsolIPcolgen   NULL
#define heurExitsolIPcolgen   NULL

Functions

static SCIP_DECL_EVENTEXEC (eventExecIpcolgen)
static SCIP_RETCODE createStartSolution (GCG *gcg, SCIP_SOL *startsol, SCIP_Bool *success)
static SCIP_RETCODE createPartialSolution (SCIP *scip, SCIP_SOL *partialsol, SCIP_RANDNUMGEN *randnumgen, SCIP_Real minfixingrate, int nblocks, int *nfixedvars, SCIP_Bool *success)
static SCIP_RETCODE addPenalty (SCIP *scip, SCIP_Real addpenalty, int addpenaltyid, IPC_PENALTYTYPE addpenaltytype, SCIP_Real **penalties, int **penaltiesids, IPC_PENALTYTYPE **penaltytypes, int *npenalties, int *penaltiessize)
static SCIP_HEURCONSTYPE getConstraintType (SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE computeDynamicPenalties (GCG *gcg, SCIP_SOL *sol, SCIP_Real initdynamicpen, SCIP_Real **penalties, int **penaltiesids, IPC_PENALTYTYPE **penaltytypes, int *npenalties, int *penaltiessize, SCIP_Bool repairsol)
static SCIP_RETCODE adjustDynamicPenalties (GCG *gcg, SCIP_HEURDATA *heurdata)
static GCG_DECL_PRICINGCBPREPRICING (pricingcbPrepricingIpcolgen)
static GCG_DECL_PRICINGCBPOSTPRICING (pricingcbPostpricingIpcolgen)
static SCIP_RETCODE performWeightedPricing (GCG *gcg, SCIP_HEURDATA *heurdata, int nblocks)
static SCIP_RETCODE destroyAndRepairSolution (GCG *gcg, SCIP_HEURDATA *heurdata, SCIP_SOL *partialsol, int npricingprobs, SCIP_Bool *terminate)
static SCIP_RETCODE createRepairProblem (SCIP *scip, SCIP **repairprob, SCIP_HEURDATA *heurdata, SCIP_VAR **repairprobvars)
static SCIP_RETCODE setupRepairProblem (SCIP *scip, SCIP *repairprob, SCIP_VAR **repairprobvars, SCIP_SOL *sol, SCIP_Bool uselprows, SCIP_Bool rinsfixing)
static SCIP_RETCODE createNewSol (GCG *gcg, SCIP *repairprob, SCIP_VAR **repairprobvars, SCIP_HEUR *heur, SCIP_SOL *repairprobsol, SCIP_Bool *success)
static SCIP_RETCODE solveRepairProblem (GCG *gcg, SCIP *repairprob, SCIP_HEUR *heur, SCIP_HEURDATA *heurdata, SCIP_VAR **repairprobvars, SCIP_Longint nnodes, SCIP_RESULT *result)
static SCIP_RETCODE executeHeuristic (GCG *gcg, SCIP_HEURDATA *heurdata, SCIP_Bool *execute)
static SCIP_DECL_HEURFREE (heurFreeIPcolgen)
static SCIP_DECL_HEURINIT (heurInitIPcolgen)
static SCIP_DECL_HEUREXIT (heurExitIPcolgen)
static SCIP_DECL_HEUREXEC (heurExecIPcolgen)
SCIP_RETCODE SCIPincludeHeurIPcolgen (GCG *gcg)

Macro Definition Documentation

◆ HEUR_NAME

#define HEUR_NAME   "ipcolgen"

Definition at line 47 of file heur_ipcolgen.c.

◆ HEUR_DESC

#define HEUR_DESC   "A destroy and repair heuristic for the master problem that uses a modified pricing problem"

Definition at line 48 of file heur_ipcolgen.c.

◆ HEUR_DISPCHAR

#define HEUR_DISPCHAR   'I'

Definition at line 49 of file heur_ipcolgen.c.

◆ HEUR_PRIORITY

#define HEUR_PRIORITY   -1110000

Definition at line 50 of file heur_ipcolgen.c.

◆ HEUR_FREQ

#define HEUR_FREQ   -1

experiments shows that the best frequency is 5

Definition at line 51 of file heur_ipcolgen.c.

◆ HEUR_FREQOFS

#define HEUR_FREQOFS   0

Definition at line 52 of file heur_ipcolgen.c.

◆ HEUR_MAXDEPTH

#define HEUR_MAXDEPTH   -1

Definition at line 53 of file heur_ipcolgen.c.

◆ HEUR_TIMING

◆ HEUR_USESSUBSCIP

#define HEUR_USESSUBSCIP   TRUE

Definition at line 55 of file heur_ipcolgen.c.

◆ DEFAULT_MAXNODES

#define DEFAULT_MAXNODES   5000LL

maximum number of nodes to regard in the repair problem

Definition at line 57 of file heur_ipcolgen.c.

◆ DEFAULT_MINFIXINGRATE

#define DEFAULT_MINFIXINGRATE   0.2

minimum percentage of integer variables that have to be fixed

Definition at line 58 of file heur_ipcolgen.c.

◆ DEFAULT_MINIMPROVE

#define DEFAULT_MINIMPROVE   0.01

factor by which restricted master should at least improve the incumbent

Definition at line 59 of file heur_ipcolgen.c.

◆ DEFAULT_MINNODES

#define DEFAULT_MINNODES   50LL

minimum number of nodes to regard in the repair problem

Definition at line 60 of file heur_ipcolgen.c.

◆ DEFAULT_NODESOFS

#define DEFAULT_NODESOFS   500LL

number of nodes added to the contingent of the total nodes

Definition at line 61 of file heur_ipcolgen.c.

◆ DEFAULT_NODESQUOT

#define DEFAULT_NODESQUOT   0.5

repair problem nodes in relation to nodes of the original problem

Definition at line 62 of file heur_ipcolgen.c.

◆ DEFAULT_LPLIMFAC

#define DEFAULT_LPLIMFAC   2.0

Definition at line 63 of file heur_ipcolgen.c.

Referenced by SCIPincludeHeurIPcolgen().

◆ DEFAULT_USELPROWS

#define DEFAULT_USELPROWS   FALSE

should repair problem be created out of the rows in the LP rows, otherwise, the copy constructor of the constraints handlers are used

Definition at line 64 of file heur_ipcolgen.c.

◆ DEFAULT_COPYCUTS

#define DEFAULT_COPYCUTS   TRUE

if DEFAULT_USELPROWS is FALSE, then should all active cuts from the cutpool of the original scip be copied to constraints of the subscip

Definition at line 66 of file heur_ipcolgen.c.

◆ DEFAULT_SOLVEAUXPROB

#define DEFAULT_SOLVEAUXPROB   TRUE

should an auxiliary problem be solved to find improving solutions

Definition at line 68 of file heur_ipcolgen.c.

Referenced by SCIPincludeHeurIPcolgen().

◆ DEFAULT_DUALWEIGHT

#define DEFAULT_DUALWEIGHT   0.25

the default value for the dual weight in the pricing objective

Definition at line 69 of file heur_ipcolgen.c.

Referenced by SCIPincludeHeurIPcolgen().

◆ DEFAULT_INITDYNAMICPEN

#define DEFAULT_INITDYNAMICPEN   0.1

the default value for the initial dynamic penalty for the pricing objective

Definition at line 70 of file heur_ipcolgen.c.

Referenced by SCIPincludeHeurIPcolgen().

◆ DEFAULT_BIGM

#define DEFAULT_BIGM   1234.56

the big-M penalty for the pricing objective

Definition at line 71 of file heur_ipcolgen.c.

Referenced by computeDynamicPenalties().

◆ DEFAULT_WAITNEWSOL

#define DEFAULT_WAITNEWSOL   TRUE

should the heuristic wait until a new solution is found before executing

Definition at line 72 of file heur_ipcolgen.c.

Referenced by SCIPincludeHeurIPcolgen().

◆ DEFAULT_MININITIALGAP

#define DEFAULT_MININITIALGAP   0.5

the minimum optimality gap necessary prior to the first call of the heuristic. The results from the paper show that this could be reduced to 0.25

Definition at line 73 of file heur_ipcolgen.c.

Referenced by SCIPincludeHeurIPcolgen().

◆ DEFAULT_CALLSPERNODE

#define DEFAULT_CALLSPERNODE   4

the number of times that the heuristic is called per node

Definition at line 75 of file heur_ipcolgen.c.

Referenced by SCIPincludeHeurIPcolgen().

◆ DEFAULT_MAXITER

#define DEFAULT_MAXITER   10

the maximum number of weighted pricing iterations

Definition at line 76 of file heur_ipcolgen.c.

Referenced by SCIPincludeHeurIPcolgen().

◆ DEFAULT_NOIMPROVEITER

#define DEFAULT_NOIMPROVEITER   3

the number of weighted pricing iterations without primal improvement. Experiments showed significant performance degradation when increasing this value

Definition at line 77 of file heur_ipcolgen.c.

Referenced by SCIPincludeHeurIPcolgen().

◆ DEFAULT_RINSFIXING

#define DEFAULT_RINSFIXING   FALSE

should a RINS style fixing be used for the repair master problem

Definition at line 79 of file heur_ipcolgen.c.

Referenced by SCIPincludeHeurIPcolgen().

◆ DEFAULT_RANDSEED

#define DEFAULT_RANDSEED   31

initial random seed

Definition at line 81 of file heur_ipcolgen.c.

◆ DEFAULT_ARRAYSIZE

#define DEFAULT_ARRAYSIZE   100

Definition at line 83 of file heur_ipcolgen.c.

Referenced by SCIP_DECL_HEURINIT().

◆ PREVLPOBJSIZE

#define PREVLPOBJSIZE   5

Definition at line 84 of file heur_ipcolgen.c.

Referenced by SCIP_DECL_HEURINIT().

◆ EVENTHDLR_NAME

#define EVENTHDLR_NAME   "IPColGen"

Definition at line 87 of file heur_ipcolgen.c.

◆ EVENTHDLR_DESC

#define EVENTHDLR_DESC   "LP event handler for " HEUR_NAME " heuristic"

Definition at line 88 of file heur_ipcolgen.c.

◆ PRICINGCB_NAME

#define PRICINGCB_NAME   "IPColGen"

Definition at line 91 of file heur_ipcolgen.c.

Referenced by performWeightedPricing(), and SCIPincludeHeurIPcolgen().

◆ PRICINGCB_DESC

#define PRICINGCB_DESC   "pre- and post-pricing methods for adding relaxation and dual weights to the pricing problem objective"

Definition at line 92 of file heur_ipcolgen.c.

Referenced by SCIPincludeHeurIPcolgen().

◆ PRICINGCB_PRIORITY

#define PRICINGCB_PRIORITY   1000000

Definition at line 93 of file heur_ipcolgen.c.

Referenced by SCIPincludeHeurIPcolgen().

◆ PRICINGCB_EXCLUSIVE

#define PRICINGCB_EXCLUSIVE   TRUE

Definition at line 94 of file heur_ipcolgen.c.

◆ heurCopyIPcolgen

#define heurCopyIPcolgen   NULL

copy method for primal heuristic plugins (called when SCIP copies plugins)

Definition at line 1542 of file heur_ipcolgen.c.

Referenced by SCIPincludeHeurIPcolgen().

◆ heurInitsolIPcolgen

#define heurInitsolIPcolgen   NULL

solving process initialization method of primal heuristic (called when branch and bound process is about to begin)

Definition at line 1646 of file heur_ipcolgen.c.

Referenced by SCIPincludeHeurIPcolgen().

◆ heurExitsolIPcolgen

#define heurExitsolIPcolgen   NULL

solving process deinitialization method of primal heuristic (called before branch and bound process data is freed)

Definition at line 1650 of file heur_ipcolgen.c.

Referenced by SCIPincludeHeurIPcolgen().

Typedef Documentation

◆ SCIP_HEURCONSTYPE

Definition at line 108 of file heur_ipcolgen.c.

Enumeration Type Documentation

◆ SCIP_HeurConsType

Enumerator
CONSTYPE_SETPACK 
CONSTYPE_SETCOVER 
CONSTYPE_SETPART 
CONSTYPE_INVALID 
CONSTYPE_NCONSTYPES 

Definition at line 100 of file heur_ipcolgen.c.

Function Documentation

◆ SCIP_DECL_EVENTEXEC()

SCIP_DECL_EVENTEXEC ( eventExecIpcolgen )
static

◆ createStartSolution()

SCIP_RETCODE createStartSolution ( GCG * gcg,
SCIP_SOL * startsol,
SCIP_Bool * success )
static

creates a starting solution for the heuristic if no solution has been previously found

The start solution is created by greedily adding the most recently generated columns. Once a column is added for each pricing problem, then the start solution has been created.

Parameters
gcgthe GCG data structure
startsolthe starting solution that will be populated with variables
successpointer to store whether creating the starting solution was successful

Definition at line 209 of file heur_ipcolgen.c.

References assert(), createStartSolution(), GCGgetMasterprob(), GCGgetNPricingprobs(), GCGvarGetBlock(), i, nvars, SCIP_CALL(), SCIPfreeBufferArray(), success, and vars.

Referenced by createStartSolution(), and SCIP_DECL_HEUREXEC().

◆ createPartialSolution()

SCIP_RETCODE createPartialSolution ( SCIP * scip,
SCIP_SOL * partialsol,
SCIP_RANDNUMGEN * randnumgen,
SCIP_Real minfixingrate,
int nblocks,
int * nfixedvars,
SCIP_Bool * success )
static

creates a partial solution by destroying a source complete solution

Parameters
scipthe SCIP data structure
partialsolthe new partial solution
randnumgenrandom number generator
minfixingratepercentage of integer variables that have to be fixed
nblocksthe number of blocks in the problem
nfixedvarsreturns the number of variables fixed to zero in the partial solution
successpointer to store whether the problem was created successfully

Definition at line 280 of file heur_ipcolgen.c.

References assert(), createPartialSolution(), GCGvarGetBlock(), i, mastervars, nmastervars, SCIP_CALL(), SCIPdebugMessage(), and success.

Referenced by createPartialSolution(), and destroyAndRepairSolution().

◆ addPenalty()

SCIP_RETCODE addPenalty ( SCIP * scip,
SCIP_Real addpenalty,
int addpenaltyid,
IPC_PENALTYTYPE addpenaltytype,
SCIP_Real ** penalties,
int ** penaltiesids,
IPC_PENALTYTYPE ** penaltytypes,
int * npenalties,
int * penaltiessize )
static

adds a penalty to the dynamic penalties

Parameters
scipthe SCIP data structure
addpenaltythe penalty to be added
addpenaltyidthe constraint id for the added penalty
addpenaltytypethe type of the added penalty
penaltiesthe relaxation penaltys
penaltiesidsthe relaxtion penalty constraint ids
penaltytypesthe penalty types
npenaltiesthe number of dynamic penalties
penaltiessizethe number of elements in the penalties array

Definition at line 352 of file heur_ipcolgen.c.

References addPenalty(), assert(), and SCIP_CALL().

Referenced by addPenalty(), and computeDynamicPenalties().

◆ getConstraintType()

SCIP_HEURCONSTYPE getConstraintType ( SCIP * scip,
SCIP_CONS * cons )
static

checks whether the constraint is of a valid type and the sign of the penalty is returned

Parameters
scipthe SCIP data structure
consthe constraint to check for validity

Definition at line 390 of file heur_ipcolgen.c.

References CONSTYPE_INVALID, CONSTYPE_SETCOVER, CONSTYPE_SETPACK, CONSTYPE_SETPART, GCGconsGetType(), getConstraintType(), i, linear, setcovering, setpacking, and setpartitioning.

Referenced by computeDynamicPenalties(), and getConstraintType().

◆ computeDynamicPenalties()

SCIP_RETCODE computeDynamicPenalties ( GCG * gcg,
SCIP_SOL * sol,
SCIP_Real initdynamicpen,
SCIP_Real ** penalties,
int ** penaltiesids,
IPC_PENALTYTYPE ** penaltytypes,
int * npenalties,
int * penaltiessize,
SCIP_Bool repairsol )
static

using the current solution, compute the dynamic penalties to apply to the column generation pricing problem

Parameters
gcgthe SCIP data structure
solthe solution used to set up the repair problem
initdynamicpenthe value of the initial dynamic penalty
penaltiesthe dynamic penalties, or NULL if the penalties are not computed
penaltiesidsthe dynamic penalties constraint ids, or NULL if the penalties are not computed
penaltytypesthe penalty types
npenaltiesthe number of dynamic penalties, or NULL if the penalties are not computed
penaltiessizethe number of elements in the dynamic penalties array, or NULL if the penalties are not computed
repairsolshould variables be fixed to zero to repair the solution

Definition at line 437 of file heur_ipcolgen.c.

References addPenalty(), assert(), computeDynamicPenalties(), CONSTYPE_SETCOVER, CONSTYPE_SETPACK, CONSTYPE_SETPART, DEFAULT_BIGM, GCGconsGetNVars(), GCGconsGetVars(), GCGgetMasterConss(), GCGgetMasterprob(), GCGgetNMasterConss(), getConstraintType(), i, j, PENALTYTYPE_BIGM, PENALTYTYPE_SETCOVER, PENALTYTYPE_SETPACK, SCIP_CALL(), SCIPfreeBufferArray(), sol, and solval.

Referenced by computeDynamicPenalties(), and destroyAndRepairSolution().

◆ adjustDynamicPenalties()

◆ GCG_DECL_PRICINGCBPREPRICING()

GCG_DECL_PRICINGCBPREPRICING ( pricingcbPrepricingIpcolgen )
static

the pre-pricing method of the pricing callback technique

This method is called immediately before the pricing is performed in the GCG pricer. At this point, it is possible to modify the solving data is used within the pricing for new variables. Any data that is modified should be reverted in the post-pricing method.

Definition at line 717 of file heur_ipcolgen.c.

References SCIP_HeurData::abort, assert(), SCIP_HeurData::dualweight, GCG_DECL_PRICINGCBPREPRICING, GCG_PRICETYPE_REDCOST, GCGgetMasterprob(), GCGsetPricingObjDualWeight(), GCGsetPricingObjRelaxWeight(), HEUR_NAME, heurdata, i, SCIP_HeurData::inheur, SCIP_HeurData::npenalties, SCIP_HeurData::penalties, and SCIP_HeurData::penaltiesids.

◆ GCG_DECL_PRICINGCBPOSTPRICING()

GCG_DECL_PRICINGCBPOSTPRICING ( pricingcbPostpricingIpcolgen )
static

the post-pricing method of the pricing callback technique

This method is called immediately after the pricing is performed in the GCG pricer. This method should be used to revert any changes made to in the pre-pricing method.

Definition at line 780 of file heur_ipcolgen.c.

References adjustDynamicPenalties(), assert(), GCG_DECL_PRICINGCBPOSTPRICING, GCG_PRICETYPE_REDCOST, GCGgetMasterprob(), GCGsetPricingObjDualWeight(), GCGsetPricingObjRelaxWeight(), HEUR_NAME, heurdata, SCIP_HeurData::inheur, SCIP_HeurData::nmastervars, and SCIP_CALL().

◆ performWeightedPricing()

SCIP_RETCODE performWeightedPricing ( GCG * gcg,
SCIP_HEURDATA * heurdata,
int nblocks )
static

pricing in new variables with a weighted objective function for the original master scip instance. The new variables will not form part of any stored solution, so they will not be fixed when setting up the repair problem

Parameters
gcgthe GCG data structure
heurdatathe heuristic data
nblocksthe number of blocks in the problem

Definition at line 829 of file heur_ipcolgen.c.

References SCIP_HeurData::abort, assert(), cutoff, GCGgetMasterprob(), GCGgetOrigprob(), GCGpricerFindPricingcb(), GCGpricingcbSetEnabled(), GCGpricingcbSetExclusive(), GCGrelaxPerformProbingWithPricing(), heurdata, i, SCIP_HeurData::infeascount, SCIP_HeurData::inheur, lperror, lpsolved, origprob, performWeightedPricing(), PRICINGCB_NAME, and SCIP_CALL().

Referenced by destroyAndRepairSolution(), and performWeightedPricing().

◆ destroyAndRepairSolution()

SCIP_RETCODE destroyAndRepairSolution ( GCG * gcg,
SCIP_HEURDATA * heurdata,
SCIP_SOL * partialsol,
int npricingprobs,
SCIP_Bool * terminate )
static

destroys and repairs the current best solution. This is the main loop of the ipcolgen heuristic.

Parameters
gcgthe GCG data structure
heurdatathe heuristic data
partialsolthe partial solution that will be updated
npricingprobsthe number of pricing problems
terminateindicates whether the heuristic must be terminated

Definition at line 920 of file heur_ipcolgen.c.

References assert(), SCIP_HeurData::bestsol, computeDynamicPenalties(), createPartialSolution(), destroyAndRepairSolution(), GCGgetMasterprob(), heurdata, i, SCIP_HeurData::initdynamicpen, SCIP_HeurData::minfixingrate, SCIP_HeurData::nfixedvars, SCIP_HeurData::nmastervars, SCIP_HeurData::npenalties, SCIP_HeurData::npricingprobs, SCIP_HeurData::penalties, SCIP_HeurData::penaltiesids, SCIP_HeurData::penaltiessize, SCIP_HeurData::penaltytypes, performWeightedPricing(), SCIP_HeurData::randnumgen, SCIP_CALL(), and success.

Referenced by destroyAndRepairSolution(), and SCIP_DECL_HEUREXEC().

◆ createRepairProblem()

SCIP_RETCODE createRepairProblem ( SCIP * scip,
SCIP ** repairprob,
SCIP_HEURDATA * heurdata,
SCIP_VAR ** repairprobvars )
static

creates the sub-SCIP for the repair problem that is solved to find improving solutions

Parameters
scipthe SCIP data structure
repairprobthe SCIP data structure for the repair problem
heurdatathe heuristic data
repairprobvarsan array to store the variables of the repair problem

Definition at line 998 of file heur_ipcolgen.c.

References assert(), SCIP_HeurData::copycuts, createRepairProblem(), heurdata, i, mastervars, nmastervars, SCIP_CALL(), SCIPdebugMessage(), SCIP_HeurData::uselprows, and varmapfw.

Referenced by createRepairProblem(), and SCIP_DECL_HEUREXEC().

◆ setupRepairProblem()

SCIP_RETCODE setupRepairProblem ( SCIP * scip,
SCIP * repairprob,
SCIP_VAR ** repairprobvars,
SCIP_SOL * sol,
SCIP_Bool uselprows,
SCIP_Bool rinsfixing )
static

set up the repair problem by fixing variables based on the provide solution values

Parameters
scipSCIP data structure for master problem
repairprobSCIP data structure for repair problem
repairprobvarsthe variables of the repair problem
solthe source solution
uselprowsshould repair problem be created out of the rows in the LP rows?
rinsfixingshould a RINS-style fixing be used for the master problem

Definition at line 1067 of file heur_ipcolgen.c.

References assert(), GCGvarGetBlock(), i, j, mastervars, nmastervars, SCIP_CALL(), SCIPfreeBufferArray(), setupRepairProblem(), and sol.

Referenced by SCIP_DECL_HEUREXEC(), and setupRepairProblem().

◆ createNewSol()

SCIP_RETCODE createNewSol ( GCG * gcg,
SCIP * repairprob,
SCIP_VAR ** repairprobvars,
SCIP_HEUR * heur,
SCIP_SOL * repairprobsol,
SCIP_Bool * success )
static

creates a new solution for the original problem by translating the solution of the repair problem

Parameters
gcgGCG data structure
repairprobSCIP structure of repair problem
repairprobvarsthe variables of the restricted master problem
heurRestricted Master heuristic structure
repairprobsolsolution of the restricted master problem
successused to store whether new solution was found or not

Definition at line 1172 of file heur_ipcolgen.c.

References assert(), createNewSol(), GCGgetMasterprob(), GCGgetOrigprob(), mastervars, nmastervars, nvars, origprob, SCIP_CALL(), SCIPdebugMessage(), SCIPfreeBufferArray(), success, and vars.

◆ solveRepairProblem()

SCIP_RETCODE solveRepairProblem ( GCG * gcg,
SCIP * repairprob,
SCIP_HEUR * heur,
SCIP_HEURDATA * heurdata,
SCIP_VAR ** repairprobvars,
SCIP_Longint nnodes,
SCIP_RESULT * result )
static

solve repair problem

Parameters
gcgGCG data structure
repairprobSCIP data structure of the repair problem
heurthe ipcolgen heuristic structure
heurdatathe heuristic data
repairprobvarsthe variables of the repair problem
nnodesthe number of nodes provided to the heuristic
resultthe result from performing the heuristic

Definition at line 1232 of file heur_ipcolgen.c.

References assert(), createNewSol(), cutoff, EVENTHDLR_DESC, EVENTHDLR_NAME, GCGgetMasterprob(), GCGgetOrigprob(), HEUR_NAME, heurdata, i, SCIP_HeurData::minimprove, nnodes, origprob, result, SCIP_CALL(), SCIPdebugMessage(), solveRepairProblem(), success, and SCIP_HeurData::usednodes.

Referenced by SCIP_DECL_HEUREXEC(), and solveRepairProblem().

◆ executeHeuristic()

SCIP_RETCODE executeHeuristic ( GCG * gcg,
SCIP_HEURDATA * heurdata,
SCIP_Bool * execute )
static

checks conditions to determine whether the ipcolgen heuristic should be executed. Prior to the first call of the ipcolgen heuristic, the average LP objective value is computed to identify the point when the tailing-off effect starts. This is when the heuristic is first called.

Parameters
gcgthe GCG data structure
heurdatathe heuristic data
executereturns whether the heuristic should be executed

Definition at line 1399 of file heur_ipcolgen.c.

References assert(), SCIP_HeurData::callspernode, executeHeuristic(), SCIP_HeurData::firstcallabsgap, SCIP_HeurData::firstcallgap, SCIP_HeurData::firstexec, GCGgetMasterprob(), GCGgetNPricingprobs(), HEUR_NAME, heurdata, i, SCIP_HeurData::lastsol, maxdepth, SCIP_HeurData::mininitialgap, SCIP_HeurData::nprevlpobjs, SCIP_HeurData::numexec, SCIP_HeurData::nwaitnodes, SCIP_HeurData::prevlpobjs, SCIP_HeurData::prevlpobjssize, SCIP_HeurData::prevnnodes, SCIP_HeurData::prevnode, SCIP_HeurData::prevnsolsfound, SCIP_HeurData::prevpricingiter, and SCIP_HeurData::waitnewsol.

Referenced by executeHeuristic(), and SCIP_DECL_HEUREXEC().

◆ SCIP_DECL_HEURFREE()

SCIP_DECL_HEURFREE ( heurFreeIPcolgen )
static

destructor of primal heuristic to free user data (called when SCIP is exiting)

Definition at line 1546 of file heur_ipcolgen.c.

References assert(), SCIP_HeurData::gcg, GCGgetDwMasterprob(), heurdata, and SCIPfreeMemory().

◆ SCIP_DECL_HEURINIT()

◆ SCIP_DECL_HEUREXIT()

SCIP_DECL_HEUREXIT ( heurExitIPcolgen )
static

deinitialization method of primal heuristic (called before transformed problem is freed)

Definition at line 1620 of file heur_ipcolgen.c.

References assert(), heurdata, SCIP_HeurData::penalties, SCIP_HeurData::penaltiesids, SCIP_HeurData::penaltiessize, SCIP_HeurData::penaltytypes, SCIP_HeurData::prevlpobjs, SCIP_HeurData::prevlpobjssize, and SCIP_HeurData::randnumgen.

◆ SCIP_DECL_HEUREXEC()

◆ SCIPincludeHeurIPcolgen()

SCIP_RETCODE SCIPincludeHeurIPcolgen ( GCG * gcg)

creates the IPColGen heuristic and includes it in SCIP

creates IP Column Generation primal heuristic and includes it in SCIP

Parameters
gcgGCG data structure

Definition at line 1899 of file heur_ipcolgen.c.

References SCIP_HeurData::callspernode, SCIP_HeurData::copycuts, DEFAULT_CALLSPERNODE, DEFAULT_COPYCUTS, DEFAULT_DUALWEIGHT, DEFAULT_INITDYNAMICPEN, DEFAULT_LPLIMFAC, DEFAULT_MAXITER, DEFAULT_MAXNODES, DEFAULT_MINFIXINGRATE, DEFAULT_MINIMPROVE, DEFAULT_MININITIALGAP, DEFAULT_MINNODES, DEFAULT_NODESOFS, DEFAULT_NODESQUOT, DEFAULT_NOIMPROVEITER, DEFAULT_RINSFIXING, DEFAULT_SOLVEAUXPROB, DEFAULT_USELPROWS, DEFAULT_WAITNEWSOL, SCIP_HeurData::dualweight, SCIP_HeurData::gcg, GCGgetDwMasterprob(), GCGpricerIncludePricingcb(), HEUR_DESC, HEUR_DISPCHAR, HEUR_FREQ, HEUR_FREQOFS, HEUR_MAXDEPTH, HEUR_NAME, HEUR_PRIORITY, HEUR_TIMING, HEUR_USESSUBSCIP, heurCopyIPcolgen, heurdata, heurExitsolIPcolgen, heurInitsolIPcolgen, SCIP_HeurData::initdynamicpen, SCIP_HeurData::lplimfac, SCIP_HeurData::maxiter, SCIP_HeurData::maxnodes, SCIP_HeurData::minfixingrate, SCIP_HeurData::minimprove, SCIP_HeurData::mininitialgap, SCIP_HeurData::minnodes, SCIP_HeurData::nodesofs, SCIP_HeurData::nodesquot, SCIP_HeurData::noimproveiter, PRICINGCB_DESC, PRICINGCB_NAME, PRICINGCB_PRIORITY, SCIP_HeurData::rinsfixing, SCIP_CALL(), SCIPincludeHeurIPcolgen(), SCIP_HeurData::solveauxproblem, SCIP_HeurData::uselprows, and SCIP_HeurData::waitnewsol.

Referenced by GCGincludeMasterPlugins(), and SCIPincludeHeurIPcolgen().