Scippy

    SCIP

    Solving Constraint Integer Programs

    Detailed Description

    heuristic for cumulative scheduling with optional activities

    Author
    Stefan Heinz

    Definition in file heur_optcumulative.c.

    #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"

    Definition at line 40 of file heur_optcumulative.c.

    ◆ HEUR_DESC

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

    Definition at line 41 of file heur_optcumulative.c.

    ◆ HEUR_DISPCHAR

    #define HEUR_DISPCHAR   'q'

    Definition at line 42 of file heur_optcumulative.c.

    ◆ HEUR_PRIORITY

    #define HEUR_PRIORITY   -1106000

    Definition at line 43 of file heur_optcumulative.c.

    ◆ HEUR_FREQ

    #define HEUR_FREQ   -1

    Definition at line 44 of file heur_optcumulative.c.

    ◆ HEUR_FREQOFS

    #define HEUR_FREQOFS   0

    Definition at line 45 of file heur_optcumulative.c.

    ◆ HEUR_MAXDEPTH

    #define HEUR_MAXDEPTH   -1

    Definition at line 46 of file heur_optcumulative.c.

    ◆ HEUR_TIMING

    #define HEUR_TIMING   SCIP_HEURTIMING_BEFORENODE

    Definition at line 47 of file heur_optcumulative.c.

    ◆ HEUR_USESSUBSCIP

    #define HEUR_USESSUBSCIP   TRUE

    does the heuristic use a secondary SCIP instance?

    Definition at line 48 of file heur_optcumulative.c.

    ◆ DEFAULT_MAXNODES

    #define DEFAULT_MAXNODES   1000LL

    maximum number of nodes to regard in the subproblem

    Definition at line 50 of file heur_optcumulative.c.

    ◆ DEFAULT_MAXPROPROUNDS

    #define DEFAULT_MAXPROPROUNDS   -1

    maximum number of propagation rounds during probing

    Definition at line 51 of file heur_optcumulative.c.

    ◆ heurInitOptcumulative

    #define heurInitOptcumulative   NULL

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

    Definition at line 620 of file heur_optcumulative.c.

    ◆ heurExitOptcumulative

    #define heurExitOptcumulative   NULL

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

    Definition at line 623 of file heur_optcumulative.c.

    ◆ heurInitsolOptcumulative

    #define heurInitsolOptcumulative   NULL

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

    Definition at line 626 of file heur_optcumulative.c.

    ◆ heurExitsolOptcumulative

    #define heurExitsolOptcumulative   NULL

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

    Definition at line 629 of file heur_optcumulative.c.

    Typedef Documentation

    ◆ SCIP_ASSIGNMENT

    Definition at line 67 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 95 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 115 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 223 of file heur_optcumulative.c.

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

    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 556 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 570 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 701 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().