lpiexact.h
Go to the documentation of this file.
34/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
51 * This file specifies a generic interface for numerically exact LP solvers used by SCIP to create, modify, and solve
60 * and query information about the solution. It is mainly a numerically exact analogue of the standard floating-point
61 * \ref LPIS, so we refer to this documentation for further details on the design of the interface.
125/** calls initializator of LP solver; this is mainly needed for defining constants in extended and rational precision */
131/** calls deinitializator of LP solver; this is needed for freeing all internal data of the solver, like constants in
208/** deletes columns from SCIP_LP; the new position of a column must not be greater that its old position */
239/** deletes rows from SCIP_LP; the new position of a row must not be greater that its old position */
299/** multiplies a row with a non-zero scalar; for negative scalars, the row's sense is switched accordingly */
307/** multiplies a column with a non-zero scalar; the objective value is multiplied with the scalar, and the bounds
396 char** colnames, /**< pointers to column names (of size at least lastcol-firstcol+1) or NULL if namestoragesize is zero */
398 int namestoragesize, /**< size of namestorage (if 0, -storageleft returns the storage needed) */
399 int* storageleft /**< amount of storage left (if < 0 the namestorage was not big enough) or NULL if namestoragesize is zero */
408 char** rownames, /**< pointers to row names (of size at least lastrow-firstrow+1) or NULL if namestoragesize is zero */
410 int namestoragesize, /**< size of namestorage (if 0, -storageleft returns the storage needed) */
411 int* storageleft /**< amount of storage left (if < 0 the namestorage was not big enough) or NULL if namestoragesize is zero */
538/** returns TRUE iff LP is proven to have a primal unbounded ray (but not necessary a primal feasible point);
546/** returns TRUE iff LP is proven to have a primal unbounded ray (but not necessary a primal feasible point),
572/** returns TRUE iff LP is proven to have a dual unbounded ray (but not necessary a dual feasible point);
580/** returns TRUE iff LP is proven to have a dual unbounded ray (but not necessary a dual feasible point),
614 * This function should return true if the solution is reliable, i.e., feasible and optimal (or proven
615 * infeasible/unbounded) with respect to the original problem. The optimality status might be with respect to a scaled
616 * version of the problem, but the solution might not be feasible to the unscaled original problem; in this case,
648/** tries to reset the internal status of the LP solver in order to ignore an instability of the last solving call */
705/** gets current basis status for columns and rows; arrays must be large enough to store the basis status */
759 SCIP_RATIONAL** binvrow, /**< row in (A_B)^-1 from prior call to SCIPlpiExactGetBInvRow(), or NULL */
796/** loads LPi state (like basis information) into solver; note that the LP might have been extended with additional
841/** checks whether LPi state (i.e. basis information) is dual feasbile and returns corresponding dual objective value.
843 * (corrected via dual variables for bounds and primal variables for slacks if possible) for optimality
852 SCIP_Real* primalsol, /**< approximate primal solution; or NULL to compute by exact LP solver */
855 SCIP_RATIONAL** dualobjval /**< pointer to store dual objective value in case of dual feasibility */
877/** loads LPi pricing norms into solver; note that the LP might have been extended with additional
common defines and data types used in all packages of SCIP
void * SCIPlpiExactGetSolverPointer(SCIP_LPIEXACT *lpi)
Definition: lpiexact_none.c:108
SCIP_Bool SCIPlpiExactHasDualRay(SCIP_LPIEXACT *lpi)
Definition: lpiexact_none.c:788
SCIP_RETCODE SCIPlpiExactSetRealpar(SCIP_LPIEXACT *lpi, SCIP_LPPARAM type, SCIP_Real dval)
Definition: lpiexact_none.c:1194
SCIP_RETCODE SCIPlpiExactSetBase(SCIP_LPIEXACT *lpi, int *cstat, int *rstat)
Definition: lpiexact_none.c:979
SCIP_RETCODE SCIPlpiExactReadState(SCIP_LPIEXACT *lpi, const char *fname)
Definition: lpiexact_none.c:1125
SCIP_Bool SCIPlpiExactHasStateBasis(SCIP_LPIEXACT *lpi, SCIP_LPISTATE *lpistate)
Definition: lpiexact_none.c:1114
SCIP_RETCODE SCIPlpiExactGetObj(SCIP_LPIEXACT *lpi, int firstcol, int lastcol, SCIP_RATIONAL **vals)
Definition: lpiexact_none.c:555
SCIP_RETCODE SCIPlpiExactStartStrongbranch(SCIP_LPIEXACT *lpi)
Definition: lpiexact_none.c:655
SCIP_RETCODE SCIPlpiExactIgnoreInstability(SCIP_LPIEXACT *lpi, SCIP_Bool *success)
Definition: lpiexact_none.c:878
SCIP_RETCODE SCIPlpiExactGetObjval(SCIP_LPIEXACT *lpi, SCIP_RATIONAL *objval)
Definition: lpiexact_none.c:890
void SCIPlpiExactEnd(void)
SCIP_RETCODE SCIPlpiExactScaleRow(SCIP_LPIEXACT *lpi, int row, SCIP_RATIONAL *scaleval)
const char * SCIPlpiExactGetExternalCodeDesc(void)
Definition: lpiexact_qsoex.c:431
SCIP_Bool SCIPlpiExactIsPosInfinity(SCIP_LPIEXACT *lpi, SCIP_RATIONAL *val)
SCIP_Bool SCIPlpiExactIsDualUnbounded(SCIP_LPIEXACT *lpi)
Definition: lpiexact_none.c:798
void SCIPlpiExactPrintInfo(SCIP_LPIEXACT *lpi)
SCIP_RETCODE SCIPlpiExactWriteLP(SCIP_LPIEXACT *lpi, const char *fname)
Definition: lpiexact_none.c:1259
SCIP_Bool SCIPlpiExactHasPrimalRay(SCIP_LPIEXACT *lpi)
Definition: lpiexact_none.c:734
SCIP_RETCODE SCIPlpiExactGetNorms(SCIP_LPIEXACT *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS **lpinorms)
SCIP_Bool SCIPlpiExactExistsDualRay(SCIP_LPIEXACT *lpi)
Definition: lpiexact_none.c:776
SCIP_Bool SCIPlpiExactIsStable(SCIP_LPIEXACT *lpi)
SCIP_RETCODE SCIPlpiExactGetDualfarkas(SCIP_LPIEXACT *lpi, SCIP_RATIONAL **dualfarkas)
Definition: lpiexact_none.c:934
SCIP_RETCODE SCIPlpiExactEndStrongbranch(SCIP_LPIEXACT *lpi)
Definition: lpiexact_none.c:666
SCIP_RETCODE SCIPlpiExactSolveDual(SCIP_LPIEXACT *lpi)
Definition: lpiexact_none.c:634
const char * SCIPlpiExactGetSolverDesc(void)
Definition: lpiexact_none.c:100
SCIP_RETCODE SCIPlpiExactChgObjsen(SCIP_LPIEXACT *lpi, SCIP_OBJSEN objsen)
Definition: lpiexact_none.c:391
SCIP_RETCODE SCIPlpiExactSetIntpar(SCIP_LPIEXACT *lpi, SCIP_LPPARAM type, int ival)
Definition: lpiexact_none.c:1171
SCIP_RETCODE SCIPlpiExactWriteState(SCIP_LPIEXACT *lpi, const char *fname)
Definition: lpiexact_none.c:1137
SCIP_RETCODE SCIPlpiExactScaleCol(SCIP_LPIEXACT *lpi, int col, SCIP_RATIONAL *scaleval)
SCIP_RETCODE SCIPlpiExactSetNorms(SCIP_LPIEXACT *lpi, BMS_BLKMEM *blkmem, const SCIP_LPINORMS *lpinorms)
SCIP_RETCODE SCIPlpiExactGetBInvARow(SCIP_LPIEXACT *lpi, int r, SCIP_RATIONAL **binvrow, SCIP_RATIONAL **coef, int *inds, int *ninds)
SCIP_RETCODE SCIPlpiExactChgCoef(SCIP_LPIEXACT *lpi, int row, int col, SCIP_RATIONAL *newval)
Definition: lpiexact_none.c:379
SCIP_Bool SCIPlpiExactWasSolved(SCIP_LPIEXACT *lpi)
Definition: lpiexact_none.c:687
SCIP_Bool SCIPlpiExactIsPrimalUnbounded(SCIP_LPIEXACT *lpi)
Definition: lpiexact_none.c:744
SCIP_RETCODE SCIPlpiExactGetSides(SCIP_LPIEXACT *lpi, int firstrow, int lastrow, SCIP_RATIONAL **lhss, SCIP_RATIONAL **rhss)
Definition: lpiexact_none.c:585
SCIP_RETCODE SCIPlpiExactGetCols(SCIP_LPIEXACT *lpi, int firstcol, int lastcol, SCIP_RATIONAL **lb, SCIP_RATIONAL **ub, int *nnonz, int *beg, int *ind, SCIP_RATIONAL **val)
Definition: lpiexact_none.c:468
SCIP_Bool SCIPlpiExactIsPrimalInfeasible(SCIP_LPIEXACT *lpi)
Definition: lpiexact_none.c:754
SCIP_RETCODE SCIPlpiExactFreeNorms(SCIP_LPIEXACT *lpi, BMS_BLKMEM *blkmem, SCIP_LPINORMS **lpinorms)
SCIP_Real SCIPlpiExactInfinity(SCIP_LPIEXACT *lpi)
Definition: lpiexact_none.c:1216
SCIP_RETCODE SCIPlpiExactGetRows(SCIP_LPIEXACT *lpi, int firstrow, int lastrow, SCIP_RATIONAL **lhs, SCIP_RATIONAL **rhs, int *nnonz, int *beg, int *ind, SCIP_RATIONAL **val)
Definition: lpiexact_none.c:488
SCIP_RETCODE SCIPlpiExactGetSolFeasibility(SCIP_LPIEXACT *lpi, SCIP_Bool *primalfeasible, SCIP_Bool *dualfeasible)
Definition: lpiexact_none.c:706
SCIP_RETCODE SCIPlpiExactGetBInvCol(SCIP_LPIEXACT *lpi, int c, SCIP_RATIONAL **coef, int *inds, int *ninds)
Definition: lpiexact_none.c:1031
SCIP_Bool SCIPlpiExactExistsPrimalRay(SCIP_LPIEXACT *lpi)
Definition: lpiexact_none.c:722
SCIP_Bool SCIPlpiExactIsInfinity(SCIP_LPIEXACT *lpi, SCIP_Real val)
Definition: lpiexact_none.c:1225
SCIP_RETCODE SCIPlpiExactAddRows(SCIP_LPIEXACT *lpi, int nrows, SCIP_RATIONAL **lhs, SCIP_RATIONAL **rhs, char **rownames, int nnonz, int *beg, int *ind, SCIP_RATIONAL **val)
Definition: lpiexact_none.c:261
SCIP_RETCODE SCIPlpiExactCreate(SCIP_LPIEXACT **lpi, SCIP_MESSAGEHDLR *messagehdlr, const char *name, SCIP_OBJSEN objsen)
Definition: lpiexact_none.c:126
SCIP_Bool SCIPlpiExactIsIterlimExc(SCIP_LPIEXACT *lpi)
Definition: lpiexact_none.c:848
SCIP_RETCODE SCIPlpiExactLoadColLP(SCIP_LPIEXACT *lpi, SCIP_OBJSEN objsen, int ncols, SCIP_RATIONAL **obj, SCIP_RATIONAL **lb, SCIP_RATIONAL **ub, char **colnames, int nrows, SCIP_RATIONAL **lhs, SCIP_RATIONAL **rhs, char **rownames, int nnonz, int *beg, int *ind, SCIP_RATIONAL **val)
Definition: lpiexact_none.c:170
SCIP_Bool SCIPlpiExactIsPrimalFeasible(SCIP_LPIEXACT *lpi)
Definition: lpiexact_none.c:764
SCIP_Bool SCIPlpiExactIsNegInfinity(SCIP_LPIEXACT *lpi, SCIP_RATIONAL *val)
SCIP_Bool SCIPlpiExactIsDualFeasible(SCIP_LPIEXACT *lpi)
Definition: lpiexact_none.c:818
SCIP_RETCODE SCIPlpiExactReadLP(SCIP_LPIEXACT *lpi, const char *fname)
Definition: lpiexact_none.c:1247
SCIP_RETCODE SCIPlpiExactCreateFactor(SCIP_LPIEXACT *lpi, int dim, int *cbeg, int *clen, int *cindx, SCIP_RATIONAL *ccoef)
SCIP_RETCODE SCIPlpiExactGetBasisInd(SCIP_LPIEXACT *lpi, int *bind)
Definition: lpiexact_none.c:993
SCIP_RETCODE SCIPlpiExactGetObjsen(SCIP_LPIEXACT *lpi, SCIP_OBJSEN *objsen)
Definition: lpiexact_none.c:545
SCIP_Bool SCIPlpiExactIsOptimal(SCIP_LPIEXACT *lpi)
Definition: lpiexact_none.c:828
SCIP_RETCODE SCIPlpiExactGetRowNames(SCIP_LPIEXACT *lpi, int firstrow, int lastrow, char **rownames, char *namestorage, int namestoragesize, int *storageleft)
Definition: lpiexact_none.c:525
SCIP_RETCODE SCIPlpiExactAddCols(SCIP_LPIEXACT *lpi, int ncols, SCIP_RATIONAL **obj, SCIP_RATIONAL **lb, SCIP_RATIONAL **ub, char **colnames, int nnonz, int *beg, int *ind, SCIP_RATIONAL **val)
Definition: lpiexact_none.c:215
void SCIPlpiExactStart(void)
SCIP_RETCODE SCIPlpiExactGetBase(SCIP_LPIEXACT *lpi, int *cstat, int *rstat)
Definition: lpiexact_none.c:967
SCIP_RETCODE SCIPlpiExactDelColset(SCIP_LPIEXACT *lpi, int *dstat)
SCIP_RETCODE SCIPlpiExactDelCols(SCIP_LPIEXACT *lpi, int firstcol, int lastcol)
Definition: lpiexact_none.c:245
SCIP_RETCODE SCIPlpiExactChgObj(SCIP_LPIEXACT *lpi, int ncols, int *ind, SCIP_RATIONAL **obj)
Definition: lpiexact_none.c:401
SCIP_RETCODE SCIPlpiExactGetPrimalRay(SCIP_LPIEXACT *lpi, SCIP_RATIONAL **ray)
Definition: lpiexact_none.c:923
SCIP_RETCODE SCIPlpiExactGetBounds(SCIP_LPIEXACT *lpi, int firstcol, int lastcol, SCIP_RATIONAL **lbs, SCIP_RATIONAL **ubs)
Definition: lpiexact_none.c:570
int SCIPlpiExactGetInternalStatus(SCIP_LPIEXACT *lpi)
Definition: lpiexact_none.c:868
const char * SCIPlpiExactGetExternalCodeName(void)
Definition: lpiexact_qsoex.c:417
void SCIPlpiExactPosInfinity(SCIP_LPIEXACT *lpi, SCIP_RATIONAL *infval)
SCIP_RETCODE SCIPlpiExactGetCoef(SCIP_LPIEXACT *lpi, int row, int col, SCIP_RATIONAL *val)
Definition: lpiexact_none.c:600
SCIP_RETCODE SCIPlpiExactGetColNames(SCIP_LPIEXACT *lpi, int firstcol, int lastcol, char **colnames, char *namestorage, int namestoragesize, int *storageleft)
Definition: lpiexact_none.c:505
SCIP_RETCODE SCIPlpiExactGetNNonz(SCIP_LPIEXACT *lpi, int *nnonz)
Definition: lpiexact_none.c:453
SCIP_Bool SCIPlpiExactIsDualInfeasible(SCIP_LPIEXACT *lpi)
Definition: lpiexact_none.c:808
SCIP_Bool SCIPlpiExactIsObjlimExc(SCIP_LPIEXACT *lpi)
Definition: lpiexact_none.c:838
SCIP_RETCODE SCIPlpiExactClearState(SCIP_LPIEXACT *lpi)
Definition: lpiexact_none.c:1092
SCIP_RETCODE SCIPlpiExactStrongbranch(SCIP_LPIEXACT *lpi, int col, const SCIP_RATIONAL *psol, int itlim, SCIP_RATIONAL *down, SCIP_RATIONAL *up, SCIP_Bool *downvalid, SCIP_Bool *upvalid, int *iter)
SCIP_RETCODE SCIPlpiExactGetNCols(SCIP_LPIEXACT *lpi, int *ncols)
Definition: lpiexact_none.c:438
SCIP_RETCODE SCIPlpiExactSolveBarrier(SCIP_LPIEXACT *lpi, SCIP_Bool crossover)
Definition: lpiexact_none.c:644
SCIP_RETCODE SCIPlpiExactGetBInvRow(SCIP_LPIEXACT *lpi, int r, SCIP_RATIONAL **coef, int *inds, int *ninds)
Definition: lpiexact_none.c:1010
void SCIPlpiExactNegInfinity(SCIP_LPIEXACT *lpi, SCIP_RATIONAL *infval)
SCIP_RETCODE SCIPlpiExactChgSides(SCIP_LPIEXACT *lpi, int nrows, int *ind, SCIP_RATIONAL **lhs, SCIP_RATIONAL **rhs)
Definition: lpiexact_none.c:362
SCIP_RETCODE SCIPlpiExactGetState(SCIP_LPIEXACT *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE **lpistate)
Definition: lpiexact_none.c:1061
SCIP_RETCODE SCIPlpiExactDelRows(SCIP_LPIEXACT *lpi, int firstrow, int lastrow)
Definition: lpiexact_none.c:287
SCIP_RETCODE SCIPlpiExactGetNRows(SCIP_LPIEXACT *lpi, int *nrows)
Definition: lpiexact_none.c:423
SCIP_Bool SCIPlpiExactIsTimelimExc(SCIP_LPIEXACT *lpi)
Definition: lpiexact_none.c:858
SCIP_RETCODE SCIPlpiExactGetRealpar(SCIP_LPIEXACT *lpi, SCIP_LPPARAM type, SCIP_Real *dval)
Definition: lpiexact_none.c:1182
SCIP_RETCODE SCIPlpiExactChgBounds(SCIP_LPIEXACT *lpi, int ncols, int *ind, SCIP_RATIONAL **lb, SCIP_RATIONAL **ub)
Definition: lpiexact_none.c:349
SCIP_RETCODE SCIPlpiExactStateDualFeasible(SCIP_LPIEXACT *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE *lpistate, SCIP_Bool useprestep, SCIP_Real *primalsol, SCIP_Real *dualsol, SCIP_Bool *result, SCIP_RATIONAL **dualobjval)
SCIP_RETCODE SCIPlpiExactGetBInvACol(SCIP_LPIEXACT *lpi, int c, SCIP_RATIONAL **coef, int *inds, int *ninds)
SCIP_RETCODE SCIPlpiExactFreeState(SCIP_LPIEXACT *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE **lpistate)
Definition: lpiexact_none.c:1101
SCIP_RETCODE SCIPlpiExactDelRowset(SCIP_LPIEXACT *lpi, int *dstat)
Definition: lpiexact_none.c:303
SCIP_RETCODE SCIPlpiExactGetSol(SCIP_LPIEXACT *lpi, SCIP_RATIONAL *objval, SCIP_RATIONAL **primsol, SCIP_RATIONAL **dualsol, SCIP_RATIONAL **activity, SCIP_RATIONAL **redcost)
Definition: lpiexact_none.c:907
SCIP_RETCODE SCIPlpiExactSolvePrimal(SCIP_LPIEXACT *lpi)
Definition: lpiexact_none.c:624
SCIP_RETCODE SCIPlpiExactFactorSolve(SCIP_LPIEXACT *lpi, int dim, SCIP_RATIONAL *sol, SCIP_RATIONAL *rhs)
SCIP_RETCODE SCIPlpiExactGetIntpar(SCIP_LPIEXACT *lpi, SCIP_LPPARAM type, int *ival)
Definition: lpiexact_none.c:1159
SCIP_RETCODE SCIPlpiExactSetState(SCIP_LPIEXACT *lpi, BMS_BLKMEM *blkmem, SCIP_LPISTATE *lpistate)
Definition: lpiexact_none.c:1078
SCIP_RETCODE SCIPlpiExactGetIterations(SCIP_LPIEXACT *lpi, int *iterations)
Definition: lpiexact_none.c:945
memory allocation routines
wrapper for rational number arithmetic
Definition: lpiexact_none.c:50
Definition: lpi_cpx.c:199
Definition: lpi_clp.cpp:133
Definition: struct_message.h:46
Definition: struct_rational.h:47
type definitions for specific exact LP solvers interface
type definitions for return codes for SCIP methods