Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

LP interface for SoPlex version 2.0 and higher.

Author
Matthias Miltenberger
Ambros Gleixner

This is an implementation of SCIP's LP interface for SoPlex using the extended and improved interface of SoPlex 2.0

For debugging purposes, the SoPlex results can be double checked with CPLEX if SCIP_WITH_LPSCHECK is defined. This may yield false positives, since the LP is dumped to a file for transfering it to CPLEX, hence, precision may be lost.

Definition in file lpi_spx2.cpp.

#include "scip/config.h"
#include "soplex.h"
#include "spxgithash.h"
#include "scip/pub_message.h"
#include <cassert>
#include "lpi/lpi.h"
#include "scip/bitencode.h"

Go to the source code of this file.

Data Structures

struct  SCIP_LPi
 
struct  SCIP_LPiState
 
struct  SCIP_LPiNorms
 

Macros

#define STRONGBRANCH_RESTOREBASIS
 
#define CHECK_SOPLEX_PARAM(x)
 
#define SOPLEX_SUBVERSION   0
 
#define SOPLEX_APIVERSION   0
 
#define SOPLEX_VERBLEVEL   5
 
#define NULL   0
 
#define SOPLEX_TRY(messagehdlr, x)
 
#define SOPLEX_TRY_ABORT(x)
 
#define COLS_PER_PACKET   SCIP_DUALPACKETSIZE
 
#define ROWS_PER_PACKET   SCIP_DUALPACKETSIZE
 

Typedefs

typedef SCIP_DUALPACKET COLPACKET
 
typedef SCIP_DUALPACKET ROWPACKET
 

Functions

static SCIP_RETCODE ensureCstatMem (SCIP_LPI *lpi, int num)
 
static SCIP_RETCODE ensureRstatMem (SCIP_LPI *lpi, int num)
 
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)
 
static void invalidateSolution (SCIP_LPI *lpi)
 
Miscellaneous Methods
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)
 
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 **, 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 **, 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 **, 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 objsen)
 
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 *lhs, SCIP_Real *rhs, 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 spxSolve (SCIP_LPI *lpi)
 
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)
 
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 r, 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 *, 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
static SCIP_Bool fileExists (const char *filename)
 
SCIP_RETCODE SCIPlpiReadLP (SCIP_LPI *lpi, const char *fname)
 
SCIP_RETCODE SCIPlpiWriteLP (SCIP_LPI *lpi, const char *fname)
 

Variables

static const char spxname [20] = {'S', 'o', 'p', 'l', 'e', 'x', ' ', SOPLEX_VERSION/100 + '0', '.', (SOPLEX_VERSION % 100)/10 + '0', '.', SOPLEX_VERSION % 10 + '0'}
 
static const char spxdesc [200]
 

Macro Definition Documentation

◆ STRONGBRANCH_RESTOREBASIS

#define STRONGBRANCH_RESTOREBASIS

if defined then in SCIPlpiStrongbranch() we restore the basis after the down branch and after the up branch; if false only after the end of a strong branching phase, which however seems to mostly increase strong branching time and iterations

Definition at line 39 of file lpi_spx2.cpp.

◆ CHECK_SOPLEX_PARAM

#define CHECK_SOPLEX_PARAM (   x)
Value:
if( !x ) \
{ \
SCIPmessagePrintWarning(_messagehdlr, "SoPlex: unsupported parameter value\n"); \
}
SCIP_VAR ** x
Definition: circlepacking.c:63

Definition at line 84 of file lpi_spx2.cpp.

◆ SOPLEX_SUBVERSION

#define SOPLEX_SUBVERSION   0

Definition at line 106 of file lpi_spx2.cpp.

Referenced by invalidateSolution(), and SCIPlpiGetNNonz().

◆ SOPLEX_APIVERSION

#define SOPLEX_APIVERSION   0

Definition at line 110 of file lpi_spx2.cpp.

◆ SOPLEX_VERBLEVEL

#define SOPLEX_VERBLEVEL   5

verbosity level for LPINFO

Definition at line 136 of file lpi_spx2.cpp.

Referenced by lpiStrongbranch(), SCIPlpiCreate(), and spxSolve().

◆ NULL

#define NULL   0

Definition at line 146 of file lpi_spx2.cpp.

Referenced by ensureCstatMem(), ensureRstatMem(), fileExists(), lpistateCreate(), lpistateFree(), lpistatePack(), lpistateUnpack(), lpiStrongbranch(), SCIPlpiAddCols(), SCIPlpiAddRows(), SCIPlpiChgBounds(), SCIPlpiChgCoef(), SCIPlpiChgObj(), SCIPlpiChgObjsen(), SCIPlpiChgSides(), SCIPlpiClear(), SCIPlpiClearState(), SCIPlpiCreate(), SCIPlpiDelCols(), SCIPlpiDelColset(), SCIPlpiDelRows(), SCIPlpiDelRowset(), SCIPlpiEndStrongbranch(), SCIPlpiExistsDualRay(), SCIPlpiExistsPrimalRay(), SCIPlpiFree(), SCIPlpiFreeNorms(), SCIPlpiFreeState(), SCIPlpiGetBase(), SCIPlpiGetBasisInd(), SCIPlpiGetBInvACol(), SCIPlpiGetBInvARow(), SCIPlpiGetBInvCol(), SCIPlpiGetBInvRow(), SCIPlpiGetBounds(), SCIPlpiGetCoef(), SCIPlpiGetColNames(), SCIPlpiGetCols(), SCIPlpiGetDualfarkas(), SCIPlpiGetInternalStatus(), SCIPlpiGetIntpar(), SCIPlpiGetIterations(), SCIPlpiGetNCols(), SCIPlpiGetNNonz(), SCIPlpiGetNorms(), SCIPlpiGetNRows(), SCIPlpiGetObj(), SCIPlpiGetObjsen(), SCIPlpiGetObjval(), SCIPlpiGetPrimalRay(), SCIPlpiGetRealpar(), SCIPlpiGetRealSolQuality(), SCIPlpiGetRowNames(), SCIPlpiGetRows(), SCIPlpiGetSides(), SCIPlpiGetSol(), SCIPlpiGetSolFeasibility(), SCIPlpiGetState(), SCIPlpiHasDualRay(), SCIPlpiHasPrimalRay(), SCIPlpiHasStateBasis(), SCIPlpiIgnoreInstability(), SCIPlpiInfinity(), SCIPlpiInterrupt(), SCIPlpiIsDualFeasible(), SCIPlpiIsDualInfeasible(), SCIPlpiIsDualUnbounded(), SCIPlpiIsInfinity(), SCIPlpiIsIterlimExc(), SCIPlpiIsObjlimExc(), SCIPlpiIsOptimal(), SCIPlpiIsPrimalFeasible(), SCIPlpiIsPrimalInfeasible(), SCIPlpiIsPrimalUnbounded(), SCIPlpiIsStable(), SCIPlpiIsTimelimExc(), SCIPlpiLoadColLP(), SCIPlpiReadLP(), SCIPlpiReadState(), SCIPlpiScaleCol(), SCIPlpiScaleRow(), SCIPlpiSetBase(), SCIPlpiSetIntegralityInformation(), SCIPlpiSetIntpar(), SCIPlpiSetNorms(), SCIPlpiSetRealpar(), SCIPlpiSetState(), SCIPlpiSolveBarrier(), SCIPlpiSolveDual(), SCIPlpiSolvePrimal(), SCIPlpiStartStrongbranch(), SCIPlpiStrongbranchesFrac(), SCIPlpiStrongbranchesInt(), SCIPlpiWasSolved(), SCIPlpiWriteLP(), SCIPlpiWriteState(), and spxSolve().

◆ SOPLEX_TRY

#define SOPLEX_TRY (   messagehdlr,
  x 
)
Value:
do \
{ \
try \
{ \
(x); \
} \
catch( const SPxMemoryException& E ) \
{ \
std::string s = E.what(); \
SCIPerrorMessage("SoPlex threw a memory exception: %s\n", s.c_str()); \
return SCIP_ERROR; \
} \
catch( const SPxException& E ) \
{ \
std::string s = E.what(); \
SCIPmessagePrintWarning((messagehdlr), "SoPlex threw an exception: %s\n", s.c_str()); \
return SCIP_LPERROR; \
} \
} \
while( FALSE )
#define FALSE
Definition: def.h:96
SCIP_VAR ** x
Definition: circlepacking.c:63

Macro for a single SoPlex call for which exceptions have to be catched - return an LP error. We make no distinction between different exception types, e.g., between memory allocation and other exceptions.

Definition at line 157 of file lpi_spx2.cpp.

Referenced by SCIPlpiChgCoef(), SCIPlpiChgObjsen(), SCIPlpiClear(), SCIPlpiCreate(), SCIPlpiDelCols(), SCIPlpiDelColset(), SCIPlpiDelRows(), SCIPlpiDelRowset(), SCIPlpiReadState(), SCIPlpiSetBase(), and SCIPlpiWriteState().

◆ SOPLEX_TRY_ABORT

#define SOPLEX_TRY_ABORT (   x)
Value:
do \
{ \
try \
{ \
(x); \
} \
catch( const SPxException& E ) \
{ \
std::string s = E.what(); \
SCIPerrorMessage("SoPlex threw an exception: %s\n", s.c_str()); \
abort(); \
} \
} \
while( FALSE )
#define FALSE
Definition: def.h:96
SCIP_VAR ** x
Definition: circlepacking.c:63

Definition at line 202 of file lpi_spx2.cpp.

◆ COLS_PER_PACKET

#define COLS_PER_PACKET   SCIP_DUALPACKETSIZE

Definition at line 765 of file lpi_spx2.cpp.

Referenced by colpacketNum().

◆ ROWS_PER_PACKET

#define ROWS_PER_PACKET   SCIP_DUALPACKETSIZE

Definition at line 767 of file lpi_spx2.cpp.

Referenced by rowpacketNum().

Typedef Documentation

◆ COLPACKET

Definition at line 764 of file lpi_spx2.cpp.

◆ ROWPACKET

Definition at line 766 of file lpi_spx2.cpp.

Function Documentation

◆ 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 811 of file lpi_spx2.cpp.

References BMSreallocMemoryArray, SCIP_LPi::cstat, SCIP_LPi::cstatsize, ensureRstatMem(), 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 833 of file lpi_spx2.cpp.

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

Referenced by ensureCstatMem(), 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 862 of file lpi_spx2.cpp.

References COLS_PER_PACKET, and rowpacketNum().

Referenced by ensureRstatMem(), 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 871 of file lpi_spx2.cpp.

References lpistatePack(), and ROWS_PER_PACKET.

Referenced by colpacketNum(), 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

Definition at line 880 of file lpi_spx2.cpp.

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

Referenced by rowpacketNum(), and 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

Definition at line 896 of file lpi_spx2.cpp.

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

Referenced by lpistatePack(), and 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 912 of file lpi_spx2.cpp.

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

Referenced by lpistateUnpack(), and 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 936 of file lpi_spx2.cpp.

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

Referenced by lpistateCreate(), and SCIPlpiFreeState().

◆ invalidateSolution()

◆ spxSolve()

static SCIP_RETCODE spxSolve ( SCIP_LPI lpi)
static

solves LP – used for both, primal and dual simplex, because SoPlex doesn't distinct the two cases

Parameters
lpiLP interface structure

Definition at line 2366 of file lpi_spx2.cpp.

References invalidateSolution(), SCIP_LPi::messagehdlr, NULL, SCIP_LPERROR, SCIP_OKAY, SCIPdebugMessage, SCIPlpiSolvePrimal(), SCIPmessagePrintWarning(), SCIP_LPi::solved, SOPLEX_VERBLEVEL, SCIP_LPi::spx, TRUE, UNKNOWN, and x.

Referenced by SCIPlpiGetCoef(), SCIPlpiSolveDual(), and SCIPlpiSolvePrimal().

◆ 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 arbitrary 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 2511 of file lpi_spx2.cpp.

References EPSCEIL, EPSFLOOR, FALSE, NULL, SCIP_Bool, SCIP_LPERROR, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPlpiStrongbranchFrac(), SOPLEX_VERBLEVEL, SCIP_LPi::spx, and TRUE.

Referenced by SCIPlpiEndStrongbranch(), SCIPlpiStrongbranchesFrac(), SCIPlpiStrongbranchesInt(), SCIPlpiStrongbranchFrac(), and SCIPlpiStrongbranchInt().

◆ fileExists()

static SCIP_Bool fileExists ( const char *  filename)
static

returns, whether the given file exists

Parameters
filenamefile name

Definition at line 4612 of file lpi_spx2.cpp.

References FALSE, NULL, SCIPlpiReadLP(), and TRUE.

Referenced by SCIPlpiIsInfinity(), and SCIPlpiReadLP().

Variable Documentation

◆ spxname

const char spxname[20] = {'S', 'o', 'p', 'l', 'e', 'x', ' ', SOPLEX_VERSION/100 + '0', '.', (SOPLEX_VERSION % 100)/10 + '0', '.', SOPLEX_VERSION % 10 + '0'}
static

Definition at line 983 of file lpi_spx2.cpp.

Referenced by invalidateSolution(), and SCIPlpiGetSolverName().

◆ spxdesc

const char spxdesc[200]
static
Initial value:
= {'L', 'i', 'n', 'e', 'a', 'r', ' ', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'm', 'i', 'n', 'g',
' ', 'S', 'o', 'l', 'v', 'e', 'r', ' ' , 'd', 'e', 'v', 'e', 'l', 'o', 'p', 'e', 'd',
' ', 'a', 't', ' ', 'Z', 'u', 's', 'e', ' ', 'I', 'n', 's', 't', 'i', 't', 'u', 't', 'e',
' ', 'B', 'e', 'r', 'l', 'i', 'n', ' ', '(', 's', 'o', 'p', 'l', 'e', 'x', '.', 'z', 'i', 'b', '.', 'd', 'e', ')',
' ', '[', 'G', 'i', 't', 'H', 'a', 's', 'h', ':', ' ',
getGitHash()[0], getGitHash()[1], getGitHash()[2], getGitHash()[3],
getGitHash()[4], getGitHash()[5], getGitHash()[6], getGitHash()[7],
']'}

Definition at line 985 of file lpi_spx2.cpp.

Referenced by invalidateSolution(), and SCIPlpiGetSolverDesc().