59 mysoplex.writeFileReal(
"dump_real.lp", NULL, NULL, NULL);
65 stat = mysoplex.optimize();
70 mysoplex.getPrimal(prim);
71 mysoplex.getDual(dual);
72 std::cout <<
"LP solved to optimality.\n";
73 std::cout <<
"Objective value is " << mysoplex.objValueReal() <<
".\n";
74 std::cout <<
"Primal solution is [" << prim[0] <<
", " << prim[1] <<
"].\n";
75 std::cout <<
"Dual solution is [" << dual[0] <<
"].\n";
79 std::cout <<
"Error: SoPlex returned with status " << stat <<
".\n";
119 mysoplex.writeFileRational(
"dump_rational.lp", NULL, NULL, NULL);
125 stat = mysoplex.optimize();
130 mysoplex.getPrimalRational(prim);
131 mysoplex.getDualRational(dual);
132 std::cout <<
"LP solved to optimality.\n";
133 std::cout <<
"Objective value is " << mysoplex.objValueRational() <<
".\n";
134 std::cout <<
"Primal solution is [" << prim[0] <<
", " << prim[1] <<
"].\n";
135 std::cout <<
"Dual solution is [" << dual[0] <<
"].\n";
139 std::cout <<
"Error: SoPlex returned with status " << stat <<
".\n";
146 std::cout <<
"Testing SoPlex as floating-point LP solver:\n\n";
149 std::cout <<
"\nTesting SoPlex as exact rational LP solver:\n\n";
number< gmp_rational, et_off > Rational
LPRowBase< Rational > LPRowRational
Dense vector.Class VectorBase provides dense linear algebra vectors. Internally, VectorBase wraps std...
dual feasibility tolerance
Dynamic sparse vectors.Class DSVectorBase implements dynamic sparse vectors, i.e. SVectorBases with a...
LP has been solved to optimality.
mode for a posteriori feasibility checks
void add(const SVectorBase< S > &vec)
Append nonzeros of sv.
primal feasibility tolerance
automatic sync of real and rational LP
SOPLEX_THREADLOCAL const Real infinity
LPColBase< Rational > LPColRational
Preconfigured SoPlex LP solver.
Preconfigured SoPlex LP-solver.
Everything should be within this namespace.
mode for iterative refinement strategy
mode for reading LP files
mode for synchronizing real and rational LP
force iterative refinement