Detailed Description
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) |
Typedefs | |
typedef SCIP_DUALPACKET | COLPACKET |
typedef SCIP_DUALPACKET | ROWPACKET |
typedef enum LPI_QSOPT_Algo | LPI_QSOPT_ALGO |
Enumerations | |
enum | LPI_QSOPT_Algo { LPI_QSOPT_ALGO_UNKNOWN = 0, LPI_QSOPT_ALGO_PRIMAL = 1, LPI_QSOPT_ALGO_DUAL = 2 } |
Macro Definition Documentation
◆ COLS_PER_PACKET
#define COLS_PER_PACKET SCIP_DUALPACKETSIZE |
Definition at line 33 of file lpi_qso.c.
Referenced by colpacketNum().
◆ ROWS_PER_PACKET
#define ROWS_PER_PACKET SCIP_DUALPACKETSIZE |
Definition at line 35 of file lpi_qso.c.
Referenced by rowpacketNum().
◆ FEASTOL
#define FEASTOL 1e-6 |
(feasibility) tolerance for qsopt
Definition at line 90 of file lpi_qso.c.
Referenced by SCIPlpiGetSol(), SCIPlpiStrongbranchesFrac(), SCIPlpiStrongbranchesInt(), SCIPlpiStrongbranchFrac(), and SCIPlpiStrongbranchInt().
◆ EPSILON
#define EPSILON 1e-9 |
tolerance for testing equality
Definition at line 93 of file lpi_qso.c.
Referenced by convertSides(), nail(), SCIPStpValidateSol(), and trail().
◆ QS_TESTG
#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 100 of file lpi_qso.c.
Referenced by SCIPlpiGetCols(), SCIPlpiGetRows(), SCIPlpiGetSides(), SCIPlpiScaleCol(), and SCIPlpiScaleRow().
◆ QS_ERROR
#define QS_ERROR | ( | A, | |
... | |||
) |
This macro is to print error messages and to exit with SCIP_LPERROR.
Definition at line 107 of file lpi_qso.c.
Referenced by SCIPlpiGetColNames(), SCIPlpiGetRowNames(), and SCIPlpiWriteState().
◆ QS_RETURN
#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 115 of file lpi_qso.c.
Referenced by SCIPlpiGetCols(), SCIPlpiGetRows(), SCIPlpiGetSides(), SCIPlpiScaleCol(), and SCIPlpiScaleRow().
◆ QS_CONDRET
#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 125 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 Documentation
◆ COLPACKET
typedef SCIP_DUALPACKET COLPACKET |
◆ ROWPACKET
typedef SCIP_DUALPACKET ROWPACKET |
◆ LPI_QSOPT_ALGO
typedef enum LPI_QSOPT_Algo LPI_QSOPT_ALGO |
Enumeration Type Documentation
◆ LPI_QSOPT_Algo
enum LPI_QSOPT_Algo |
Function Documentation
◆ colpacketNum()
|
static |
returns the number of packets needed to store column packet information
- Parameters
-
ncols number of columns to store
Definition at line 151 of file lpi_qso.c.
References COLS_PER_PACKET.
Referenced by lpistateCreate(), and lpistateFree().
◆ rowpacketNum()
|
static |
returns the number of packets needed to store row packet information
- Parameters
-
nrows number of rows to store
Definition at line 160 of file lpi_qso.c.
References ROWS_PER_PACKET.
Referenced by lpistateCreate(), and lpistateFree().
◆ lpistatePack()
|
static |
store row and column basis status in a packed LPi state object
- Parameters
-
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 169 of file lpi_qso.c.
References SCIP_LPiState::ncols, SCIP_LPiState::nrows, NULL, SCIP_LPiState::packcstat, SCIP_LPiState::packrstat, and SCIPencodeDualBit().
Referenced by SCIPlpiGetState().
◆ lpistateUnpack()
|
static |
unpacks row and column basis status from a packed LPi state object
- Parameters
-
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 185 of file lpi_qso.c.
References SCIP_LPiState::ncols, SCIP_LPiState::nrows, NULL, SCIP_LPiState::packcstat, SCIP_LPiState::packrstat, and SCIPdecodeDualBit().
Referenced by SCIPlpiSetState().
◆ lpistateCreate()
|
static |
creates LPi state information object
- Parameters
-
lpistate pointer to LPi state blkmem block memory ncols number of columns to store nrows number of rows to store
Definition at line 201 of file lpi_qso.c.
References BMSallocBlockMemory, BMSallocBlockMemoryArray, colpacketNum(), NULL, rowpacketNum(), SCIP_ALLOC, and SCIP_OKAY.
Referenced by SCIPlpiGetState().
◆ lpistateFree()
|
static |
frees LPi state information
- Parameters
-
lpistate pointer to LPi state information (like basis information) blkmem block memory
Definition at line 222 of file lpi_qso.c.
References BMSfreeBlockMemory, BMSfreeBlockMemoryArray, colpacketNum(), NULL, and rowpacketNum().
Referenced by SCIPlpiFreeState().
◆ ensureTabMem()
|
static |
ensure size of column-related arrays
- Parameters
-
lpi pointer to an LP interface structure sz size
Definition at line 244 of file lpi_qso.c.
References BMSreallocMemoryArray, SCIP_LPi::ibas, SCIP_LPi::itab, NULL, SCIP_ALLOC, SCIP_OKAY, and SCIP_LPi::tbsz.
Referenced by SCIPlpiGetBase(), SCIPlpiGetBInvARow(), SCIPlpiGetSol(), SCIPlpiSetBase(), and SCIPlpiSetState().
◆ ensureColMem()
|
static |
ensure size of column-related arrays
- Parameters
-
lpi pointer to an LP interface structure ncols number of columns
Definition at line 261 of file lpi_qso.c.
References 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().
◆ ensureRowMem()
|
static |
ensure size of row-related arrays
- Parameters
-
lpi pointer to an LP interface structure nrows number of rows
Definition at line 278 of file lpi_qso.c.
References 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().
◆ convertSides()
|
static |
transform lhs/rhs into qsopt format
- Parameters
-
lpi pointer to an LP interface structure nrows number of rows lhs left hand side rhs right hand side
Definition at line 298 of file lpi_qso.c.
References EPSEQ, EPSILON, SCIP_LPi::irbeg, SCIP_LPi::ircnt, SCIP_LPi::irhs, SCIP_LPi::irng, SCIP_LPi::isen, SCIP_LPi::nrows, NULL, SCIP_INVALIDDATA, SCIP_OKAY, SCIPABORT, and SCIPerrorMessage.
Referenced by SCIPlpiAddRows(), SCIPlpiChgSides(), and SCIPlpiLoadColLP().