Scippy

SCIP

Solving Constraint Integer Programs

heur_optcumulative.c File Reference
#include <assert.h>
#include <string.h>
#include "scip/cons_cumulative.h"
#include "heur_optcumulative.h"

Go to the source code of this file.

Data Structures

struct  SCIP_Assignment
 

Macros

#define HEUR_NAME   "optcumulative"
 
#define HEUR_DESC   "problem specific heuristic of cumulative scheduling problems with optional jobs"
 
#define HEUR_DISPCHAR   'q'
 
#define HEUR_PRIORITY   -1106000
 
#define HEUR_FREQ   -1
 
#define HEUR_FREQOFS   0
 
#define HEUR_MAXDEPTH   -1
 
#define HEUR_TIMING   SCIP_HEURTIMING_BEFORENODE
 
#define HEUR_USESSUBSCIP   TRUE
 
#define DEFAULT_MAXNODES   1000LL
 
#define DEFAULT_MAXPROPROUNDS   -1
 
#define heurInitOptcumulative   NULL
 
#define heurExitOptcumulative   NULL
 
#define heurInitsolOptcumulative   NULL
 
#define heurExitsolOptcumulative   NULL
 

Typedefs

typedef struct SCIP_Assignment SCIP_ASSIGNMENT
 

Functions

static void heurdataReset (SCIP *scip, SCIP_HEURDATA *heurdata)
 
static SCIP_RETCODE applyOptcumulativeFixings (SCIP *scip, SCIP_HEURDATA *heurdata, SCIP_Bool *infeasible)
 
static SCIP_RETCODE initializeSol (SCIP *scip, SCIP_SOL *sol)
 
static SCIP_RETCODE applyOptcumulative (SCIP *scip, SCIP_HEUR *heur, SCIP_HEURDATA *heurdata, SCIP_RESULT *result)
 
static SCIP_DECL_HEURCOPY (heurCopyOptcumulative)
 
static SCIP_DECL_HEURFREE (heurFreeOptcumulative)
 
static SCIP_DECL_HEUREXEC (heurExecOptcumulative)
 
SCIP_RETCODE SCIPincludeHeurOptcumulative (SCIP *scip)
 
SCIP_RETCODE SCIPinitHeurOptcumulative (SCIP *scip, int nmachines, int njobs, int *machines, SCIP_VAR ***binvars, SCIP_VAR ***vars, int **durations, int **demands, int *capacities)
 

Macro Definition Documentation

◆ HEUR_NAME

#define HEUR_NAME   "optcumulative"

◆ HEUR_DESC

#define HEUR_DESC   "problem specific heuristic of cumulative scheduling problems with optional jobs"

Definition at line 32 of file heur_optcumulative.c.

Referenced by SCIPincludeHeurOptcumulative().

◆ HEUR_DISPCHAR

#define HEUR_DISPCHAR   'q'

Definition at line 33 of file heur_optcumulative.c.

Referenced by SCIPincludeHeurOptcumulative().

◆ HEUR_PRIORITY

#define HEUR_PRIORITY   -1106000

Definition at line 34 of file heur_optcumulative.c.

Referenced by SCIPincludeHeurOptcumulative().

◆ HEUR_FREQ

#define HEUR_FREQ   -1

Definition at line 35 of file heur_optcumulative.c.

Referenced by SCIPincludeHeurOptcumulative().

◆ HEUR_FREQOFS

#define HEUR_FREQOFS   0

Definition at line 36 of file heur_optcumulative.c.

Referenced by SCIPincludeHeurOptcumulative().

◆ HEUR_MAXDEPTH

#define HEUR_MAXDEPTH   -1

Definition at line 37 of file heur_optcumulative.c.

Referenced by SCIPincludeHeurOptcumulative().

◆ HEUR_TIMING

#define HEUR_TIMING   SCIP_HEURTIMING_BEFORENODE

Definition at line 38 of file heur_optcumulative.c.

Referenced by SCIPincludeHeurOptcumulative().

◆ HEUR_USESSUBSCIP

#define HEUR_USESSUBSCIP   TRUE

does the heuristic use a secondary SCIP instance?

Definition at line 39 of file heur_optcumulative.c.

Referenced by SCIPincludeHeurOptcumulative().

◆ DEFAULT_MAXNODES

#define DEFAULT_MAXNODES   1000LL

maximum number of nodes to regard in the subproblem

Definition at line 41 of file heur_optcumulative.c.

Referenced by SCIPincludeHeurOptcumulative().

◆ DEFAULT_MAXPROPROUNDS

#define DEFAULT_MAXPROPROUNDS   -1

maximum number of propagation rounds during probing

Definition at line 42 of file heur_optcumulative.c.

Referenced by SCIPincludeHeurOptcumulative().

◆ heurInitOptcumulative

#define heurInitOptcumulative   NULL

initialization method of primal heuristic (called after problem was transformed)

Definition at line 640 of file heur_optcumulative.c.

Referenced by SCIPincludeHeurOptcumulative().

◆ heurExitOptcumulative

#define heurExitOptcumulative   NULL

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

Definition at line 643 of file heur_optcumulative.c.

Referenced by SCIPincludeHeurOptcumulative().

◆ heurInitsolOptcumulative

#define heurInitsolOptcumulative   NULL

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

Definition at line 646 of file heur_optcumulative.c.

Referenced by SCIPincludeHeurOptcumulative().

◆ heurExitsolOptcumulative

#define heurExitsolOptcumulative   NULL

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

Definition at line 649 of file heur_optcumulative.c.

Referenced by SCIPincludeHeurOptcumulative().

Typedef Documentation

◆ SCIP_ASSIGNMENT

Definition at line 58 of file heur_optcumulative.c.

Function Documentation

◆ heurdataReset()

static void heurdataReset ( SCIP scip,
SCIP_HEURDATA heurdata 
)
static

reset heuristic data structure

Parameters
sciporiginal SCIP data structure
heurdatastructure containing heurdata

Definition at line 86 of file heur_optcumulative.c.

References FALSE, and NULL.

Referenced by SCIPincludeHeurOptcumulative().

◆ applyOptcumulativeFixings()

static SCIP_RETCODE applyOptcumulativeFixings ( SCIP scip,
SCIP_HEURDATA heurdata,
SCIP_Bool infeasible 
)
static

apply variable bound fixing during probing

Parameters
sciporiginal SCIP data structure
heurdatastructure containing heurdata
infeasiblepointer to store whether problem is infeasible

Definition at line 106 of file heur_optcumulative.c.

References BMSclearMemoryArray, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPbacktrackProbing(), SCIPdebugMessage, SCIPfixVarProbing(), SCIPfreeBufferArray, SCIPgetNPseudoBranchCands(), SCIPgetProbingDepth(), SCIPinfinity(), SCIPnewProbingNode(), SCIPpropagateProbing(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetObj(), and SCIPvarGetUbLocal().

Referenced by applyOptcumulative().

◆ initializeSol()

static SCIP_RETCODE initializeSol ( SCIP scip,
SCIP_SOL sol 
)
static

initialize the solution by assign the lower bound of the variable as solution value

Parameters
scipSCIP data structure
solsolution to be initialize

Definition at line 214 of file heur_optcumulative.c.

References SCIP_CALL, SCIP_OKAY, SCIPgetNOrigVars(), SCIPgetOrigVars(), SCIPsetSolVal(), SCIPvarGetLbLocal(), and SCIP_Assignment::vars.

Referenced by applyOptcumulative().

◆ applyOptcumulative()

◆ SCIP_DECL_HEURCOPY()

static SCIP_DECL_HEURCOPY ( heurCopyOptcumulative  )
static

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

Definition at line 576 of file heur_optcumulative.c.

References HEUR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPheurGetName(), and SCIPincludeHeurOptcumulative().

◆ SCIP_DECL_HEURFREE()

static SCIP_DECL_HEURFREE ( heurFreeOptcumulative  )
static

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

Definition at line 590 of file heur_optcumulative.c.

References a, NULL, SCIP_OKAY, SCIPfreeBlockMemory, SCIPfreeBlockMemoryArray, SCIPfreeBlockMemoryArrayNull, SCIPheurGetData(), and SCIPheurSetData().

◆ SCIP_DECL_HEUREXEC()

static SCIP_DECL_HEUREXEC ( heurExecOptcumulative  )
static

◆ SCIPincludeHeurOptcumulative()

◆ SCIPinitHeurOptcumulative()

SCIP_RETCODE SCIPinitHeurOptcumulative ( SCIP scip,
int  nmachines,
int  njobs,
int *  machines,
SCIP_VAR ***  binvars,
SCIP_VAR ***  vars,
int **  durations,
int **  demands,
int *  capacities 
)

initialize the heuristics data structure

Parameters
sciporiginal SCIP data structure
nmachinesnumber of machines
njobsnumber of njobs
machinesnumber of jobs for each machines
binvarsmachnine job matrix (choice variables)
varsmachnine job matrix (start time variables)
durationsmachnine job duration matrix
demandsmachnine job demands matrix
capacitiesmachine capacities

Definition at line 721 of file heur_optcumulative.c.

References HEUR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIP_PLUGINNOTFOUND, SCIPallocBlockMemory, SCIPallocBlockMemoryArray, SCIPduplicateBlockMemoryArray, SCIPerrorMessage, SCIPfindHeur(), SCIPheurGetData(), SCIPsortPtrPtrIntInt(), and TRUE.

Referenced by createCipFormulation().