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 |
◆ ROWS_PER_PACKET
#define ROWS_PER_PACKET SCIP_DUALPACKETSIZE |
◆ FEASTOL
◆ EPSILON
◆ QS_TESTG
#define QS_TESTG | ( | A, | |
B, | |||
C | |||
) |
◆ QS_ERROR
#define QS_ERROR | ( | A, | |
... | |||
) |
This macro is to print error messages and to exit with SCIP_LPERROR.
◆ 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.
◆ 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.
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 160 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 169 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 178 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 194 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 210 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 231 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 253 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 270 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 287 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 307 of file lpi_qso.c.
References EPSEQ, EPSILON, 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().