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";
Preconfigured SoPlex LP-solver.
void add(const SVectorBase< S > &vec)
Append nonzeros of sv.
@ OPTIMAL
LP has been solved to optimality.
@ CHECKMODE_RATIONAL
rational check
@ OBJSENSE_MINIMIZE
minimization
@ OPTTOL
dual feasibility tolerance
@ FEASTOL
primal feasibility tolerance
@ CHECKMODE
mode for a posteriori feasibility checks
@ READMODE
mode for reading LP files
@ SYNCMODE
mode for synchronizing real and rational LP
@ OBJSENSE
objective sense
@ SOLVEMODE
mode for iterative refinement strategy
@ SYNCMODE_AUTO
automatic sync of real and rational LP
@ READMODE_RATIONAL
rational parsing
@ SOLVEMODE_RATIONAL
force iterative refinement
Everything should be within this namespace.
LPColBase< Rational > LPColRational
LPRowBase< Rational > LPRowRational
SOPLEX_THREADLOCAL const Real infinity
Preconfigured SoPlex LP solver.