All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
lpi_msk.c File Reference Detailed DescriptionLP interface for MOSEK. Definition in file lpi_msk.c. #include <assert.h> #include "mosek.h" #include "lpi/lpi.h" #include "scip/bitencode.h" #include <string.h> Go to the source code of this file.
Macro Definition Documentation
Definition at line 37 of file lpi_msk.c. Referenced by SCIPlpiChgObjsen(), SCIPlpiCreate(), and SCIPlpiLoadColLP().
Value:
do \
{ /*lint --e{641}*/ \
MSKrescodee _restat_; \
_restat_ = (x); \
if( (_restat_) != MSK_RES_OK && (_restat_ ) != MSK_RES_TRM_MAX_NUM_SETBACKS ) \
{ \
return SCIP_LPERROR; \
} \
} \
while( FALSE )
Definition: type_retcode.h:40 Definition at line 39 of file lpi_msk.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(), SCIPlpiGetDualfarkas(), SCIPlpiGetIntpar(), SCIPlpiGetNCols(), SCIPlpiGetNNonz(), SCIPlpiGetNRows(), SCIPlpiGetObj(), SCIPlpiGetObjval(), SCIPlpiGetPrimalRay(), SCIPlpiGetRealpar(), SCIPlpiGetSides(), SCIPlpiGetSol(), SCIPlpiGetSolFeasibility(), SCIPlpiGetState(), SCIPlpiLoadColLP(), SCIPlpiReadLP(), SCIPlpiReadState(), SCIPlpiScaleCol(), SCIPlpiScaleRow(), SCIPlpiSetBase(), SCIPlpiSetIntpar(), SCIPlpiSetRealpar(), SCIPlpiSetState(), SCIPlpiSolveBarrier(), SCIPlpiSolveDual(), SCIPlpiSolvePrimal(), SCIPlpiWriteLP(), and SCIPlpiWriteState().
Value:
do \
{ \
int _restat_; \
if( (_restat_ = (x)) != SCIP_OKAY ) \
{ \
SCIPABORT(); \
return FALSE; \
} \
} \
while( FALSE )
Definition: type_retcode.h:33 Definition at line 52 of file lpi_msk.c. Referenced by SCIPlpiExistsDualRay(), SCIPlpiExistsPrimalRay(), SCIPlpiHasDualRay(), SCIPlpiHasPrimalRay(), SCIPlpiIsDualFeasible(), SCIPlpiIsOptimal(), SCIPlpiIsPrimalFeasible(), and SCIPlpiWasSolved().
Definition at line 64 of file lpi_msk.c. Referenced by SCIPlpiIsInfinity().
Definition at line 94 of file lpi_msk.c. Referenced by SCIPlpiCreate().
Definition at line 102 of file lpi_msk.c. Referenced by SCIPlpiSolveBarrier(), SCIPlpiSolveDual(), and SCIPlpiSolvePrimal().
Definition at line 103 of file lpi_msk.c. Referenced by SCIPlpiCreate().
Typedef Documentation
Function Documentation
creates an LP problem object
Definition at line 637 of file lpi_msk.c. References DEGEN_LEVEL, MOSEK_CALL, NULL, SCIP_ALLOC, SCIP_OKAY, SCIP_PRICING_LPIDEFAULT, SCIPdebugMessage, SENSE2MOSEK, and SETBACK_LIMIT.
deletes an LP problem object
Definition at line 691 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_OKAY, and SCIPdebugMessage.
copies LP data with column matrix into LP solver
Definition at line 723 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, and SENSE2MOSEK.
adds columns to the LP
Definition at line 817 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, and SCIPdebugMessage.
deletes all columns in the given range from LP
Definition at line 896 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_CALL, SCIP_OKAY, and SCIPdebugMessage. Referenced by SCIPlpiClear().
deletes columns from SCIP_LP; the new position of a column must not be greater that its old position
Definition at line 933 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_CALL, SCIP_OKAY, and SCIPdebugMessage.
adds rows to the LP
Definition at line 994 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, and SCIPdebugMessage.
deletes all rows in the given range from LP
Definition at line 1072 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_CALL, SCIP_OKAY, and SCIPdebugMessage. Referenced by SCIPlpiClear().
deletes rows from SCIP_LP; the new position of a row must not be greater that its old position
Definition at line 1110 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_CALL, SCIP_OKAY, and SCIPdebugMessage.
clears the whole LP
Definition at line 1171 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, SCIPlpiDelCols(), and SCIPlpiDelRows().
changes lower and upper bounds of columns
Definition at line 1194 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, and SCIPdebugMessage.
changes left and right hand sides of rows
Definition at line 1238 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, and SCIPdebugMessage.
changes a single coefficient
Definition at line 1282 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_CALL, SCIP_OKAY, and SCIPdebugMessage.
changes the objective sense
Definition at line 1309 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_OKAY, SCIPdebugMessage, and SENSE2MOSEK.
changes objective values of columns in the LP
Definition at line 1326 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_CALL, SCIP_OKAY, and SCIPdebugMessage.
multiplies a row with a non-zero scalar; for negative scalars, the row's sense is switched accordingly
Definition at line 1353 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, and SCIPdebugMessage.
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 1417 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, and SCIPdebugMessage.
gets the number of rows in the LP
Definition at line 1486 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_OKAY, and SCIPdebugMessage.
gets the number of columns in the LP
Definition at line 1503 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_OKAY, and SCIPdebugMessage.
gets the number of nonzero elements in the LP constraint matrix
Definition at line 1520 of file lpi_msk.c. References MOSEK_CALL, 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 1591 of file lpi_msk.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, and SCIPlpiGetBounds().
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 1619 of file lpi_msk.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, and SCIPlpiGetSides().
gets column names
Definition at line 1653 of file lpi_msk.c. References SCIP_LPERROR, and SCIPerrorMessage.
gets row names
Definition at line 1668 of file lpi_msk.c. References SCIP_LPERROR, and SCIPerrorMessage.
gets the objective sense of the LP
Definition at line 1683 of file lpi_msk.c. References SCIP_LPERROR, and SCIPerrorMessage.
gets objective coefficients from LP problem object
Definition at line 1693 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_OKAY, and SCIPdebugMessage.
gets current bounds from LP problem object
Definition at line 1712 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_CALL, SCIP_OKAY, and SCIPdebugMessage. Referenced by SCIPlpiGetCols().
gets current row sides from LP problem object
Definition at line 1736 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_CALL, SCIP_OKAY, and SCIPdebugMessage. Referenced by SCIPlpiGetRows().
gets a single coefficient
Definition at line 1764 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_CALL, 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 2156 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, and WRITE_ABOVE.
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 2212 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, and WRITE_ABOVE.
calls barrier or interior point algorithm to solve the LP with crossover to simplex basis
Definition at line 2264 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, and WRITE_ABOVE.
performs strong branching iterations on one fractional candidate
performs strong branching iterations on given fractional candidates
performs strong branching iterations on one candidate with integral value
performs strong branching iterations on given candidates with integral values
returns whether a solve method was called after the last modification of the LP
Definition at line 2708 of file lpi_msk.c. References NULL, SCIP_ABORT_FALSE, and SCIPdebugMessage.
gets information about primal and dual feasibility of the current LP solution
Definition at line 2727 of file lpi_msk.c. References FALSE, MOSEK_CALL, NULL, SCIP_Bool, SCIP_LPERROR, SCIP_OKAY, SCIPdebugMessage, and TRUE. returns TRUE iff LP is proven to have a primal unbounded ray (but not necessary a primal feasible point); this does not necessarily mean, that the solver knows and can return the primal ray
Definition at line 2789 of file lpi_msk.c. References NULL, SCIP_ABORT_FALSE, and SCIPdebugMessage. Referenced by SCIPlpiIsDualInfeasible(). returns TRUE iff LP is proven to have a primal unbounded ray (but not necessary a primal feasible point), and the solver knows and can return the primal ray
Definition at line 2812 of file lpi_msk.c. References NULL, SCIP_ABORT_FALSE, and SCIPdebugMessage. returns TRUE iff LP is proven to be primal infeasible
Definition at line 2838 of file lpi_msk.c. References SCIPlpiExistsDualRay(). returns TRUE iff LP is proven to be primal feasible
Definition at line 2846 of file lpi_msk.c. References NULL, SCIP_ABORT_FALSE, and SCIPdebugMessage. returns TRUE iff LP is proven to have a dual unbounded ray (but not necessary a dual feasible point); this does not necessarily mean, that the solver knows and can return the dual ray
Definition at line 2866 of file lpi_msk.c. References NULL, SCIP_ABORT_FALSE, and SCIPdebugMessage. Referenced by SCIPlpiGetState(), and SCIPlpiIsPrimalInfeasible(). returns TRUE iff LP is proven to have a dual unbounded ray (but not necessary a dual feasible point), and the solver knows and can return the dual ray
Definition at line 2889 of file lpi_msk.c. References NULL, SCIP_ABORT_FALSE, and SCIPdebugMessage. returns TRUE iff LP is proven to be dual infeasible
Definition at line 2915 of file lpi_msk.c. References SCIPlpiExistsPrimalRay(). returns TRUE iff LP is proven to be dual feasible
Definition at line 2923 of file lpi_msk.c. References NULL, SCIP_ABORT_FALSE, and SCIPdebugMessage. returns TRUE iff LP was solved to optimality
Definition at line 2942 of file lpi_msk.c. References NULL, SCIP_ABORT_FALSE, and SCIPdebugMessage.
returns the internal solution status of the solver
Definition at line 3011 of file lpi_msk.c. References NULL, SCIP_OKAY, and SCIPdebugMessage.
tries to reset the internal status of the LP solver in order to ignore an instability of the last solving call
Definition at line 3032 of file lpi_msk.c. References FALSE, NULL, SCIP_OKAY, and SCIPdebugMessage.
gets objective value of solution
Definition at line 3049 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_OKAY, and SCIPdebugMessage.
gets primal and dual solution vectors
Definition at line 3068 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_ALLOC, 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 3114 of file lpi_msk.c. References MOSEK_CALL, 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 3132 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_OKAY, and SCIPdebugMessage.
gets the number of LP iterations of the last solve call
Definition at line 3150 of file lpi_msk.c. References 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 3171 of file lpi_msk.c. References NULL, SCIP_INVALID, and SCIP_OKAY.
gets current basis status for columns and rows; arrays must be large enough to store the basis status
Definition at line 3386 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_CALL, 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 3420 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_CALL, 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 3450 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_CALL, SCIP_OKAY, and SCIPdebugMessage.
get column of inverse basis matrix B^-1
Definition at line 3495 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_ALLOC, SCIP_OKAY, and SCIPdebugMessage.
get row of inverse basis matrix B^-1
Definition at line 3566 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_ALLOC, SCIP_OKAY, and SCIPdebugMessage. Referenced by SCIPlpiGetBInvARow().
get row of inverse basis matrix times constraint matrix B^-1 * A
Definition at line 3633 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, and SCIPlpiGetBInvRow().
get column of inverse basis matrix times constraint matrix B^-1 * A
Definition at line 3711 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_ALLOC, SCIP_OKAY, SCIP_Real, and SCIPdebugMessage.
stores LP state (like basis information) into lpistate object
Definition at line 3937 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, and SCIPlpiExistsDualRay().
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 3991 of file lpi_msk.c. References MOSEK_CALL, NULL, REALABS, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPdebugMessage, and SCIPlpiIsInfinity().
clears current LPi state (like basis information) of the solver
Definition at line 4053 of file lpi_msk.c. References NULL, SCIP_OKAY, and SCIPmessagePrintWarning().
frees LP state information
Definition at line 4066 of file lpi_msk.c. References NULL, SCIP_OKAY, and SCIPdebugMessage.
checks, whether the given LP state contains simplex basis information
Definition at line 4087 of file lpi_msk.c. References NULL, and SCIPdebugMessage.
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 4102 of file lpi_msk.c. References MOSEK_CALL, 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 4119 of file lpi_msk.c. References MOSEK_CALL, NULL, 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()
gets integer parameter of LP
Definition at line 4249 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_LPPAR_FASTMIP, SCIP_LPPAR_FROMSCRATCH, SCIP_LPPAR_LPINFO, SCIP_LPPAR_LPITLIM, SCIP_LPPAR_PRESOLVING, SCIP_LPPAR_PRICING, SCIP_LPPAR_SCALING, SCIP_OKAY, SCIP_PARAMETERUNKNOWN, 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 4295 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_LPPAR_FASTMIP, SCIP_LPPAR_FROMSCRATCH, SCIP_LPPAR_LPINFO, SCIP_LPPAR_LPITLIM, SCIP_LPPAR_PRESOLVING, SCIP_LPPAR_PRICING, SCIP_LPPAR_SCALING, 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, and SCIPdebugMessage.
gets floating point parameter of LP
Definition at line 4431 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_LPPAR_BARRIERCONVTOL, 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 4474 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_LPPAR_BARRIERCONVTOL, SCIP_LPPAR_DUALFEASTOL, SCIP_LPPAR_FEASTOL, SCIP_LPPAR_LOBJLIM, SCIP_LPPAR_LPTILIM, SCIP_LPPAR_MARKOWITZ, SCIP_LPPAR_UOBJLIM, SCIP_OKAY, SCIP_PARAMETERUNKNOWN, and SCIPdebugMessage. checks if given value is treated as infinity in the LP solver
Definition at line 4544 of file lpi_msk.c. References IS_POSINF, and NULL. Referenced by SCIPlpiSetState().
reads LP from a file read file in MPS format parameters: filename bool keepNames bool ignoreErrors
Definition at line 4563 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_OKAY, and SCIPdebugMessage.
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 4585 of file lpi_msk.c. References MOSEK_CALL, NULL, SCIP_OKAY, and SCIPdebugMessage. |