All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
lpi_cpx.c File Reference Detailed DescriptionLP interface for CPLEX >= 8.0. Definition in file lpi_cpx.c. #include <assert.h> #include "cplex.h" #include "scip/bitencode.h" #include "lpi/lpi.h" #include "scip/pub_message.h" Go to the source code of this file.
Macro Definition Documentation
Definition at line 41 of file lpi_cpx.c. Referenced by SCIPlpiGetSolverName().
Value:
{ int _restat_; \
if( (_restat_ = (x)) != 0 ) \
{ \
SCIPmessagePrintWarning((messagehdlr), "LP Error: CPLEX returned %d\n", _restat_); \
return SCIP_LPERROR; \
} \
}
void SCIPmessagePrintWarning(SCIP_MESSAGEHDLR *messagehdlr, const char *formatstr,...) Definition: type_retcode.h:40 Definition at line 49 of file lpi_cpx.c. Referenced by SCIPlpiAddCols(), SCIPlpiAddRows(), SCIPlpiChgBounds(), SCIPlpiChgCoef(), SCIPlpiChgObj(), SCIPlpiChgObjsen(), SCIPlpiChgSides(), SCIPlpiClear(), SCIPlpiCreate(), SCIPlpiDelCols(), SCIPlpiDelColset(), SCIPlpiDelRows(), SCIPlpiDelRowset(), SCIPlpiFree(), SCIPlpiGetBase(), SCIPlpiGetBasisInd(), SCIPlpiGetBInvACol(), SCIPlpiGetBInvARow(), SCIPlpiGetBInvCol(), SCIPlpiGetBInvRow(), SCIPlpiGetBounds(), SCIPlpiGetCoef(), SCIPlpiGetColNames(), SCIPlpiGetCols(), SCIPlpiGetDualfarkas(), SCIPlpiGetNorms(), SCIPlpiGetObj(), SCIPlpiGetObjval(), SCIPlpiGetPrimalRay(), SCIPlpiGetRealSolQuality(), SCIPlpiGetRowNames(), SCIPlpiGetRows(), SCIPlpiGetSides(), SCIPlpiGetSol(), SCIPlpiGetSolFeasibility(), SCIPlpiLoadColLP(), SCIPlpiReadState(), SCIPlpiSetBase(), SCIPlpiSetNorms(), SCIPlpiSetState(), SCIPlpiSolveBarrier(), SCIPlpiSolveDual(), SCIPlpiSolvePrimal(), SCIPlpiStrongbranchesFrac(), SCIPlpiStrongbranchFrac(), and SCIPlpiWriteState().
Value:
Definition at line 58 of file lpi_cpx.c. Referenced by SCIPlpiIsDualFeasible(), SCIPlpiIsDualInfeasible(), SCIPlpiIsDualUnbounded(), SCIPlpiIsPrimalFeasible(), SCIPlpiIsPrimalInfeasible(), SCIPlpiIsPrimalUnbounded(), and SCIPlpiIsStable().
Definition at line 67 of file lpi_cpx.c. Referenced by SCIPlpiGetIntpar(), and SCIPlpiSetIntpar().
Definition at line 76 of file lpi_cpx.c. Referenced by SCIPlpiChgBounds().
Typedef Documentation
Function Documentation
gets name and version of LP solver Definition at line 1000 of file lpi_cpx.c. References CPX_SUBVERSION.
creates an LP problem object
Definition at line 1043 of file lpi_cpx.c. References CHECK_ZERO, FALSE, NULL, SCIP_ALLOC, SCIP_Bool, SCIP_CALL, SCIP_LPPAR_PRICING, SCIP_OKAY, SCIP_PRICING_LPIDEFAULT, SCIP_Real, SCIPdebugMessage, SCIPlpiChgObjsen(), and SCIPlpiSetIntpar().
deletes an LP problem object
Definition at line 1123 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_OKAY, and SCIPdebugMessage.
copies LP data with column matrix into LP solver
Definition at line 1169 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, and SCIPdebugMessage.
adds columns to the LP
Definition at line 1229 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_OKAY, and SCIPdebugMessage.
deletes all columns in the given range from LP
Definition at line 1263 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_OKAY, and SCIPdebugMessage.
deletes columns from SCIP_LP; the new position of a column must not be greater that its old position
Definition at line 1284 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_OKAY, and SCIPdebugMessage.
adds rows to the LP
Definition at line 1305 of file lpi_cpx.c. References CHECK_ZERO, FALSE, NULL, SCIP_CALL, SCIP_LPPAR_SCALING, SCIP_OKAY, SCIPdebugMessage, SCIPlpiSetIntpar(), and TRUE.
deletes all rows in the given range from LP
Definition at line 1358 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_OKAY, and SCIPdebugMessage.
deletes rows from SCIP_LP; the new position of a row must not be greater that its old position
Definition at line 1379 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_OKAY, and SCIPdebugMessage.
clears the whole LP
Definition at line 1400 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_OKAY, and SCIPdebugMessage.
changes lower and upper bounds of columns
Definition at line 1430 of file lpi_cpx.c. References CHECK_ZERO, CPX_MAGICZEROCONSTANT, EPSZ, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, and SCIPdebugPrintf. Referenced by SCIPlpiScaleCol().
changes left and right hand sides of rows
Definition at line 1480 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_CALL, SCIP_OKAY, and SCIPdebugMessage. Referenced by SCIPlpiScaleRow().
changes a single coefficient
Definition at line 1525 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_OKAY, and SCIPdebugMessage. Referenced by SCIPlpiScaleCol(), and SCIPlpiScaleRow().
changes the objective sense
Definition at line 1546 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_OKAY, and SCIPdebugMessage. Referenced by SCIPlpiCreate().
changes objective values of columns in the LP
Definition at line 1565 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_OKAY, and SCIPdebugMessage. Referenced by SCIPlpiScaleCol().
multiplies a row with a non-zero scalar; for negative scalars, the row's sense is switched accordingly
Definition at line 1584 of file lpi_cpx.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPlpiChgCoef(), SCIPlpiChgSides(), and SCIPlpiGetRows().
multiplies a column with a non-zero scalar; the objective value is multiplied with the scalar, and the bounds are divided by the scalar; for negative scalars, the column's bounds are switched
Definition at line 1640 of file lpi_cpx.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPlpiChgBounds(), SCIPlpiChgCoef(), SCIPlpiChgObj(), SCIPlpiGetCols(), and SCIPlpiGetObj().
gets the number of rows in the LP
Definition at line 1714 of file lpi_cpx.c. References NULL, SCIP_OKAY, and SCIPdebugMessage.
gets the number of columns in the LP
Definition at line 1731 of file lpi_cpx.c. References NULL, SCIP_OKAY, and SCIPdebugMessage.
gets the number of nonzero elements in the LP constraint matrix
Definition at line 1748 of file lpi_cpx.c. References NULL, SCIP_OKAY, and SCIPdebugMessage.
gets columns from LP problem object; the arrays have to be large enough to store all values Either both, lb and ub, have to be NULL, or both have to be non-NULL, either nnonz, beg, ind, and val have to be NULL, or all of them have to be non-NULL.
Definition at line 1768 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_OKAY, and SCIPdebugMessage. Referenced by SCIPlpiScaleCol().
gets rows from LP problem object; the arrays have to be large enough to store all values. Either both, lhs and rhs, have to be NULL, or both have to be non-NULL, either nnonz, beg, ind, and val have to be NULL, or all of them have to be non-NULL.
Definition at line 1824 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_CALL, SCIP_OKAY, and SCIPdebugMessage. Referenced by SCIPlpiScaleRow().
gets column names
Definition at line 1887 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_OKAY, and SCIPdebugMessage.
gets row names
Definition at line 1921 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_OKAY, and SCIPdebugMessage.
gets objective sense of the LP
Definition at line 1955 of file lpi_cpx.c. References NULL, SCIP_OBJSEN_MAXIMIZE, SCIP_OBJSEN_MINIMIZE, SCIP_OKAY, and SCIPdebugMessage.
gets objective coefficients from LP problem object
Definition at line 1972 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_OKAY, and SCIPdebugMessage. Referenced by SCIPlpiScaleCol().
gets current bounds from LP problem object
Definition at line 1993 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_OKAY, and SCIPdebugMessage.
gets current row sides from LP problem object
Definition at line 2022 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_CALL, SCIP_OKAY, and SCIPdebugMessage.
gets a single coefficient
Definition at line 2058 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_OKAY, and SCIPdebugMessage.
calls primal simplex to solve the LP startFinishOptions - bits 1 - do not delete work areas and factorization at end 2 - use old factorization if same number of rows 4 - skip as much initialization of work areas as possible (work in progress) 4 does not seem to work. Primal algorithm
Definition at line 2089 of file lpi_cpx.c. References CHECK_ZERO, FALSE, NULL, SCIP_CALL, SCIP_LPERROR, SCIP_NOMEMORY, SCIP_OKAY, SCIPdebugMessage, SCIPerrorMessage, and TRUE.
calls dual simplex to solve the LP startFinishOptions - bits 1 - do not delete work areas and factorization at end 2 - use old factorization if same number of rows 4 - skip as much initialization of work areas as possible (work in progress) 4 does not seem to work. Dual algorithm
Definition at line 2194 of file lpi_cpx.c. References CHECK_ZERO, FALSE, NULL, SCIP_CALL, SCIP_LPERROR, SCIP_NOMEMORY, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, SCIPerrorMessage, SCIPlpiGetObjval(), SCIPlpiIsObjlimExc(), and TRUE.
calls barrier or interior point algorithm to solve the LP with crossover to simplex basis
Definition at line 2379 of file lpi_cpx.c. References CHECK_ZERO, FALSE, NULL, SCIP_CALL, SCIP_LPERROR, SCIP_NOMEMORY, SCIP_OKAY, SCIPdebugMessage, and SCIPerrorMessage.
performs strong branching iterations on one fractional candidate
Definition at line 2587 of file lpi_cpx.c. References CHECK_ZERO, EPSISINT, FALSE, NULL, SCIP_CALL, SCIP_LPERROR, SCIP_OKAY, SCIPdebugMessage, and TRUE.
performs strong branching iterations on given fractional candidates
Definition at line 2651 of file lpi_cpx.c. References CHECK_ZERO, EPSISINT, FALSE, NULL, SCIP_CALL, SCIP_LPERROR, SCIP_OKAY, SCIPdebugMessage, and TRUE.
performs strong branching iterations on one candidate with integral value
Definition at line 2717 of file lpi_cpx.c. References EPSISINT, NULL, SCIP_CALL, SCIP_OKAY, and SCIPdebugMessage.
performs strong branching iterations on given candidates with integral values
Definition at line 2751 of file lpi_cpx.c. References EPSISINT, NULL, SCIP_CALL, SCIP_OKAY, and SCIPdebugMessage.
gets information about primal and dual feasibility of the current LP solution
Definition at line 2814 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_Bool, SCIP_OKAY, and SCIPdebugMessage. returns TRUE iff LP is proven to be primal unbounded
Definition at line 2868 of file lpi_cpx.c. References ABORT_ZERO, NULL, and SCIPdebugMessage. returns TRUE iff LP is proven to be primal infeasible
Definition at line 2892 of file lpi_cpx.c. References ABORT_ZERO, NULL, and SCIPdebugMessage. returns TRUE iff LP is proven to be primal feasible
Definition at line 2911 of file lpi_cpx.c. References ABORT_ZERO, NULL, SCIP_Bool, and SCIPdebugMessage. returns TRUE iff LP is proven to be dual unbounded
Definition at line 2958 of file lpi_cpx.c. References ABORT_ZERO, NULL, and SCIPdebugMessage. returns TRUE iff LP is proven to be dual infeasible
Definition at line 2977 of file lpi_cpx.c. References ABORT_ZERO, NULL, and SCIPdebugMessage. returns TRUE iff LP is proven to be dual feasible
Definition at line 2998 of file lpi_cpx.c. References ABORT_ZERO, NULL, SCIP_Bool, and SCIPdebugMessage. returns TRUE iff LP was solved to optimality
Definition at line 3017 of file lpi_cpx.c. References NULL. Referenced by SCIPlpiIsStable(). returns TRUE iff current LP basis is stable
Definition at line 3028 of file lpi_cpx.c. References ABORT_ZERO, FALSE, NULL, SCIP_INVALID, SCIP_LPSOLQUALITY_ESTIMCONDITION, SCIP_OKAY, SCIP_Real, SCIPABORT, SCIPdebugMessage, SCIPlpiGetRealSolQuality(), SCIPlpiIsObjlimExc(), and SCIPlpiIsOptimal(). returns TRUE iff the objective limit was reached
Definition at line 3077 of file lpi_cpx.c. References NULL. Referenced by SCIPlpiIsStable(), and SCIPlpiSolveDual().
gets objective value of solution
Definition at line 3146 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_OKAY, SCIPdebugMessage, and SCIPlpiInfinity(). Referenced by SCIPlpiSolveDual().
gets primal and dual solution vectors
Definition at line 3175 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_OKAY, and SCIPdebugMessage.
gets primal ray for unbounded LPs Unbounded ray (NULL returned if none/wrong). Up to user to use delete [] on these arrays.
Definition at line 3205 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_OKAY, and SCIPdebugMessage.
gets dual Farkas proof for infeasibility Infeasibility ray (NULL returned if none/wrong). Up to user to use delete [] on these arrays.
Definition at line 3224 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_OKAY, and SCIPdebugMessage.
gets information about the quality of an LP solution Such information is usually only available, if also a (maybe not optimal) solution is available. The LPI should return SCIP_INVALID for
Definition at line 3262 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_INVALID, SCIP_INVALIDDATA, SCIP_LPSOLQUALITY_ESTIMCONDITION, SCIP_LPSOLQUALITY_EXACTCONDITION, SCIP_OKAY, SCIPdebugMessage, and SCIPerrorMessage. Referenced by SCIPlpiIsStable().
gets current basis status for columns and rows; arrays must be large enough to store the basis status
Definition at line 3316 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_BASESTAT_BASIC, SCIP_BASESTAT_LOWER, SCIP_BASESTAT_UPPER, SCIP_BASESTAT_ZERO, SCIP_OKAY, and SCIPdebugMessage.
sets current basis status for columns and rows Whats changed since last solve. Is only used when startFinishOptions used in dual or primal. Bit 1 - number of rows/columns has not changed (so work arrays valid) 2 - matrix has not changed 4 - if matrix has changed only by adding rows 8 - if matrix has changed only by adding columns 16 - row lbs not changed 32 - row ubs not changed 64 - column objective not changed 128 - column lbs not changed 256 - column ubs not changed 512 - basis not changed (up to user to set this to 0) top bits may be used internally
Definition at line 3356 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_BASESTAT_BASIC, SCIP_BASESTAT_LOWER, SCIP_BASESTAT_UPPER, SCIP_BASESTAT_ZERO, SCIP_OKAY, and SCIPdebugMessage.
returns the indices of the basic columns and rows; basic column n gives value n, basic row m gives value -1-m
Definition at line 3400 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_CALL, SCIP_CALL_QUIET, SCIP_OKAY, and SCIPdebugMessage.
get dense row of inverse basis matrix B^-1
Definition at line 3434 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_CALL, SCIP_CALL_QUIET, SCIP_OKAY, and SCIPdebugMessage.
get dense column of inverse basis matrix B^-1
Definition at line 3504 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_CALL, SCIP_CALL_QUIET, SCIP_OKAY, and SCIPdebugMessage.
get dense row of inverse basis matrix times constraint matrix B^-1 * A
Definition at line 3576 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_CALL, SCIP_CALL_QUIET, SCIP_OKAY, and SCIPdebugMessage.
get dense column of inverse basis matrix times constraint matrix B^-1 * A
Definition at line 3647 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_CALL, SCIP_CALL_QUIET, SCIP_OKAY, and SCIPdebugMessage.
loads LPi state (like basis information) into solver; note that the LP might have been extended with additional columns and rows since the state was stored with SCIPlpiGetState()
Definition at line 3770 of file lpi_cpx.c. References CHECK_ZERO, NULL, REALABS, SCIP_BASESTAT_BASIC, SCIP_BASESTAT_LOWER, SCIP_BASESTAT_UPPER, SCIP_BASESTAT_ZERO, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, and SCIPlpiIsInfinity().
reads LP state (like basis information from a file Read a basis from the given filename, returns -1 on file error, 0 if no values, 1 if values
Definition at line 3874 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_OKAY, and SCIPdebugMessage.
writes LP state (like basis information) to a file Write the basis in MPS format to the specified file. If writeValues true, writes values of structurals (and adds VALUES to end of NAME card) parameters:
Definition at line 3891 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_OKAY, and SCIPdebugMessage.
stores LPi pricing norms information
Definition at line 3923 of file lpi_cpx.c. References CHECK_ZERO, NULL, SCIP_ALLOC, SCIP_OKAY, and SCIPdebugMessage.
loads LPi pricing norms into solver; note that the LP might have been extended with additional columns and rows since the state was stored with SCIPlpiGetNorms()
Definition at line 3983 of file lpi_cpx.c. References CHECK_ZERO, SCIP_LPiNorms::head, SCIP_LPiNorms::norm, SCIP_LPiNorms::normlen, NULL, SCIP_OKAY, and SCIPdebugMessage.
gets integer parameter of LP
Definition at line 4045 of file lpi_cpx.c. References CPX_INT_MAX, NULL, SCIP_LPPAR_FASTMIP, SCIP_LPPAR_FROMSCRATCH, SCIP_LPPAR_LPINFO, SCIP_LPPAR_LPITLIM, SCIP_LPPAR_PRESOLVING, SCIP_LPPAR_PRICING, SCIP_LPPAR_SCALING, SCIP_LPPAR_THREADS, SCIP_OKAY, SCIP_PARAMETERUNKNOWN, SCIP_PRICING_AUTO, SCIP_PRICING_DEVEX, SCIP_PRICING_FULL, SCIP_PRICING_PARTIAL, SCIP_PRICING_STEEP, SCIP_PRICING_STEEPQSTART, and SCIPdebugMessage.
sets integer parameter of LP Amount of print out: 0 - none 1 - just final 2 - just factorizations 3 - as 2 plus a bit more 4 - verbose above that 8,16,32 etc just for selective SCIPdebug
Definition at line 4135 of file lpi_cpx.c. References CPX_INT_MAX, FALSE, NULL, SCIP_LPERROR, SCIP_LPPAR_FASTMIP, SCIP_LPPAR_FROMSCRATCH, SCIP_LPPAR_LPINFO, SCIP_LPPAR_LPITLIM, SCIP_LPPAR_PRESOLVING, SCIP_LPPAR_PRICING, SCIP_LPPAR_SCALING, SCIP_LPPAR_THREADS, SCIP_OKAY, SCIP_PARAMETERUNKNOWN, SCIP_PRICING_AUTO, SCIP_PRICING_DEVEX, SCIP_PRICING_FULL, SCIP_PRICING_LPIDEFAULT, SCIP_PRICING_PARTIAL, SCIP_PRICING_STEEP, SCIP_PRICING_STEEPQSTART, SCIPdebugMessage, and TRUE. Referenced by SCIPlpiAddRows(), and SCIPlpiCreate().
gets floating point parameter of LP
Definition at line 4237 of file lpi_cpx.c. References NULL, SCIP_LPPAR_BARRIERCONVTOL, SCIP_LPPAR_CONDITIONLIMIT, SCIP_LPPAR_DUALFEASTOL, SCIP_LPPAR_FEASTOL, SCIP_LPPAR_LOBJLIM, SCIP_LPPAR_LPTILIM, SCIP_LPPAR_MARKOWITZ, SCIP_LPPAR_UOBJLIM, SCIP_OKAY, SCIP_PARAMETERUNKNOWN, and SCIPdebugMessage.
sets floating point parameter of LP
Definition at line 4283 of file lpi_cpx.c. References NULL, SCIP_LPPAR_BARRIERCONVTOL, SCIP_LPPAR_CONDITIONLIMIT, SCIP_LPPAR_DUALFEASTOL, SCIP_LPPAR_FEASTOL, SCIP_LPPAR_LOBJLIM, SCIP_LPPAR_LPTILIM, SCIP_LPPAR_MARKOWITZ, SCIP_LPPAR_UOBJLIM, SCIP_OKAY, SCIP_PARAMETERUNKNOWN, and SCIPdebugMessage. returns value treated as infinity in the LP solver
Definition at line 4342 of file lpi_cpx.c. Referenced by SCIPlpiGetObjval(). checks if given value is treated as infinity in the LP solver
Definition at line 4350 of file lpi_cpx.c. Referenced by SCIPlpiSetState().
reads LP from a file read file in MPS format parameters: filename bool keepNames bool ignoreErrors
Definition at line 4371 of file lpi_cpx.c. References NULL, SCIP_OKAY, SCIP_READERROR, SCIPdebugMessage, and SCIPerrorMessage.
writes LP to a file write file in MPS format parameters: filename int formatType (0 - normal, 1 - extra accuracy, 2 - IEEE hex) int numberAcross (1 or 2 values should be specified on every data line in the MPS file) double objSense
Definition at line 4395 of file lpi_cpx.c. References NULL, SCIP_OKAY, SCIP_READERROR, SCIPdebugMessage, and SCIPerrorMessage. |