SCIP

    Solving Constraint Integer Programs

    Detailed Description

    methods for IIS finders

    Author
    Mark Turner

    Definition in file iisfinder.c.

    #include <assert.h>
    #include "scip/set.h"
    #include "scip/clock.h"
    #include "scip/misc.h"
    #include "scip/paramset.h"
    #include "scip/scip.h"
    #include "scip/cons_linear.h"
    #include "scip/iisfinder.h"
    #include "scip/iisfinder_greedy.h"
    #include "scip/struct_iisfinder.h"
    #include "scip/type_misc.h"

    Go to the source code of this file.

    Functions

    static SCIP_DECL_PARAMCHGD (paramChgdIISfinderPriority)
     
    static SCIP_RETCODE createSubscipIIS (SCIP_SET *set, SCIP_IIS *iis, SCIP_Real timelim, SCIP_Longint nodelim, SCIP_Bool *success)
     
    static SCIP_RETCODE checkTrivialInfeas (SCIP *scip, SCIP_Bool *trivial)
     
    static SCIP_RETCODE doIISfinderCreate (SCIP_IISFINDER **iisfinder, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, int priority, SCIP_DECL_IISFINDERCOPY((*iisfindercopy)), SCIP_DECL_IISFINDERFREE((*iisfinderfree)), SCIP_DECL_IISFINDEREXEC((*iisfinderexec)), SCIP_IISFINDERDATA *iisfinderdata)
     
    SCIP_RETCODE SCIPiisfinderCreate (SCIP_IISFINDER **iisfinder, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, int priority, SCIP_DECL_IISFINDERCOPY((*iisfindercopy)), SCIP_DECL_IISFINDERFREE((*iisfinderfree)), SCIP_DECL_IISFINDEREXEC((*iisfinderexec)), SCIP_IISFINDERDATA *iisfinderdata)
     
    const char * SCIPiisfinderGetName (SCIP_IISFINDER *iisfinder)
     
    SCIP_RETCODE SCIPiisGenerate (SCIP_SET *set)
     
    const char * SCIPiisfinderGetDesc (SCIP_IISFINDER *iisfinder)
     
    SCIP_RETCODE SCIPiisfinderCopyInclude (SCIP_IISFINDER *iisfinder, SCIP_SET *set)
     
    SCIP_RETCODE SCIPiisfinderFree (SCIP_IISFINDER **iisfinder, SCIP_SET *set, BMS_BLKMEM *blkmem)
     
    SCIP_IISFINDERDATA * SCIPiisfinderGetData (SCIP_IISFINDER *iisfinder)
     
    void SCIPiisfinderSetData (SCIP_IISFINDER *iisfinder, SCIP_IISFINDERDATA *iisfinderdata)
     
    int SCIPiisfinderGetPriority (SCIP_IISFINDER *iisfinder)
     
    void SCIPiisfinderEnableOrDisableClocks (SCIP_IISFINDER *iisfinder, SCIP_Bool enable)
     
    void SCIPiisfinderSetCopy (SCIP_IISFINDER *iisfinder, SCIP_DECL_IISFINDERCOPY((*iisfindercopy)))
     
    void SCIPiisfinderSetFree (SCIP_IISFINDER *iisfinder, SCIP_DECL_IISFINDERFREE((*iisfinderfree)))
     
    void SCIPiisfinderSetPriority (SCIP_IISFINDER *iisfinder, SCIP_SET *set, int priority)
     
    SCIP_Real SCIPiisfinderGetTime (SCIP_IISFINDER *iisfinder)
     
    void SCIPiisfinderInfoMessage (SCIP_IIS *iis, SCIP_Bool printheaders)
     
    SCIP_RETCODE SCIPiisCreate (SCIP_IIS **iis, SCIP_SET *set, BMS_BLKMEM *blkmem)
     
    SCIP_RETCODE SCIPiisFree (SCIP_IIS **iis, BMS_BLKMEM *blkmem)
     
    SCIP_RETCODE SCIPiisReset (SCIP_IIS **iis)
     
    SCIP_Real SCIPiisGetTime (SCIP_IIS *iis)
     
    SCIP_Bool SCIPiisIsSubscipInfeasible (SCIP_IIS *iis)
     
    SCIP_Bool SCIPiisIsSubscipIrreducible (SCIP_IIS *iis)
     
    SCIP_Longint SCIPiisGetNNodes (SCIP_IIS *iis)
     
    void SCIPiisSetSubscipInfeasible (SCIP_IIS *iis, SCIP_Bool infeasible)
     
    void SCIPiisSetSubscipIrreducible (SCIP_IIS *iis, SCIP_Bool irreducible)
     
    void SCIPiisAddNNodes (SCIP_IIS *iis, SCIP_Longint nnodes)
     
    SCIP_RANDNUMGEN * SCIPiisGetRandnumgen (SCIP_IIS *iis)
     
    SCIP * SCIPiisGetSubscip (SCIP_IIS *iis)
     
    SCIP_CONS * SCIPiisGetSubscipCons (SCIP_IIS *iis, SCIP_CONS *cons)
     
    SCIP_VAR * SCIPiisGetSubscipVar (SCIP_IIS *iis, SCIP_VAR *var)
     
    SCIP_HASHMAP * SCIPiisGetVarsmap (SCIP_IIS *iis)
     
    SCIP_HASHMAP * SCIPiisGetConssmap (SCIP_IIS *iis)
     
     SCIP_DECL_SORTPTRCOMP (SCIPiisfinderComp)
     

    Function Documentation

    ◆ SCIP_DECL_PARAMCHGD()

    static SCIP_DECL_PARAMCHGD ( paramChgdIISfinderPriority  )
    static

    method to call, when the priority of an IIS finder was changed

    Definition at line 49 of file iisfinder.c.

    References NULL, SCIP_CALL, SCIP_OKAY, SCIPparamGetData(), SCIPparamGetInt(), and SCIPsetIISfinderPriority().

    ◆ createSubscipIIS()

    static SCIP_RETCODE createSubscipIIS ( SCIP_SET *  set,
    SCIP_IIS *  iis,
    SCIP_Real  timelim,
    SCIP_Longint  nodelim,
    SCIP_Bool *  success 
    )
    static

    internal method for creating the subscip that will hold the IIS

    Parameters
    setglobal SCIP settings
    iispointer to store IIS
    timelimtimelimit
    nodelimnodelimit
    successwhether the created subscip is complete

    Definition at line 64 of file iisfinder.c.

    References SCIP_IIS::conssmap, FALSE, SCIP_IIS::iistime, NULL, SCIP_CALL, SCIP_OKAY, SCIPblkmem(), SCIPchgVarObj(), SCIPclockGetTime(), SCIPcopyOrig(), SCIPcopyParamSettings(), SCIPcreate(), SCIPdebugMsg, SCIPgetNOrigConss(), SCIPgetNOrigVars(), SCIPgetOrigVars(), SCIPhashmapCreate(), SCIPiisReset(), SCIPsetBoolParam(), SCIPsetIntParam(), SCIPsetLongintParam(), SCIPsetRealParam(), SCIPsetSubscipsOff(), SCIP_IIS::subscip, TRUE, and SCIP_IIS::varsmap.

    Referenced by SCIPiisGenerate().

    ◆ checkTrivialInfeas()

    static SCIP_RETCODE checkTrivialInfeas ( SCIP *  scip,
    SCIP_Bool *  trivial 
    )
    static

    checks the problem for trivial infeasibility reasons, e.g. contradicting bounds

    Parameters
    scippointer to SCIP
    trivialpointer to store whether the problem is trivially infeasible

    Definition at line 136 of file iisfinder.c.

    References FALSE, NULL, SCIP_Bool, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPconsGetHdlr(), SCIPconsGetLhs(), SCIPconsGetRhs(), SCIPconshdlrGetName(), SCIPdelCons(), SCIPgetConss(), SCIPgetNConss(), SCIPgetNOrigVars(), SCIPgetNVarsLinear(), SCIPgetOrigVars(), SCIPgetValsLinear(), SCIPgetVarsLinear(), SCIPisGT(), SCIPisInfinity(), SCIPisSumLT(), SCIPvarGetLbOriginal(), SCIPvarGetUbOriginal(), and TRUE.

    Referenced by SCIPiisGenerate().

    ◆ doIISfinderCreate()

    static SCIP_RETCODE doIISfinderCreate ( SCIP_IISFINDER **  iisfinder,
    SCIP_SET *  set,
    SCIP_MESSAGEHDLR *  messagehdlr,
    BMS_BLKMEM *  blkmem,
    const char *  name,
    const char *  desc,
    int  priority,
    SCIP_DECL_IISFINDERCOPY((*iisfindercopy))  ,
    SCIP_DECL_IISFINDERFREE((*iisfinderfree))  ,
    SCIP_DECL_IISFINDEREXEC((*iisfinderexec))  ,
    SCIP_IISFINDERDATA *  iisfinderdata 
    )
    static

    internal method for creating an IIS finder

    Parameters
    iisfinderpointer to store IIS finder
    setglobal SCIP settings
    messagehdlrmessage handler
    blkmemblock memory for parameter settings
    namename of IIS finder
    descdescription of IIS finder
    prioritypriority of the IIS finder
    iisfinderdataIIS finder data

    Definition at line 242 of file iisfinder.c.

    References BMSallocClearBlockMemory, BMSduplicateBlockMemoryArray, FALSE, NULL, paramname, SCIP_ALLOC, SCIP_CALL, SCIP_CLOCKTYPE_DEFAULT, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPclockCreate(), SCIPsetAddIntParam(), and SCIPsnprintf().

    Referenced by SCIPiisfinderCreate().

    ◆ SCIPiisfinderCreate()

    SCIP_RETCODE SCIPiisfinderCreate ( SCIP_IISFINDER **  iisfinder,
    SCIP_SET *  set,
    SCIP_MESSAGEHDLR *  messagehdlr,
    BMS_BLKMEM *  blkmem,
    const char *  name,
    const char *  desc,
    int  priority,
    SCIP_DECL_IISFINDERCOPY((*iisfindercopy))  ,
    SCIP_DECL_IISFINDERFREE((*iisfinderfree))  ,
    SCIP_DECL_IISFINDEREXEC((*iisfinderexec))  ,
    SCIP_IISFINDERDATA *  iisfinderdata 
    )

    creates an IIS finder

    Parameters
    iisfinderpointer to store IIS finder
    setglobal SCIP settings
    messagehdlrmessage handler
    blkmemblock memory for parameter settings
    namename of IIS finder
    descdescription of IIS finder
    prioritypriority of the IIS finder in standard mode
    iisfinderdataIIS finder data

    Definition at line 289 of file iisfinder.c.

    References doIISfinderCreate(), NULL, SCIP_CALL_FINALLY, SCIP_OKAY, and SCIPiisfinderFree().

    Referenced by SCIPincludeIISfinder(), and SCIPincludeIISfinderBasic().

    ◆ SCIPiisGenerate()

    SCIP_RETCODE SCIPiisGenerate ( SCIP_SET *  set)

    calls IIS finder generation method

    Parameters
    setglobal SCIP settings

    Definition at line 325 of file iisfinder.c.

    References checkTrivialInfeas(), SCIP_IIS::conssmap, createSubscipIIS(), FALSE, SCIP_IISfinder::iisfindertime, SCIP_IIS::iistime, SCIP_IIS::infeasible, SCIP_IIS::irreducible, SCIP_IISfinder::name, SCIP_IIS::nnodes, NULL, SCIP_Bool, SCIP_CALL, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_Longint, SCIP_OKAY, SCIP_Real, SCIP_STAGE_PROBLEM, SCIP_STAGE_SOLVED, SCIP_STATUS_BESTSOLLIMIT, SCIP_STATUS_DUALLIMIT, SCIP_STATUS_GAPLIMIT, SCIP_STATUS_INFEASIBLE, SCIP_STATUS_INFORUNBD, SCIP_STATUS_MEMLIMIT, SCIP_STATUS_NODELIMIT, SCIP_STATUS_OPTIMAL, SCIP_STATUS_PRIMALLIMIT, SCIP_STATUS_RESTARTLIMIT, SCIP_STATUS_SOLLIMIT, SCIP_STATUS_STALLNODELIMIT, SCIP_STATUS_TERMINATE, SCIP_STATUS_TIMELIMIT, SCIP_STATUS_TOTALNODELIMIT, SCIP_STATUS_UNBOUNDED, SCIP_STATUS_UNKNOWN, SCIP_STATUS_USERINTERRUPT, SCIP_SUCCESS, SCIPblkmem(), SCIPclockGetTime(), SCIPclockStart(), SCIPclockStop(), SCIPconsGetHdlr(), SCIPconsGetNUses(), SCIPconshdlrGetName(), SCIPdebugMsg, SCIPdelCons(), SCIPdelVar(), SCIPfreeTransform(), SCIPgetBoolParam(), SCIPgetIIS(), SCIPgetLongintParam(), SCIPgetNOrigConss(), SCIPgetNOrigVars(), SCIPgetNTotalNodes(), SCIPgetNVarsLinear(), SCIPgetOrigConss(), SCIPgetOrigVars(), SCIPgetRealParam(), SCIPgetStage(), SCIPgetStatus(), SCIPgetVarsLinear(), SCIPhashmapCreate(), SCIPhashmapFree(), SCIPhashmapGetImage(), SCIPhashmapInsert(), SCIPhashmapRemoveAll(), SCIPiisfinderInfoMessage(), SCIPiisGetNNodes(), SCIPiisGetTime(), SCIPiisGreedyMakeIrreducible(), SCIPiisReset(), SCIPiisSetSubscipIrreducible(), SCIPinfoMessage(), SCIPisInfinity(), SCIPsetSortIISfinders(), SCIPsolve(), SCIPvarGetLbOriginal(), SCIPvarGetNegatedVar(), SCIPvarGetNUses(), SCIPvarGetUbOriginal(), SCIP_IIS::subscip, TRUE, and SCIP_IIS::varsmap.

    Referenced by SCIPgenerateIIS().

    ◆ SCIPiisfinderCopyInclude()

    SCIP_RETCODE SCIPiisfinderCopyInclude ( SCIP_IISFINDER *  iisfinder,
    SCIP_SET *  set 
    )

    copies the given IIS finder to a new scip

    Parameters
    iisfinderIIS finder
    setSCIP_SET of SCIP to copy to

    Definition at line 658 of file iisfinder.c.

    References NULL, SCIP_CALL, SCIP_OKAY, SCIPiisfinderGetName(), and SCIPsetDebugMsg.

    Referenced by SCIPsetCopyPlugins().

    ◆ SCIPiisfinderFree()

    SCIP_RETCODE SCIPiisfinderFree ( SCIP_IISFINDER **  iisfinder,
    SCIP_SET *  set,
    BMS_BLKMEM *  blkmem 
    )

    frees memory of IIS finder

    Parameters
    iisfinderIIS finder
    setglobal SCIP settings
    blkmemblock memory

    Definition at line 676 of file iisfinder.c.

    References BMSfreeBlockMemory, BMSfreeBlockMemoryArrayNull, NULL, SCIP_CALL, SCIP_OKAY, and SCIPclockFree().

    Referenced by SCIPiisfinderCreate().

    ◆ SCIPiisfinderEnableOrDisableClocks()

    void SCIPiisfinderEnableOrDisableClocks ( SCIP_IISFINDER *  iisfinder,
    SCIP_Bool  enable 
    )

    enables or disables all clocks of iisfinder, depending on the value of the flag

    Parameters
    iisfinderthe IIS finder for which all clocks should be enabled or disabled
    enableshould the clocks of the IIS be enabled?

    Definition at line 737 of file iisfinder.c.

    References SCIP_IISfinder::iisfindertime, NULL, and SCIPclockEnableOrDisable().

    ◆ SCIPiisfinderSetCopy()

    void SCIPiisfinderSetCopy ( SCIP_IISFINDER *  iisfinder,
    SCIP_DECL_IISFINDERCOPY((*iisfindercopy))   
    )

    sets copy method of IIS finder

    Parameters
    iisfinderIIS finder

    Definition at line 748 of file iisfinder.c.

    References NULL.

    Referenced by SCIPsetIISfinderCopy().

    ◆ SCIPiisfinderSetFree()

    void SCIPiisfinderSetFree ( SCIP_IISFINDER *  iisfinder,
    SCIP_DECL_IISFINDERFREE((*iisfinderfree))   
    )

    sets destructor method of IIS finder

    Parameters
    iisfinderIIS finder

    Definition at line 759 of file iisfinder.c.

    References NULL.

    Referenced by SCIPsetIISfinderFree().

    ◆ SCIPiisfinderSetPriority()

    void SCIPiisfinderSetPriority ( SCIP_IISFINDER *  iisfinder,
    SCIP_SET *  set,
    int  priority 
    )

    sets priority of IIS finder

    Parameters
    iisfinderIIS finder
    setglobal SCIP settings
    prioritynew priority of the IIS finder

    Definition at line 770 of file iisfinder.c.

    References FALSE, NULL, and SCIP_IISfinder::priority.

    Referenced by SCIPsetIISfinderPriority().

    ◆ SCIPiisCreate()

    SCIP_RETCODE SCIPiisCreate ( SCIP_IIS **  iis,
    SCIP_SET *  set,
    BMS_BLKMEM *  blkmem 
    )

    creates and captures a new IIS

    Parameters
    iispointer to return the created IIS
    setglobal SCIP settings
    blkmemblock memory

    Definition at line 830 of file iisfinder.c.

    References BMSallocBlockMemory, FALSE, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_CLOCKTYPE_DEFAULT, SCIP_OKAY, SCIPclockCreate(), SCIPrandomCreate(), and SCIPsetInitializeRandomSeed().

    Referenced by doScipCreate().

    ◆ SCIPiisFree()

    SCIP_RETCODE SCIPiisFree ( SCIP_IIS **  iis,
    BMS_BLKMEM *  blkmem 
    )

    releases an IIS

    Parameters
    iispointer to the IIS
    blkmemblock memory

    Definition at line 855 of file iisfinder.c.

    References BMSfreeBlockMemory, NULL, SCIP_CALL, SCIP_OKAY, SCIPclockFree(), SCIPfree(), SCIPhashmapFree(), and SCIPrandomFree().

    Referenced by SCIPfree().

    ◆ SCIPiisReset()

    SCIP_RETCODE SCIPiisReset ( SCIP_IIS **  iis)

    reset an IIS (in case one exists from a previous solve)

    Parameters
    iispointer to the IIS

    Definition at line 897 of file iisfinder.c.

    References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPclockReset(), SCIPfree(), and SCIPhashmapFree().

    Referenced by createSubscipIIS(), and SCIPiisGenerate().