Scippy

    SCIP

    Solving Constraint Integer Programs

    Detailed Description

    simple and fast LP rounding heuristic

    Author
    Tobias Achterberg
    Marc Pfetsch

    The heuristic also tries to round relaxation solutions if available.

    Definition in file heur_simplerounding.c.

    #include "blockmemshell/memory.h"
    #include "scip/heur_simplerounding.h"
    #include "scip/pub_heur.h"
    #include "scip/pub_message.h"
    #include "scip/pub_var.h"
    #include "scip/scip_branch.h"
    #include "scip/scip_heur.h"
    #include "scip/scip_lp.h"
    #include "scip/scip_mem.h"
    #include "scip/scip_message.h"
    #include "scip/scip_numerics.h"
    #include "scip/scip_param.h"
    #include "scip/scip_prob.h"
    #include "scip/scip_sol.h"
    #include "scip/scip_solvingstats.h"
    #include "scip/scip_var.h"
    #include <string.h>

    Go to the source code of this file.

    Macros

    #define HEUR_NAME   "simplerounding"
     
    #define HEUR_DESC   "simple and fast LP rounding heuristic"
     
    #define HEUR_DISPCHAR   SCIP_HEURDISPCHAR_ROUNDING
     
    #define HEUR_PRIORITY   -30
     
    #define HEUR_FREQ   1
     
    #define HEUR_FREQOFS   0
     
    #define HEUR_MAXDEPTH   -1
     
    #define HEUR_TIMING   SCIP_HEURTIMING_DURINGLPLOOP | SCIP_HEURTIMING_DURINGPRICINGLOOP
     
    #define HEUR_USESSUBSCIP   FALSE
     
    #define DEFAULT_ONCEPERNODE   FALSE
     

    Functions

    static SCIP_RETCODE performSimpleRounding (SCIP *scip, SCIP_SOL *sol, SCIP_VAR **cands, SCIP_Real *candssol, int ncands, SCIP_RESULT *result)
     
    static SCIP_RETCODE performLPSimpleRounding (SCIP *scip, SCIP_HEURDATA *heurdata, SCIP_HEURTIMING heurtiming, SCIP_RESULT *result)
     
    static SCIP_RETCODE performRelaxSimpleRounding (SCIP *scip, SCIP_HEURDATA *heurdata, SCIP_RESULT *result)
     
    static SCIP_DECL_HEURCOPY (heurCopySimplerounding)
     
    static SCIP_DECL_HEURFREE (heurFreeSimplerounding)
     
    static SCIP_DECL_HEURINIT (heurInitSimplerounding)
     
    static SCIP_DECL_HEUREXIT (heurExitSimplerounding)
     
    static SCIP_DECL_HEURINITSOL (heurInitsolSimplerounding)
     
    static SCIP_DECL_HEUREXITSOL (heurExitsolSimplerounding)
     
    static SCIP_DECL_HEUREXEC (heurExecSimplerounding)
     
    SCIP_RETCODE SCIPincludeHeurSimplerounding (SCIP *scip)
     

    Macro Definition Documentation

    ◆ HEUR_NAME

    #define HEUR_NAME   "simplerounding"

    Definition at line 54 of file heur_simplerounding.c.

    ◆ HEUR_DESC

    #define HEUR_DESC   "simple and fast LP rounding heuristic"

    Definition at line 55 of file heur_simplerounding.c.

    ◆ HEUR_DISPCHAR

    #define HEUR_DISPCHAR   SCIP_HEURDISPCHAR_ROUNDING

    Definition at line 56 of file heur_simplerounding.c.

    ◆ HEUR_PRIORITY

    #define HEUR_PRIORITY   -30

    Definition at line 57 of file heur_simplerounding.c.

    ◆ HEUR_FREQ

    #define HEUR_FREQ   1

    Definition at line 58 of file heur_simplerounding.c.

    ◆ HEUR_FREQOFS

    #define HEUR_FREQOFS   0

    Definition at line 59 of file heur_simplerounding.c.

    ◆ HEUR_MAXDEPTH

    #define HEUR_MAXDEPTH   -1

    Definition at line 60 of file heur_simplerounding.c.

    ◆ HEUR_TIMING

    Definition at line 61 of file heur_simplerounding.c.

    ◆ HEUR_USESSUBSCIP

    #define HEUR_USESSUBSCIP   FALSE

    does the heuristic use a secondary SCIP instance?

    Definition at line 62 of file heur_simplerounding.c.

    ◆ DEFAULT_ONCEPERNODE

    #define DEFAULT_ONCEPERNODE   FALSE

    should the heuristic only be called once per node?

    Definition at line 64 of file heur_simplerounding.c.

    Function Documentation

    ◆ performSimpleRounding()

    static SCIP_RETCODE performSimpleRounding ( SCIP scip,
    SCIP_SOL sol,
    SCIP_VAR **  cands,
    SCIP_Real candssol,
    int  ncands,
    SCIP_RESULT result 
    )
    static

    perform rounding

    Parameters
    scipSCIP main data structure
    solsolution to round
    candscandidate variables
    candssolsolutions of candidate variables
    ncandsnumber of candidates
    resultpointer to store the result of the heuristic call

    Definition at line 82 of file heur_simplerounding.c.

    References FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_FOUNDSOL, SCIP_OKAY, SCIP_Real, SCIP_VARSTATUS_COLUMN, SCIPadjustImplicitSolVals(), SCIPallColsInLP(), SCIPdebugMsg, SCIPfeasCeil(), SCIPfeasFloor(), SCIPisFeasIntegral(), SCIPprintSol(), SCIPsetSolVal(), SCIPtrySol(), SCIPvarGetName(), SCIPvarGetObj(), SCIPvarGetStatus(), SCIPvarIsImpliedIntegral(), SCIPvarMayRoundDown(), SCIPvarMayRoundUp(), and TRUE.

    Referenced by performLPSimpleRounding(), and performRelaxSimpleRounding().

    ◆ performLPSimpleRounding()

    static SCIP_RETCODE performLPSimpleRounding ( SCIP scip,
    SCIP_HEURDATA heurdata,
    SCIP_HEURTIMING  heurtiming,
    SCIP_RESULT result 
    )
    static

    perform LP-rounding

    Parameters
    scipSCIP main data structure
    heurdataheuristic data
    heurtimingheuristic timing mask
    resultpointer to store the result of the heuristic call

    Definition at line 185 of file heur_simplerounding.c.

    References NULL, performSimpleRounding(), SCIP_CALL, SCIP_HEURTIMING_DURINGPRICINGLOOP, SCIP_Longint, SCIP_LPSOLSTAT_OPTIMAL, SCIP_OKAY, SCIP_Real, SCIPdebugMsg, SCIPgetCutoffbound(), SCIPgetLPBranchCands(), SCIPgetLPObjval(), SCIPgetLPSolstat(), SCIPgetNLPs(), SCIPisGE(), and SCIPlinkLPSol().

    Referenced by SCIP_DECL_HEUREXEC().

    ◆ performRelaxSimpleRounding()

    static SCIP_RETCODE performRelaxSimpleRounding ( SCIP scip,
    SCIP_HEURDATA heurdata,
    SCIP_RESULT result 
    )
    static

    perform relaxation solution rounding

    Parameters
    scipSCIP main data structure
    heurdataheuristic data
    resultpointer to store the result of the heuristic call

    Definition at line 245 of file heur_simplerounding.c.

    References NULL, performSimpleRounding(), SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPdebugMsg, SCIPfreeBufferArray, SCIPgetRelaxSolVal(), SCIPgetVarsData(), SCIPisFeasIntegral(), SCIPisRelaxSolValid(), and SCIPlinkRelaxSol().

    Referenced by SCIP_DECL_HEUREXEC().

    ◆ SCIP_DECL_HEURCOPY()

    static SCIP_DECL_HEURCOPY ( heurCopySimplerounding  )
    static

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

    Definition at line 338 of file heur_simplerounding.c.

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

    ◆ SCIP_DECL_HEURFREE()

    static SCIP_DECL_HEURFREE ( heurFreeSimplerounding  )
    static

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

    Definition at line 352 of file heur_simplerounding.c.

    References HEUR_NAME, NULL, SCIP_OKAY, SCIPfreeBlockMemory, SCIPheurGetData(), SCIPheurGetName(), and SCIPheurSetData().

    ◆ SCIP_DECL_HEURINIT()

    static SCIP_DECL_HEURINIT ( heurInitSimplerounding  )
    static

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

    Definition at line 372 of file heur_simplerounding.c.

    References HEUR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPcreateSol(), SCIPheurGetData(), and SCIPheurGetName().

    ◆ SCIP_DECL_HEUREXIT()

    static SCIP_DECL_HEUREXIT ( heurExitSimplerounding  )
    static

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

    Definition at line 391 of file heur_simplerounding.c.

    References HEUR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPfreeSol(), SCIPheurGetData(), and SCIPheurGetName().

    ◆ SCIP_DECL_HEURINITSOL()

    static SCIP_DECL_HEURINITSOL ( heurInitsolSimplerounding  )
    static

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

    Definition at line 408 of file heur_simplerounding.c.

    References HEUR_NAME, NULL, SCIP_HEURTIMING_AFTERLPNODE, SCIP_OKAY, SCIPheurGetData(), SCIPheurGetName(), and SCIPheurSetTimingmask().

    ◆ SCIP_DECL_HEUREXITSOL()

    static SCIP_DECL_HEUREXITSOL ( heurExitsolSimplerounding  )
    static

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

    Definition at line 428 of file heur_simplerounding.c.

    References HEUR_TIMING, SCIP_OKAY, and SCIPheurSetTimingmask().

    ◆ SCIP_DECL_HEUREXEC()