Scippy

    SCIP

    Solving Constraint Integer Programs

    Detailed Description

    LP interface for Xpress-MP.

    Author
    Tobias Achterberg
    Michael Perregaard
    Livio Bertacco
    Stefan Heinz

    This interface was revised for Xpress 26. Therefore, we removed all legacy code.

    Xpress requires that column and row names are unique. Since column and row names are not needed we ignore all column and row names to avoid the uniqueness issue.

    Definition in file lpi_xprs.c.

    #include <assert.h>
    #include <string.h>
    #include <strings.h>
    #include "xprs.h"
    #include "scip/bitencode.h"
    #include "scip/pub_misc.h"
    #include "scip/pub_message.h"
    #include "lpi/lpi.h"
    #include "tinycthread/tinycthread.h"

    Go to the source code of this file.

    Data Structures

    struct  SCIP_LPi
     
    struct  SCIP_LPiState
     

    Macros

    #define XPRS_LPQUICKPRESOLVE   8207
     
    #define XPRS_LP_OPTIMAL_SCALEDINFEAS   16
     
    #define CHECK_ZERO(messagehdlr, x)
     
    #define ABORT_ZERO(messagehdlr, retval, x)
     
    #define COLS_PER_PACKET   SCIP_DUALPACKETSIZE
     
    #define ROWS_PER_PACKET   SCIP_DUALPACKETSIZE
     

    Typedefs

    typedef SCIP_DUALPACKET COLPACKET
     
    typedef SCIP_DUALPACKET ROWPACKET
     

    Functions

    static void invalidateSolution (SCIP_LPI *lpi)
     
    Debug check methods
    static void debugCheckColrang (SCIP_LPI *lpi, int firstcol, int lastcol)
     
    static void debugCheckRowrang (SCIP_LPI *lpi, int firstrow, int lastrow)
     
    Dynamic memory arrays
    static SCIP_RETCODE ensureBoundchgMem (SCIP_LPI *lpi, int num)
     
    static SCIP_RETCODE ensureSidechgMem (SCIP_LPI *lpi, int num)
     
    static SCIP_RETCODE ensureValMem (SCIP_LPI *lpi, int num)
     
    static SCIP_RETCODE ensureCstatMem (SCIP_LPI *lpi, int num)
     
    static SCIP_RETCODE ensureRstatMem (SCIP_LPI *lpi, int num)
     
    LPi state methods
    static int colpacketNum (int ncols)
     
    static int rowpacketNum (int nrows)
     
    static void lpistatePack (SCIP_LPISTATE *lpistate, const int *cstat, const int *rstat)
     
    static void lpistateUnpack (const SCIP_LPISTATE *lpistate, int *cstat, int *rstat)
     
    static SCIP_RETCODE lpistateCreate (SCIP_LPISTATE **lpistate, BMS_BLKMEM *blkmem, int ncols, int nrows)
     
    static void lpistateFree (SCIP_LPISTATE **lpistate, BMS_BLKMEM *blkmem)
     
    Conversion methods
    static int xprsObjsen (SCIP_OBJSEN const objsen)
     
    static void convertSides (SCIP_LPI *lpi, int nrows, const SCIP_Real *lhss, const SCIP_Real *rhss)
     
    static void reconvertBothSides (SCIP_LPI *lpi, int nrows, SCIP_Real *lhss, SCIP_Real *rhss)
     
    static void reconvertLhs (SCIP_LPI *lpi, int nrows, SCIP_Real *lhss)
     
    static void reconvertRhs (SCIP_LPI *lpi, int nrows, SCIP_Real *rhss)
     
    static void reconvertSides (SCIP_LPI *lpi, int nrows, SCIP_Real *lhs, SCIP_Real *rhs)
     
    LPI Creation and Destruction Methods
    SCIP_RETCODE SCIPlpiCreate (SCIP_LPI **lpi, SCIP_MESSAGEHDLR *messagehdlr, const char *name, SCIP_OBJSEN objsen)
     
    SCIP_RETCODE SCIPlpiFree (SCIP_LPI **lpi)
     
    Modification Methods
    SCIP_RETCODE SCIPlpiLoadColLP (SCIP_LPI *lpi, SCIP_OBJSEN objsen, int ncols, const SCIP_Real *obj, const SCIP_Real *lb, const SCIP_Real *ub, char **colnames, int nrows, const SCIP_Real *lhs, const SCIP_Real *rhs, char **rownames, int nnonz, const int *beg, const int *ind, const SCIP_Real *val)
     
    SCIP_RETCODE SCIPlpiAddCols (SCIP_LPI *lpi, int ncols, const SCIP_Real *obj, const SCIP_Real *lb, const SCIP_Real *ub, char **colnames, int nnonz, const int *beg, const int *ind, const SCIP_Real *val)
     
    SCIP_RETCODE SCIPlpiDelCols (SCIP_LPI *lpi, int firstcol, int lastcol)
     
    SCIP_RETCODE SCIPlpiDelColset (SCIP_LPI *lpi, int *dstat)
     
    SCIP_RETCODE SCIPlpiAddRows (SCIP_LPI *lpi, int nrows, const SCIP_Real *lhs, const SCIP_Real *rhs, char **rownames, int nnonz, const int *beg, const int *ind, const SCIP_Real *val)
     
    SCIP_RETCODE SCIPlpiDelRows (SCIP_LPI *lpi, int firstrow, int lastrow)
     
    SCIP_RETCODE SCIPlpiDelRowset (SCIP_LPI *lpi, int *dstat)
     
    SCIP_RETCODE SCIPlpiClear (SCIP_LPI *lpi)
     
    SCIP_RETCODE SCIPlpiChgBounds (SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *lb, const SCIP_Real *ub)
     
    SCIP_RETCODE SCIPlpiChgSides (SCIP_LPI *lpi, int nrows, const int *ind, const SCIP_Real *lhs, const SCIP_Real *rhs)
     
    SCIP_RETCODE SCIPlpiChgCoef (SCIP_LPI *lpi, int row, int col, SCIP_Real newval)
     
    SCIP_RETCODE SCIPlpiChgObjsen (SCIP_LPI *lpi, SCIP_OBJSEN objsense)
     
    SCIP_RETCODE SCIPlpiChgObj (SCIP_LPI *lpi, int ncols, const int *ind, const SCIP_Real *obj)
     
    SCIP_RETCODE SCIPlpiScaleRow (SCIP_LPI *lpi, int row, SCIP_Real scaleval)
     
    SCIP_RETCODE SCIPlpiScaleCol (SCIP_LPI *lpi, int col, SCIP_Real scaleval)
     
    Data Accessing Methods
    SCIP_RETCODE SCIPlpiGetNRows (SCIP_LPI *lpi, int *nrows)
     
    SCIP_RETCODE SCIPlpiGetNCols (SCIP_LPI *lpi, int *ncols)
     
    SCIP_RETCODE SCIPlpiGetNNonz (SCIP_LPI *lpi, int *nnonz)
     
    SCIP_RETCODE SCIPlpiGetCols (SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *lb, SCIP_Real *ub, int *nnonz, int *beg, int *ind, SCIP_Real *val)
     
    SCIP_RETCODE SCIPlpiGetRows (SCIP_LPI *lpi, int firstrow, int lastrow, SCIP_Real *lhss, SCIP_Real *rhss, int *nnonz, int *beg, int *ind, SCIP_Real *val)
     
    SCIP_RETCODE SCIPlpiGetColNames (SCIP_LPI *lpi, int firstcol, int lastcol, char **colnames, char *namestorage, int namestoragesize, int *storageleft)
     
    SCIP_RETCODE SCIPlpiGetRowNames (SCIP_LPI *lpi, int firstrow, int lastrow, char **rownames, char *namestorage, int namestoragesize, int *storageleft)
     
    SCIP_RETCODE SCIPlpiGetObjsen (SCIP_LPI *lpi, SCIP_OBJSEN *objsen)
     
    SCIP_RETCODE SCIPlpiGetObj (SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *vals)
     
    SCIP_RETCODE SCIPlpiGetBounds (SCIP_LPI *lpi, int firstcol, int lastcol, SCIP_Real *lbs, SCIP_Real *ubs)
     
    SCIP_RETCODE SCIPlpiGetSides (SCIP_LPI *lpi, int firstrow, int lastrow, SCIP_Real *lhss, SCIP_Real *rhss)
     
    SCIP_RETCODE SCIPlpiGetCoef (SCIP_LPI *lpi, int row, int col, SCIP_Real *val)
     
    Solving Methods
    static SCIP_RETCODE lpiSolve (SCIP_LPI *lpi, const char *method)
     
    SCIP_RETCODE SCIPlpiSolvePrimal (SCIP_LPI *lpi)
     
    SCIP_RETCODE SCIPlpiSolveDual (SCIP_LPI *lpi)
     
    SCIP_RETCODE SCIPlpiSolveBarrier (SCIP_LPI *lpi, SCIP_Bool crossover)
     
    SCIP_RETCODE SCIPlpiStartStrongbranch (SCIP_LPI *lpi)
     
    SCIP_RETCODE SCIPlpiEndStrongbranch (SCIP_LPI *lpi)
     
    static SCIP_RETCODE lpiStrongbranch (SCIP_LPI *lpi, int col, SCIP_Real psol, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, int *iter)
     
    static SCIP_RETCODE lpiStrongbranches (SCIP_LPI *lpi, int *cols, int ncols, SCIP_Real *psols, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, int *iter)
     
    SCIP_RETCODE SCIPlpiStrongbranchFrac (SCIP_LPI *lpi, int col, SCIP_Real psol, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, int *iter)
     
    SCIP_RETCODE SCIPlpiStrongbranchesFrac (SCIP_LPI *lpi, int *cols, int ncols, SCIP_Real *psols, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, int *iter)
     
    SCIP_RETCODE SCIPlpiStrongbranchInt (SCIP_LPI *lpi, int col, SCIP_Real psol, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, int *iter)
     
    SCIP_RETCODE SCIPlpiStrongbranchesInt (SCIP_LPI *lpi, int *cols, int ncols, SCIP_Real *psols, int itlim, SCIP_Real *down, SCIP_Real *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, int *iter)
     
    Solution Information Methods
    SCIP_Bool SCIPlpiWasSolved (SCIP_LPI *lpi)
     
    SCIP_RETCODE SCIPlpiGetSolFeasibility (SCIP_LPI *lpi, SCIP_Bool *primalfeasible, SCIP_Bool *dualfeasible)
     
    SCIP_Bool SCIPlpiExistsPrimalRay (SCIP_LPI *lpi)
     
    SCIP_Bool SCIPlpiHasPrimalRay (SCIP_LPI *lpi)
     
    SCIP_Bool SCIPlpiIsPrimalUnbounded (SCIP_LPI *lpi)
     
    SCIP_Bool SCIPlpiIsPrimalInfeasible (SCIP_LPI *lpi)
     
    SCIP_Bool SCIPlpiIsPrimalFeasible (SCIP_LPI *lpi)
     
    SCIP_Bool SCIPlpiExistsDualRay (SCIP_LPI *lpi)
     
    SCIP_Bool SCIPlpiHasDualRay (SCIP_LPI *lpi)
     
    SCIP_Bool SCIPlpiIsDualUnbounded (SCIP_LPI *lpi)
     
    SCIP_Bool SCIPlpiIsDualInfeasible (SCIP_LPI *lpi)
     
    SCIP_Bool SCIPlpiIsDualFeasible (SCIP_LPI *lpi)
     
    SCIP_Bool SCIPlpiIsOptimal (SCIP_LPI *lpi)
     
    SCIP_Bool SCIPlpiIsStable (SCIP_LPI *lpi)
     
    SCIP_Bool SCIPlpiIsObjlimExc (SCIP_LPI *lpi)
     
    SCIP_Bool SCIPlpiIsIterlimExc (SCIP_LPI *lpi)
     
    SCIP_Bool SCIPlpiIsTimelimExc (SCIP_LPI *lpi)
     
    int SCIPlpiGetInternalStatus (SCIP_LPI *lpi)
     
    SCIP_RETCODE SCIPlpiIgnoreInstability (SCIP_LPI *lpi, SCIP_Bool *success)
     
    SCIP_RETCODE SCIPlpiGetObjval (SCIP_LPI *lpi, SCIP_Real *objval)
     
    SCIP_RETCODE SCIPlpiGetSol (SCIP_LPI *lpi, SCIP_Real *objval, SCIP_Real *primsol, SCIP_Real *dualsol, SCIP_Real *activity, SCIP_Real *redcost)
     
    SCIP_RETCODE SCIPlpiGetPrimalRay (SCIP_LPI *lpi, SCIP_Real *ray)
     
    SCIP_RETCODE SCIPlpiGetDualfarkas (SCIP_LPI *lpi, SCIP_Real *dualfarkas)
     
    SCIP_RETCODE SCIPlpiGetIterations (SCIP_LPI *lpi, int *iterations)
     
    SCIP_RETCODE SCIPlpiGetRealSolQuality (SCIP_LPI *lpi, SCIP_LPSOLQUALITY qualityindicator, SCIP_Real *quality)
     
    LP Basis Methods
    SCIP_RETCODE SCIPlpiGetBase (SCIP_LPI *lpi, int *cstat, int *rstat)
     
    SCIP_RETCODE SCIPlpiSetBase (SCIP_LPI *lpi, const int *cstat, const int *rstat)
     
    SCIP_RETCODE SCIPlpiGetBasisInd (SCIP_LPI *lpi, int *bind)
     
    SCIP_RETCODE SCIPlpiGetBInvRow (SCIP_LPI *lpi, int row, SCIP_Real *coef, int *inds, int *ninds)
     
    SCIP_RETCODE SCIPlpiGetBInvCol (SCIP_LPI *lpi, int c, SCIP_Real *coef, int *inds, int *ninds)
     
    SCIP_RETCODE SCIPlpiGetBInvARow (SCIP_LPI *lpi, int r, const SCIP_Real *binvrow, SCIP_Real *coef, int *inds, int *ninds)
     
    SCIP_RETCODE SCIPlpiGetBInvACol (SCIP_LPI *lpi, int c, SCIP_Real *coef, int *inds, int *ninds)
     
    LP State Methods
    SCIP_RETCODE SCIPlpiGetState (SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE **lpistate)
     
    SCIP_RETCODE SCIPlpiSetState (SCIP_LPI *lpi, BMS_BLKMEM *blkmem, const SCIP_LPISTATE *lpistate)
     
    SCIP_RETCODE SCIPlpiClearState (SCIP_LPI *lpi)
     
    SCIP_RETCODE SCIPlpiFreeState (SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE **lpistate)
     
    SCIP_Bool SCIPlpiHasStateBasis (SCIP_LPI *lpi, SCIP_LPISTATE *lpistate)
     
    SCIP_RETCODE SCIPlpiReadState (SCIP_LPI *lpi, const char *fname)
     
    SCIP_RETCODE SCIPlpiWriteState (SCIP_LPI *lpi, const char *fname)
     
    LP Pricing Norms Methods
    SCIP_RETCODE SCIPlpiGetNorms (SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS **lpinorms)
     
    SCIP_RETCODE SCIPlpiSetNorms (SCIP_LPI *lpi, BMS_BLKMEM *blkmem, const SCIP_LPINORMS *lpinorms)
     
    SCIP_RETCODE SCIPlpiFreeNorms (SCIP_LPI *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS **lpinorms)
     
    Parameter Methods
    SCIP_RETCODE SCIPlpiGetIntpar (SCIP_LPI *lpi, SCIP_LPPARAM type, int *ival)
     
    SCIP_RETCODE SCIPlpiSetIntpar (SCIP_LPI *lpi, SCIP_LPPARAM type, int ival)
     
    SCIP_RETCODE SCIPlpiGetRealpar (SCIP_LPI *lpi, SCIP_LPPARAM type, SCIP_Real *dval)
     
    SCIP_RETCODE SCIPlpiSetRealpar (SCIP_LPI *lpi, SCIP_LPPARAM type, SCIP_Real dval)
     
    SCIP_RETCODE SCIPlpiInterrupt (SCIP_LPI *lpi, SCIP_Bool interrupt)
     
    Numerical Methods
    SCIP_Real SCIPlpiInfinity (SCIP_LPI *lpi)
     
    SCIP_Bool SCIPlpiIsInfinity (SCIP_LPI *lpi, SCIP_Real val)
     
    File Interface Methods
    SCIP_RETCODE SCIPlpiReadLP (SCIP_LPI *lpi, const char *fname)
     
    SCIP_RETCODE SCIPlpiWriteLP (SCIP_LPI *lpi, const char *fname)
     

    Miscellaneous Methods

    static _Thread_local char xprsname [100]
     
    const char * SCIPlpiGetSolverName (void)
     
    const char * SCIPlpiGetSolverDesc (void)
     
    void * SCIPlpiGetSolverPointer (SCIP_LPI *lpi)
     
    SCIP_RETCODE SCIPlpiSetIntegralityInformation (SCIP_LPI *lpi, int ncols, int *intInfo)
     
    SCIP_Bool SCIPlpiHasPrimalSolve (void)
     
    SCIP_Bool SCIPlpiHasDualSolve (void)
     
    SCIP_Bool SCIPlpiHasBarrierSolve (void)
     

    Macro Definition Documentation

    ◆ XPRS_LPQUICKPRESOLVE

    #define XPRS_LPQUICKPRESOLVE   8207

    Definition at line 57 of file lpi_xprs.c.

    ◆ XPRS_LP_OPTIMAL_SCALEDINFEAS

    #define XPRS_LP_OPTIMAL_SCALEDINFEAS   16

    Definition at line 61 of file lpi_xprs.c.

    ◆ CHECK_ZERO

    #define CHECK_ZERO (   messagehdlr,
      x 
    )
    Value:
    { int _restat_; \
    if( (_restat_ = (x)) != 0 ) \
    { \
    SCIPmessagePrintWarning((messagehdlr), "%s:%d: LP Error: Xpress returned %d\n", __FILE__, __LINE__, _restat_); \
    return SCIP_LPERROR; \
    } \
    }
    SCIP_VAR ** x
    Definition: circlepacking.c:63
    @ SCIP_LPERROR
    Definition: type_retcode.h:49

    Definition at line 63 of file lpi_xprs.c.

    ◆ ABORT_ZERO

    #define ABORT_ZERO (   messagehdlr,
      retval,
      x 
    )
    Value:
    { int _restat_; \
    if( (_restat_ = (x)) != 0 ) \
    { \
    SCIPmessagePrintWarning((messagehdlr), "LP Error: Xpress returned %d\n", _restat_); \
    SCIPABORT(); \
    return retval; \
    } \
    }

    Definition at line 72 of file lpi_xprs.c.

    ◆ COLS_PER_PACKET

    #define COLS_PER_PACKET   SCIP_DUALPACKETSIZE

    Definition at line 83 of file lpi_xprs.c.

    ◆ ROWS_PER_PACKET

    #define ROWS_PER_PACKET   SCIP_DUALPACKETSIZE

    Definition at line 85 of file lpi_xprs.c.

    Typedef Documentation

    ◆ COLPACKET

    Definition at line 82 of file lpi_xprs.c.

    ◆ ROWPACKET

    Definition at line 84 of file lpi_xprs.c.

    Function Documentation

    ◆ debugCheckColrang()

    static void debugCheckColrang ( SCIP_LPI lpi,
    int  firstcol,
    int  lastcol 
    )
    static

    check that the column range fits

    Parameters
    lpiLP interface structure
    firstcolfirst column to be deleted
    lastcollast column to be deleted

    Definition at line 144 of file lpi_xprs.c.

    References NULL, and SCIP_LPi::xprslp.

    Referenced by SCIPlpiDelCols(), SCIPlpiGetBounds(), SCIPlpiGetColNames(), SCIPlpiGetCols(), and SCIPlpiGetObj().

    ◆ debugCheckRowrang()

    static void debugCheckRowrang ( SCIP_LPI lpi,
    int  firstrow,
    int  lastrow 
    )
    static

    check that the row range fits

    Parameters
    lpiLP interface structure
    firstrowfirst row to be deleted
    lastrowlast row to be deleted

    Definition at line 161 of file lpi_xprs.c.

    References NULL, and SCIP_LPi::xprslp.

    Referenced by SCIPlpiDelRows(), SCIPlpiGetRowNames(), SCIPlpiGetRows(), and SCIPlpiGetSides().

    ◆ ensureBoundchgMem()

    static SCIP_RETCODE ensureBoundchgMem ( SCIP_LPI lpi,
    int  num 
    )
    static

    resizes larray and uarray to have at least num entries and fill it with 'L' and 'U' for the lower and upper bound markers

    Parameters
    lpiLP interface structure
    numminimal number of entries in array

    Definition at line 195 of file lpi_xprs.c.

    References BMSreallocMemoryArray, SCIP_LPi::boundchgsize, SCIP_LPi::larray, MAX, NULL, SCIP_ALLOC, SCIP_OKAY, and SCIP_LPi::uarray.

    Referenced by SCIPlpiChgBounds().

    ◆ ensureSidechgMem()

    static SCIP_RETCODE ensureSidechgMem ( SCIP_LPI lpi,
    int  num 
    )
    static

    resizes senarray, rngarray, and rhsarray to have at least num entries

    Parameters
    lpiLP interface structure
    numminimal number of entries in array

    Definition at line 224 of file lpi_xprs.c.

    References BMSreallocMemoryArray, MAX, NULL, SCIP_LPi::rhsarray, SCIP_LPi::rngarray, SCIP_ALLOC, SCIP_OKAY, SCIP_LPi::senarray, and SCIP_LPi::sidechgsize.

    Referenced by SCIPlpiAddRows(), SCIPlpiChgSides(), SCIPlpiGetSides(), SCIPlpiGetSol(), and SCIPlpiLoadColLP().

    ◆ ensureValMem()

    static SCIP_RETCODE ensureValMem ( SCIP_LPI lpi,
    int  num 
    )
    static

    resizes valarray and indarray to have at least num entries

    Parameters
    lpiLP interface structure
    numminimal number of entries in array

    Definition at line 248 of file lpi_xprs.c.

    References BMSreallocMemoryArray, SCIP_LPi::indarray, MAX, NULL, SCIP_ALLOC, SCIP_OKAY, SCIP_LPi::valarray, and SCIP_LPi::valsize.

    Referenced by SCIPlpiAddCols(), SCIPlpiAddRows(), SCIPlpiDelCols(), SCIPlpiDelColset(), SCIPlpiDelRows(), SCIPlpiDelRowset(), SCIPlpiGetBInvACol(), SCIPlpiGetBInvARow(), SCIPlpiGetCols(), SCIPlpiGetRows(), SCIPlpiLoadColLP(), SCIPlpiScaleCol(), and SCIPlpiScaleRow().

    ◆ ensureCstatMem()

    static SCIP_RETCODE ensureCstatMem ( SCIP_LPI lpi,
    int  num 
    )
    static

    resizes cstat array to have at least num entries

    Parameters
    lpiLP interface structure
    numminimal number of entries in array

    Definition at line 271 of file lpi_xprs.c.

    References BMSreallocMemoryArray, SCIP_LPi::cstat, SCIP_LPi::cstatsize, MAX, NULL, SCIP_ALLOC, and SCIP_OKAY.

    Referenced by SCIPlpiGetState(), and SCIPlpiSetState().

    ◆ ensureRstatMem()

    static SCIP_RETCODE ensureRstatMem ( SCIP_LPI lpi,
    int  num 
    )
    static

    resizes rstat array to have at least num entries

    Parameters
    lpiLP interface structure
    numminimal number of entries in array

    Definition at line 293 of file lpi_xprs.c.

    References BMSreallocMemoryArray, MAX, NULL, SCIP_LPi::rstat, SCIP_LPi::rstatsize, SCIP_ALLOC, and SCIP_OKAY.

    Referenced by SCIPlpiGetState(), and SCIPlpiSetState().

    ◆ colpacketNum()

    static int colpacketNum ( int  ncols)
    static

    returns the number of packets needed to store column packet information

    Parameters
    ncolsnumber of columns to store

    Definition at line 323 of file lpi_xprs.c.

    References COLS_PER_PACKET.

    Referenced by lpistateCreate(), and lpistateFree().

    ◆ rowpacketNum()

    static int rowpacketNum ( int  nrows)
    static

    returns the number of packets needed to store row packet information

    Parameters
    nrowsnumber of rows to store

    Definition at line 332 of file lpi_xprs.c.

    References ROWS_PER_PACKET.

    Referenced by lpistateCreate(), and lpistateFree().

    ◆ lpistatePack()

    static void lpistatePack ( SCIP_LPISTATE lpistate,
    const int *  cstat,
    const int *  rstat 
    )
    static

    store row and column basis status in a packed LPi state object

    Parameters
    lpistatepointer to LPi state data
    cstatbasis status of columns in unpacked format
    rstatbasis status of rows in unpacked format (row status w.r.t. slack columns)

    Definition at line 341 of file lpi_xprs.c.

    References SCIP_LPiState::ncols, SCIP_LPiState::nrows, NULL, SCIP_LPiState::packcstat, SCIP_LPiState::packrstat, and SCIPencodeDualBit().

    Referenced by SCIPlpiGetState().

    ◆ lpistateUnpack()

    static void lpistateUnpack ( const SCIP_LPISTATE lpistate,
    int *  cstat,
    int *  rstat 
    )
    static

    unpacks row and column basis status from a packed LPi state object

    Parameters
    lpistatepointer to LPi state data
    cstatbuffer for storing basis status of columns in unpacked format
    rstatbuffer for storing basis status of rows in unpacked format (row status w.r.t. slack columns)

    Definition at line 357 of file lpi_xprs.c.

    References SCIP_LPiState::ncols, SCIP_LPiState::nrows, NULL, SCIP_LPiState::packcstat, SCIP_LPiState::packrstat, and SCIPdecodeDualBit().

    Referenced by SCIPlpiSetState().

    ◆ lpistateCreate()

    static SCIP_RETCODE lpistateCreate ( SCIP_LPISTATE **  lpistate,
    BMS_BLKMEM blkmem,
    int  ncols,
    int  nrows 
    )
    static

    creates LPi state information object

    Parameters
    lpistatepointer to LPi state
    blkmemblock memory
    ncolsnumber of columns to store
    nrowsnumber of rows to store

    Definition at line 373 of file lpi_xprs.c.

    References BMSallocBlockMemory, BMSallocBlockMemoryArray, colpacketNum(), NULL, rowpacketNum(), SCIP_ALLOC, and SCIP_OKAY.

    Referenced by SCIPlpiGetState().

    ◆ lpistateFree()

    static void lpistateFree ( SCIP_LPISTATE **  lpistate,
    BMS_BLKMEM blkmem 
    )
    static

    frees LPi state information

    Parameters
    lpistatepointer to LPi state information (like basis information)
    blkmemblock memory

    Definition at line 394 of file lpi_xprs.c.

    References BMSfreeBlockMemory, BMSfreeBlockMemoryArray, colpacketNum(), NULL, and rowpacketNum().

    Referenced by SCIPlpiFreeState().

    ◆ xprsObjsen()

    static int xprsObjsen ( SCIP_OBJSEN const  objsen)
    static

    converts SCIP's objective sense into CPLEX's objective sense

    Parameters
    objsenobjective sense

    Definition at line 418 of file lpi_xprs.c.

    References SCIP_OBJSEN_MAXIMIZE, SCIP_OBJSEN_MINIMIZE, SCIPABORT, and SCIPerrorMessage.

    Referenced by SCIPlpiChgObjsen().

    ◆ convertSides()

    static void convertSides ( SCIP_LPI lpi,
    int  nrows,
    const SCIP_Real lhss,
    const SCIP_Real rhss 
    )
    static

    converts SCIP's lhs/rhs pairs into Xpress' sen/rhs/rng

    Parameters
    lpiLP interface structure
    nrowsnumber of rows
    lhssleft hand side vector
    rhssright hand side vector

    Definition at line 437 of file lpi_xprs.c.

    References NULL, SCIP_LPi::rhsarray, SCIP_LPi::rngarray, and SCIP_LPi::senarray.

    Referenced by SCIPlpiAddRows(), SCIPlpiChgSides(), and SCIPlpiLoadColLP().

    ◆ reconvertBothSides()

    static void reconvertBothSides ( SCIP_LPI lpi,
    int  nrows,
    SCIP_Real lhss,
    SCIP_Real rhss 
    )
    static

    converts Xpress' sen/rhs/rng triplets into SCIP's lhs/rhs pairs

    Parameters
    lpiLP interface structure
    nrowsnumber of rows
    lhssbuffer to store the left hand side vector
    rhssbuffer to store the right hand side vector

    Definition at line 486 of file lpi_xprs.c.

    References NULL, SCIP_LPi::rhsarray, SCIP_LPi::rngarray, SCIPABORT, SCIPerrorMessage, and SCIP_LPi::senarray.

    Referenced by reconvertSides().

    ◆ reconvertLhs()

    static void reconvertLhs ( SCIP_LPI lpi,
    int  nrows,
    SCIP_Real lhss 
    )
    static

    converts Xpress' sen/rhs/rng triplets into SCIP's lhs/rhs pairs, only storing the left hand side

    Parameters
    lpiLP interface structure
    nrowsnumber of rows
    lhssbuffer to store the left hand side vector

    Definition at line 535 of file lpi_xprs.c.

    References NULL, SCIP_LPi::rhsarray, SCIP_LPi::rngarray, SCIPABORT, SCIPerrorMessage, and SCIP_LPi::senarray.

    Referenced by reconvertSides().

    ◆ reconvertRhs()

    static void reconvertRhs ( SCIP_LPI lpi,
    int  nrows,
    SCIP_Real rhss 
    )
    static

    converts Xpress' sen/rhs/rng triplets into SCIP's lhs/rhs pairs, only storing the right hand side

    Parameters
    lpiLP interface structure
    nrowsnumber of rows
    rhssbuffer to store the right hand side vector

    Definition at line 580 of file lpi_xprs.c.

    References NULL, SCIP_LPi::rhsarray, SCIP_LPi::rngarray, SCIPABORT, SCIPerrorMessage, and SCIP_LPi::senarray.

    Referenced by reconvertSides().

    ◆ reconvertSides()

    static void reconvertSides ( SCIP_LPI lpi,
    int  nrows,
    SCIP_Real lhs,
    SCIP_Real rhs 
    )
    static

    converts Xpress' sen/rhs/rng triplets into SCIP's lhs/rhs pairs

    Parameters
    lpiLP interface structure
    nrowsnumber of rows
    lhsbuffer to store the left hand side vector, or NULL
    rhsbuffer to store the right hand side vector, or NULL

    Definition at line 625 of file lpi_xprs.c.

    References NULL, reconvertBothSides(), reconvertLhs(), and reconvertRhs().

    Referenced by SCIPlpiGetSides().

    ◆ invalidateSolution()

    ◆ lpiSolve()

    static SCIP_RETCODE lpiSolve ( SCIP_LPI lpi,
    const char *  method 
    )
    static

    ◆ lpiStrongbranch()

    static SCIP_RETCODE lpiStrongbranch ( SCIP_LPI lpi,
    int  col,
    SCIP_Real  psol,
    int  itlim,
    SCIP_Real down,
    SCIP_Real up,
    SCIP_Bool downvalid,
    SCIP_Bool upvalid,
    int *  iter 
    )
    static

    performs strong branching iterations on one candidate

    Parameters
    lpiLP interface structure
    colcolumn to apply strong branching on
    psolcurrent primal solution value of column
    itlimiteration limit for strong branchings
    downstores dual bound after branching column down
    upstores dual bound after branching column up
    downvalidstores whether the returned down value is a valid dual bound; otherwise, it can only be used as an estimate value
    upvalidstores whether the returned up value is a valid dual bound; otherwise, it can only be used as an estimate value
    iterstores total number of strong branching iterations, or -1; may be NULL

    Definition at line 2031 of file lpi_xprs.c.

    References CHECK_ZERO, EPSCEIL, EPSFLOOR, FALSE, SCIP_LPi::messagehdlr, NULL, SCIP_CALL, SCIP_OBJSEN_MINIMIZE, SCIP_OKAY, SCIPdebugMessage, SCIPlpiGetObjsen(), TRUE, and SCIP_LPi::xprslp.

    Referenced by SCIPlpiStrongbranchFrac(), and SCIPlpiStrongbranchInt().

    ◆ lpiStrongbranches()

    static SCIP_RETCODE lpiStrongbranches ( SCIP_LPI lpi,
    int *  cols,
    int  ncols,
    SCIP_Real psols,
    int  itlim,
    SCIP_Real down,
    SCIP_Real up,
    SCIP_Bool downvalid,
    SCIP_Bool upvalid,
    int *  iter 
    )
    static

    performs strong branching iterations on given candidates

    Parameters
    lpiLP interface structure
    colscolumns to apply strong branching on
    ncolsnumber of columns
    psolscurrent primal solution values of columns (might be integral)
    itlimiteration limit for strong branchings
    downstores dual bounds after branching columns down
    upstores dual bounds after branching columns up
    downvalidstores whether the returned down values are valid dual bounds; otherwise, they can only be used as an estimate values
    upvalidstores whether the returned up values are a valid dual bounds; otherwise, they can only be used as an estimate values
    iterstores total number of strong branching iterations, or -1; may be NULL

    Definition at line 2115 of file lpi_xprs.c.

    References BMSallocMemoryArray, BMSfreeMemoryArray, CHECK_ZERO, EPSCEIL, EPSFLOOR, FALSE, SCIP_LPi::messagehdlr, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OBJSEN_MINIMIZE, SCIP_OKAY, SCIPdebugMessage, SCIPlpiGetObjsen(), TRUE, and SCIP_LPi::xprslp.

    Referenced by SCIPlpiStrongbranchesFrac(), and SCIPlpiStrongbranchesInt().

    Variable Documentation

    ◆ xprsname

    _Thread_local char xprsname[100]
    static

    Definition at line 663 of file lpi_xprs.c.

    Referenced by SCIPlpiGetSolverName().