Detailed Description
LP gcgrounding heuristic that tries to recover from intermediate infeasibilities.
Definition in file heur_gcgrounding.c.
#include <assert.h>
#include <string.h>
#include "heur_gcgrounding.h"
#include "relax_gcg.h"
#include "gcg.h"
Go to the source code of this file.
Data Structures | |
struct | SCIP_HeurData |
Macros | |
#define | HEUR_NAME "gcgrounding" |
#define | HEUR_DESC "LP rounding heuristic on original variables with infeasibility recovering" |
#define | HEUR_DISPCHAR 'R' |
#define | HEUR_PRIORITY -1000 |
#define | HEUR_FREQ 1 |
#define | HEUR_FREQOFS 0 |
#define | HEUR_MAXDEPTH -1 |
#define | HEUR_TIMING SCIP_HEURTIMING_AFTERNODE |
#define | HEUR_USESSUBSCIP FALSE |
#define | DEFAULT_SUCCESSFACTOR 100 |
#define | heurCopyGcgrounding NULL |
#define | heurExitsolGcgrounding NULL |
Functions | |
static void | updateViolations (SCIP *scip, SCIP_ROW *row, SCIP_ROW **violrows, int *violrowpos, int *nviolrows, SCIP_Real oldactivity, SCIP_Real newactivity) |
static SCIP_RETCODE | updateActivities (SCIP *scip, SCIP_Real *activities, SCIP_ROW **violrows, int *violrowpos, int *nviolrows, int nlprows, SCIP_VAR *var, SCIP_Real oldsolval, SCIP_Real newsolval) |
static SCIP_RETCODE | selectRounding (SCIP *scip, SCIP_SOL *sol, SCIP_Real minobj, SCIP_ROW *row, int direction, SCIP_VAR **roundvar, SCIP_Real *oldsolval, SCIP_Real *newsolval) |
static SCIP_RETCODE | selectIncreaseRounding (SCIP *scip, SCIP_SOL *sol, SCIP_Real minobj, SCIP_ROW *row, SCIP_VAR **roundvar, SCIP_Real *oldsolval, SCIP_Real *newsolval) |
static SCIP_RETCODE | selectDecreaseRounding (SCIP *scip, SCIP_SOL *sol, SCIP_Real minobj, SCIP_ROW *row, SCIP_VAR **roundvar, SCIP_Real *oldsolval, SCIP_Real *newsolval) |
static SCIP_RETCODE | selectEssentialRounding (SCIP *scip, SCIP_SOL *sol, SCIP_Real minobj, SCIP_VAR **lpcands, int nlpcands, SCIP_VAR **roundvar, SCIP_Real *oldsolval, SCIP_Real *newsolval) |
static | SCIP_DECL_HEURFREE (heurFreeGcgrounding) |
static | SCIP_DECL_HEURINIT (heurInitGcgrounding) |
static | SCIP_DECL_HEUREXIT (heurExitGcgrounding) |
static | SCIP_DECL_HEURINITSOL (heurInitsolGcgrounding) |
static | SCIP_DECL_HEUREXEC (heurExecGcgrounding) |
SCIP_RETCODE | SCIPincludeHeurGcgrounding (SCIP *scip) |
Macro Definition Documentation
◆ HEUR_NAME
#define HEUR_NAME "gcgrounding" |
Definition at line 44 of file heur_gcgrounding.c.
◆ HEUR_DESC
#define HEUR_DESC "LP rounding heuristic on original variables with infeasibility recovering" |
Definition at line 45 of file heur_gcgrounding.c.
◆ HEUR_DISPCHAR
#define HEUR_DISPCHAR 'R' |
Definition at line 46 of file heur_gcgrounding.c.
◆ HEUR_PRIORITY
#define HEUR_PRIORITY -1000 |
Definition at line 47 of file heur_gcgrounding.c.
◆ HEUR_FREQ
#define HEUR_FREQ 1 |
Definition at line 48 of file heur_gcgrounding.c.
◆ HEUR_FREQOFS
#define HEUR_FREQOFS 0 |
Definition at line 49 of file heur_gcgrounding.c.
◆ HEUR_MAXDEPTH
#define HEUR_MAXDEPTH -1 |
Definition at line 50 of file heur_gcgrounding.c.
◆ HEUR_TIMING
#define HEUR_TIMING SCIP_HEURTIMING_AFTERNODE |
Definition at line 51 of file heur_gcgrounding.c.
◆ HEUR_USESSUBSCIP
#define HEUR_USESSUBSCIP FALSE |
Definition at line 52 of file heur_gcgrounding.c.
◆ DEFAULT_SUCCESSFACTOR
#define DEFAULT_SUCCESSFACTOR 100 |
number of calls per found solution that are considered as standard success, a higher factor causes the heuristic to be called more often
Definition at line 54 of file heur_gcgrounding.c.
◆ heurCopyGcgrounding
#define heurCopyGcgrounding NULL |
copy method for primal heuristic plugins (called when SCIP copies plugins)
Definition at line 434 of file heur_gcgrounding.c.
◆ heurExitsolGcgrounding
#define heurExitsolGcgrounding NULL |
solving process deinitialization method of primal heuristic (called before branch and bound process data is freed)
Definition at line 508 of file heur_gcgrounding.c.
Function Documentation
◆ updateViolations()
|
static |
update row violation arrays after a row's activity value changed
- Parameters
-
scip SCIP data structure row LP row violrows array with currently violated rows violrowpos position of LP rows in violrows array nviolrows pointer to the number of currently violated rows oldactivity old activity value of LP row newactivity new activity value of LP row
Definition at line 78 of file heur_gcgrounding.c.
Referenced by updateActivities().
◆ updateActivities()
|
static |
update row activities after a variable's solution value changed
- Parameters
-
scip SCIP data structure activities LP row activities violrows array with currently violated rows violrowpos position of LP rows in violrows array nviolrows pointer to the number of currently violated rows nlprows number of rows in current LP var variable that has been changed oldsolval old solution value of variable newsolval new solution value of variable
Definition at line 137 of file heur_gcgrounding.c.
References updateViolations().
Referenced by SCIP_DECL_HEUREXEC().
◆ selectRounding()
|
static |
returns a variable, that pushes activity of the row in the given direction with minimal negative impact on other rows; if variables have equal impact, chooses the one with best objective value improvement in corresponding direction; rounding in a direction is forbidden, if this forces the objective value over the upper bound
- Parameters
-
scip SCIP data structure sol primal solution minobj minimal objective value possible after rounding remaining fractional vars row LP row direction should the activity be increased (+1) or decreased (-1)? roundvar pointer to store the rounding variable, returns NULL if impossible oldsolval pointer to store old (fractional) solution value of rounding variable newsolval pointer to store new (rounded) solution value of rounding variable
Definition at line 209 of file heur_gcgrounding.c.
Referenced by selectDecreaseRounding(), and selectIncreaseRounding().
◆ selectIncreaseRounding()
|
static |
returns a variable, that increases the activity of the row
- Parameters
-
scip SCIP data structure sol primal solution minobj minimal objective value possible after rounding remaining fractional vars row LP row roundvar pointer to store the rounding variable, returns NULL if impossible oldsolval old (fractional) solution value of rounding variable newsolval new (rounded) solution value of rounding variable
Definition at line 314 of file heur_gcgrounding.c.
References selectRounding().
Referenced by SCIP_DECL_HEUREXEC().
◆ selectDecreaseRounding()
|
static |
returns a variable, that decreases the activity of the row
- Parameters
-
scip SCIP data structure sol primal solution minobj minimal objective value possible after rounding remaining fractional vars row LP row roundvar pointer to store the rounding variable, returns NULL if impossible oldsolval old (fractional) solution value of rounding variable newsolval new (rounded) solution value of rounding variable
Definition at line 329 of file heur_gcgrounding.c.
References selectRounding().
Referenced by SCIP_DECL_HEUREXEC().
◆ selectEssentialRounding()
|
static |
returns a fractional variable, that has most impact on rows in opposite direction, i.e. that is most crucial to fix in the other direction; if variables have equal impact, chooses the one with best objective value improvement in corresponding direction; rounding in a direction is forbidden, if this forces the objective value over the upper bound
- Parameters
-
scip SCIP data structure sol primal solution minobj minimal objective value possible after rounding remaining fractional vars lpcands fractional variables in LP nlpcands number of fractional variables in LP roundvar pointer to store the rounding variable, returns NULL if impossible oldsolval old (fractional) solution value of rounding variable newsolval new (rounded) solution value of rounding variable
Definition at line 348 of file heur_gcgrounding.c.
Referenced by SCIP_DECL_HEUREXEC().
◆ SCIP_DECL_HEURFREE()
|
static |
destructor of primal heuristic to free user data (called when SCIP is exiting)
Definition at line 438 of file heur_gcgrounding.c.
References HEUR_NAME.
◆ SCIP_DECL_HEURINIT()
|
static |
initialization method of primal heuristic (called after problem was transformed)
Definition at line 459 of file heur_gcgrounding.c.
References HEUR_NAME.
◆ SCIP_DECL_HEUREXIT()
|
static |
deinitialization method of primal heuristic (called before transformed problem is freed)
Definition at line 477 of file heur_gcgrounding.c.
References HEUR_NAME.
◆ SCIP_DECL_HEURINITSOL()
|
static |
solving process initialization method of primal heuristic (called when branch and bound process is about to begin)
Definition at line 493 of file heur_gcgrounding.c.
References HEUR_NAME.
◆ SCIP_DECL_HEUREXEC()
|
static |
execution method of primal heuristic
Definition at line 513 of file heur_gcgrounding.c.
References GCGgetMasterprob(), GCGrelaxGetCurrentOrigSol(), HEUR_NAME, selectDecreaseRounding(), selectEssentialRounding(), selectIncreaseRounding(), and updateActivities().
◆ SCIPincludeHeurGcgrounding()
SCIP_RETCODE SCIPincludeHeurGcgrounding | ( | SCIP * | scip | ) |
creates the GCG rounding heuristic with infeasibility recovering and includes it in SCIP
- Parameters
-
scip SCIP data structure
Definition at line 767 of file heur_gcgrounding.c.
References DEFAULT_SUCCESSFACTOR, HEUR_DESC, HEUR_DISPCHAR, HEUR_FREQ, HEUR_FREQOFS, HEUR_MAXDEPTH, HEUR_NAME, HEUR_PRIORITY, HEUR_TIMING, HEUR_USESSUBSCIP, heurCopyGcgrounding, and heurExitsolGcgrounding.
Referenced by SCIPincludeGcgPlugins().