Detailed Description
LNS heuristic that finds the optimal rounding to a given point.
Definition in file heur_gcgrens.c.
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include "heur_gcgrens.h"
#include "gcg.h"
#include "scip/scipdefplugins.h"
#include "scip/cons_linear.h"
Go to the source code of this file.
Data Structures | |
struct | SCIP_HeurData |
Macros | |
#define | HEUR_NAME "gcgrens" |
#define | HEUR_DESC "LNS exploring fractional neighborhood of relaxation's optimum" |
#define | HEUR_DISPCHAR 'E' |
#define | HEUR_PRIORITY -1100000 |
#define | HEUR_FREQ 0 |
#define | HEUR_FREQOFS 0 |
#define | HEUR_MAXDEPTH -1 |
#define | HEUR_TIMING SCIP_HEURTIMING_AFTERNODE |
#define | HEUR_USESSUBSCIP TRUE |
#define | DEFAULT_BINARYBOUNDS TRUE |
#define | DEFAULT_MAXNODES 5000LL |
#define | DEFAULT_MINFIXINGRATE 0.5 |
#define | DEFAULT_MINIMPROVE 0.01 |
#define | DEFAULT_MINNODES 500LL |
#define | DEFAULT_NODESOFS 500LL |
#define | DEFAULT_NODESQUOT 0.1 |
#define | DEFAULT_USELPROWS FALSE |
#define | DEFAULT_COPYCUTS TRUE |
#define | DEFAULT_ADDALLSOLS FALSE /* should all subproblem solutions be added to the original SCIP? */ |
Functions | |
static SCIP_RETCODE | createSubproblem (SCIP *scip, SCIP *subscip, SCIP_VAR **subvars, SCIP_Real minfixingrate, SCIP_Bool binarybounds, SCIP_Bool uselprows, SCIP_Real *intfixingrate, SCIP_Real *zerofixingrate, SCIP_Bool *success) |
static SCIP_RETCODE | createNewSol (SCIP *scip, SCIP *subscip, SCIP_VAR **subvars, SCIP_HEUR *heur, SCIP_SOL *subsol, SCIP_Bool *success) |
SCIP_RETCODE | GCGapplyGcgrens (SCIP *scip, SCIP_HEUR *heur, SCIP_RESULT *result, SCIP_Real minfixingrate, SCIP_Real minimprove, SCIP_Longint maxnodes, SCIP_Longint nstallnodes, SCIP_Bool binarybounds, SCIP_Bool uselprows) |
static | SCIP_DECL_HEURFREE (heurFreeGcgrens) |
static | SCIP_DECL_HEURINIT (heurInitGcgrens) |
static | SCIP_DECL_HEUREXEC (heurExecGcgrens) |
SCIP_RETCODE | SCIPincludeHeurGcgrens (SCIP *scip) |
Macro Definition Documentation
◆ HEUR_NAME
#define HEUR_NAME "gcgrens" |
Definition at line 47 of file heur_gcgrens.c.
◆ HEUR_DESC
#define HEUR_DESC "LNS exploring fractional neighborhood of relaxation's optimum" |
Definition at line 48 of file heur_gcgrens.c.
◆ HEUR_DISPCHAR
#define HEUR_DISPCHAR 'E' |
Definition at line 49 of file heur_gcgrens.c.
◆ HEUR_PRIORITY
#define HEUR_PRIORITY -1100000 |
Definition at line 50 of file heur_gcgrens.c.
◆ HEUR_FREQ
#define HEUR_FREQ 0 |
Definition at line 51 of file heur_gcgrens.c.
◆ HEUR_FREQOFS
#define HEUR_FREQOFS 0 |
Definition at line 52 of file heur_gcgrens.c.
◆ HEUR_MAXDEPTH
#define HEUR_MAXDEPTH -1 |
Definition at line 53 of file heur_gcgrens.c.
◆ HEUR_TIMING
#define HEUR_TIMING SCIP_HEURTIMING_AFTERNODE |
Definition at line 54 of file heur_gcgrens.c.
◆ HEUR_USESSUBSCIP
#define HEUR_USESSUBSCIP TRUE |
does the heuristic use a secondary SCIP instance?
Definition at line 55 of file heur_gcgrens.c.
◆ DEFAULT_BINARYBOUNDS
#define DEFAULT_BINARYBOUNDS TRUE |
should general integers get binary bounds [floor(.),ceil(.)] ?
Definition at line 58 of file heur_gcgrens.c.
◆ DEFAULT_MAXNODES
#define DEFAULT_MAXNODES 5000LL |
maximum number of nodes to regard in the subproblem
Definition at line 59 of file heur_gcgrens.c.
◆ DEFAULT_MINFIXINGRATE
#define DEFAULT_MINFIXINGRATE 0.5 |
minimum percentage of integer variables that have to be fixed
Definition at line 60 of file heur_gcgrens.c.
◆ DEFAULT_MINIMPROVE
#define DEFAULT_MINIMPROVE 0.01 |
factor by which RENS should at least improve the incumbent
Definition at line 61 of file heur_gcgrens.c.
◆ DEFAULT_MINNODES
#define DEFAULT_MINNODES 500LL |
minimum number of nodes to regard in the subproblem
Definition at line 62 of file heur_gcgrens.c.
◆ DEFAULT_NODESOFS
#define DEFAULT_NODESOFS 500LL |
number of nodes added to the contingent of the total nodes
Definition at line 63 of file heur_gcgrens.c.
◆ DEFAULT_NODESQUOT
#define DEFAULT_NODESQUOT 0.1 |
subproblem nodes in relation to nodes of the original problem
Definition at line 64 of file heur_gcgrens.c.
◆ DEFAULT_USELPROWS
#define DEFAULT_USELPROWS FALSE |
should subproblem be created out of the rows in the LP rows, otherwise, the copy constructors of the constraints handlers are used
Definition at line 65 of file heur_gcgrens.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 67 of file heur_gcgrens.c.
◆ DEFAULT_ADDALLSOLS
#define DEFAULT_ADDALLSOLS FALSE /* should all subproblem solutions be added to the original SCIP? */ |
Definition at line 70 of file heur_gcgrens.c.
Function Documentation
◆ createSubproblem()
|
static |
creates a subproblem by fixing a number of variables
- Parameters
-
scip original SCIP data structure subscip SCIP data structure for the subproblem subvars the variables of the subproblem minfixingrate percentage of integer variables that have to be fixed binarybounds should general integers get binary bounds [floor(.),ceil(.)] ? uselprows should subproblem be created out of the rows in the LP rows? intfixingrate percentage of integers that get actually fixed zerofixingrate percentage of variables fixed to zero success pointer to store whether the problem was created successfully
Definition at line 113 of file heur_gcgrens.c.
Referenced by GCGapplyGcgrens().
◆ createNewSol()
|
static |
creates a new solution for the original problem by copying the solution of the subproblem
- Parameters
-
scip original SCIP data structure subscip SCIP structure of the subproblem subvars the variables of the subproblem heur RENS heuristic structure subsol solution of the subproblem success used to store whether new solution was found or not
Definition at line 265 of file heur_gcgrens.c.
Referenced by GCGapplyGcgrens().
◆ GCGapplyGcgrens()
SCIP_RETCODE GCGapplyGcgrens | ( | SCIP * | scip, |
SCIP_HEUR * | heur, | ||
SCIP_RESULT * | result, | ||
SCIP_Real | minfixingrate, | ||
SCIP_Real | minimprove, | ||
SCIP_Longint | maxnodes, | ||
SCIP_Longint | nstallnodes, | ||
SCIP_Bool | binarybounds, | ||
SCIP_Bool | uselprows | ||
) |
main procedure of the GCG RENS heuristic, creates and solves a sub-SCIP
- Parameters
-
scip original SCIP data structure heur heuristic data structure result result data structure minfixingrate minimum percentage of integer variables that have to be fixed minimprove factor by which RENS should at least improve the incumbent maxnodes maximum number of nodes for the subproblem nstallnodes number of stalling nodes for the subproblem binarybounds should general integers get binary bounds [floor(.),ceil(.)]? uselprows should subproblem be created out of the rows in the LP rows?
Definition at line 332 of file heur_gcgrens.c.
References createNewSol(), and createSubproblem().
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 633 of file heur_gcgrens.c.
◆ SCIP_DECL_HEURINIT()
|
static |
initialization method of primal heuristic (called after problem was transformed)
Definition at line 654 of file heur_gcgrens.c.
◆ SCIP_DECL_HEUREXEC()
|
static |
execution method of primal heuristic
Definition at line 737 of file heur_gcgrens.c.
References GCGapplyGcgrens(), and GCGgetMasterprob().
◆ SCIPincludeHeurGcgrens()
SCIP_RETCODE SCIPincludeHeurGcgrens | ( | SCIP * | scip | ) |
creates GCG RENS primal heuristic and includes it in SCIP
- Parameters
-
scip SCIP data structure
Definition at line 814 of file heur_gcgrens.c.
References DEFAULT_ADDALLSOLS, DEFAULT_BINARYBOUNDS, DEFAULT_COPYCUTS, DEFAULT_MAXNODES, DEFAULT_MINFIXINGRATE, DEFAULT_MINIMPROVE, DEFAULT_MINNODES, DEFAULT_NODESOFS, DEFAULT_NODESQUOT, DEFAULT_USELPROWS, HEUR_DESC, HEUR_DISPCHAR, HEUR_FREQ, HEUR_FREQOFS, HEUR_MAXDEPTH, HEUR_NAME, HEUR_PRIORITY, HEUR_TIMING, and HEUR_USESSUBSCIP.
Referenced by SCIPincludeGcgPlugins().