LP interface for QSopt version >= 070303.
Definition in file lpi_qso.c.
#include "qsopt.h"
#include "scip/bitencode.h"
#include "lpi/lpi.h"
#include "scip/pub_message.h"
#include "scip/pub_misc.h"
#include <string.h>
Go to the source code of this file.
Data Structures | |
struct | SCIP_LPi |
struct | SCIP_LPiNorms |
struct | SCIP_LPiState |
Macros | |
#define | COLS_PER_PACKET SCIP_DUALPACKETSIZE |
#define | ROWS_PER_PACKET SCIP_DUALPACKETSIZE |
#define | FEASTOL 1e-6 |
#define | EPSILON 1e-9 |
#define | QS_TESTG(A, B, C) |
#define | QS_ERROR(A, ...) |
#define | QS_RETURN(A) |
#define | QS_CONDRET(A) |
#define COLS_PER_PACKET SCIP_DUALPACKETSIZE |
#define ROWS_PER_PACKET SCIP_DUALPACKETSIZE |
#define FEASTOL 1e-6 |
(feasibility) tolerance for qsopt
Definition at line 99 of file lpi_qso.c.
Referenced by SCIPlpiGetSol(), SCIPlpiStrongbranchesFrac(), SCIPlpiStrongbranchesInt(), SCIPlpiStrongbranchFrac(), and SCIPlpiStrongbranchInt().
#define EPSILON 1e-9 |
tolerance for testing equality
Definition at line 102 of file lpi_qso.c.
Referenced by convertSides().
#define QS_TESTG | ( | A, | |
B, | |||
C ) |
This macro is to print error messages and jump to the given point in the code, it also prints the file name and line where this happened.
Definition at line 109 of file lpi_qso.c.
Referenced by SCIPlpiGetCols(), SCIPlpiGetRows(), SCIPlpiGetSides(), SCIPlpiScaleCol(), and SCIPlpiScaleRow().
#define QS_ERROR | ( | A, | |
... ) |
This macro is to print error messages and to exit with SCIP_LPERROR.
Definition at line 116 of file lpi_qso.c.
Referenced by SCIPlpiGetColNames(), SCIPlpiGetRowNames(), and SCIPlpiWriteState().
#define QS_RETURN | ( | A | ) |
Return value macro, if the value is non-zero, write to standard error the returning code and where this happened, and return SCIP_ERROR, otherwise return normal SCIP_OKAY termination code.
Definition at line 124 of file lpi_qso.c.
Referenced by SCIPlpiGetCols(), SCIPlpiGetRows(), SCIPlpiGetSides(), SCIPlpiScaleCol(), and SCIPlpiScaleRow().
#define QS_CONDRET | ( | A | ) |
Return value macro, if the value is non-zero, write to standard error the returning code and where this happened, and return SCIP_ERROR, otherwise do nothing.
Definition at line 134 of file lpi_qso.c.
Referenced by SCIPlpiAddCols(), SCIPlpiAddRows(), SCIPlpiChgBounds(), SCIPlpiChgCoef(), SCIPlpiChgObj(), SCIPlpiChgObjsen(), SCIPlpiChgSides(), SCIPlpiClear(), SCIPlpiDelCols(), SCIPlpiDelColset(), SCIPlpiDelRows(), SCIPlpiDelRowset(), SCIPlpiGetBase(), SCIPlpiGetBasisInd(), SCIPlpiGetBInvARow(), SCIPlpiGetBInvRow(), SCIPlpiGetBounds(), SCIPlpiGetCoef(), SCIPlpiGetDualfarkas(), SCIPlpiGetIntpar(), SCIPlpiGetIterations(), SCIPlpiGetNorms(), SCIPlpiGetObj(), SCIPlpiGetObjsen(), SCIPlpiGetObjval(), SCIPlpiGetRealpar(), SCIPlpiGetSol(), SCIPlpiLoadColLP(), SCIPlpiSetBase(), SCIPlpiSetIntpar(), SCIPlpiSetNorms(), SCIPlpiSetRealpar(), SCIPlpiSetState(), SCIPlpiSolveDual(), SCIPlpiSolvePrimal(), SCIPlpiStrongbranchesFrac(), SCIPlpiStrongbranchesInt(), SCIPlpiStrongbranchFrac(), and SCIPlpiStrongbranchInt().
typedef enum LPI_QSOPT_Algo LPI_QSOPT_ALGO |
enum LPI_QSOPT_Algo |
|
static |
returns the number of packets needed to store column packet information
ncols | number of columns to store |
Definition at line 160 of file lpi_qso.c.
References COLS_PER_PACKET.
|
static |
returns the number of packets needed to store row packet information
nrows | number of rows to store |
Definition at line 169 of file lpi_qso.c.
References ROWS_PER_PACKET.
|
static |
store row and column basis status in a packed LPi state object
lpistate | pointer to LPi state data |
cstat | basis status of columns in unpacked format |
rstat | basis status of rows in unpacked format |
Definition at line 178 of file lpi_qso.c.
References assert(), SCIP_LPiState::ncols, SCIP_LPiState::nrows, NULL, SCIP_LPiState::packcstat, SCIP_LPiState::packrstat, and SCIPencodeDualBit().
Referenced by SCIPlpiGetState().
|
static |
unpacks row and column basis status from a packed LPi state object
lpistate | pointer to LPi state data |
cstat | buffer for storing basis status of columns in unpacked format |
rstat | buffer for storing basis status of rows in unpacked format |
Definition at line 194 of file lpi_qso.c.
References assert(), SCIP_LPiState::ncols, SCIP_LPiState::nrows, NULL, SCIP_LPiState::packcstat, SCIP_LPiState::packrstat, and SCIPdecodeDualBit().
Referenced by SCIPlpiSetState().
|
static |
creates LPi state information object
lpistate | pointer to LPi state |
blkmem | block memory |
ncols | number of columns to store |
nrows | number of rows to store |
Definition at line 210 of file lpi_qso.c.
References assert(), BMSallocBlockMemory, BMSallocBlockMemoryArray, colpacketNum(), NULL, rowpacketNum(), SCIP_ALLOC, and SCIP_OKAY.
Referenced by SCIPlpiGetState().
|
static |
frees LPi state information
lpistate | pointer to LPi state information (like basis information) |
blkmem | block memory |
Definition at line 231 of file lpi_qso.c.
References assert(), BMSfreeBlockMemory, BMSfreeBlockMemoryArray, colpacketNum(), NULL, and rowpacketNum().
Referenced by SCIPlpiFreeState().
|
static |
ensure size of column-related arrays
lpi | pointer to an LP interface structure |
sz | size |
Definition at line 253 of file lpi_qso.c.
References assert(), BMSreallocMemoryArray, SCIP_LPi::ibas, SCIP_LPi::itab, NULL, SCIP_ALLOC, SCIP_OKAY, and SCIP_LPi::tbsz.
Referenced by SCIPlpiGetBase(), SCIPlpiGetBInvARow(), SCIPlpiGetSol(), SCIPlpiSetBase(), and SCIPlpiSetState().
|
static |
ensure size of column-related arrays
lpi | pointer to an LP interface structure |
ncols | number of columns |
Definition at line 270 of file lpi_qso.c.
References assert(), BMSreallocMemoryArray, SCIP_LPi::colspace, SCIP_LPi::iccha, SCIP_LPi::iccnt, NULL, SCIP_ALLOC, and SCIP_OKAY.
Referenced by SCIPlpiAddCols(), SCIPlpiChgBounds(), SCIPlpiDelCols(), SCIPlpiGetBounds(), SCIPlpiGetCols(), SCIPlpiGetObj(), SCIPlpiGetState(), SCIPlpiLoadColLP(), and SCIPlpiSetState().
|
static |
ensure size of row-related arrays
lpi | pointer to an LP interface structure |
nrows | number of rows |
Definition at line 287 of file lpi_qso.c.
References assert(), BMSreallocMemoryArray, SCIP_LPi::irbeg, SCIP_LPi::ircnt, SCIP_LPi::irhs, SCIP_LPi::irng, SCIP_LPi::isen, NULL, SCIP_LPi::rowspace, SCIP_ALLOC, and SCIP_OKAY.
Referenced by SCIPlpiAddRows(), SCIPlpiChgSides(), SCIPlpiDelRows(), SCIPlpiGetBase(), SCIPlpiGetRows(), SCIPlpiGetSides(), SCIPlpiGetSol(), SCIPlpiGetState(), SCIPlpiLoadColLP(), SCIPlpiSetBase(), and SCIPlpiSetState().
|
static |
transform lhs/rhs into qsopt format
lpi | pointer to an LP interface structure |
nrows | number of rows |
lhs | left hand side |
rhs | right hand side |
Definition at line 307 of file lpi_qso.c.
References assert(), EPSEQ, EPSILON, i, SCIP_LPi::irbeg, SCIP_LPi::ircnt, SCIP_LPi::irhs, SCIP_LPi::irng, SCIP_LPi::isen, NULL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPABORT, and SCIPerrorMessage.
Referenced by SCIPlpiAddRows(), SCIPlpiChgSides(), and SCIPlpiLoadColLP().