aboutsummaryrefslogtreecommitdiffstats
path: root/native/src/linprog/io.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'native/src/linprog/io.cpp')
-rw-r--r--native/src/linprog/io.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/native/src/linprog/io.cpp b/native/src/linprog/io.cpp
index 14eeca5..801e833 100644
--- a/native/src/linprog/io.cpp
+++ b/native/src/linprog/io.cpp
@@ -22,6 +22,21 @@ std::ostream& operator<<(std::ostream &os, const LinearExpression &exp)
22 return os; 22 return os;
23} 23}
24 24
25std::ostream& operator<<(std::ostream &os, const LinearProgram &lp)
26{
27 os << "maximize " << *lp.get_objective() << " subject to:" << std::endl;
28 foreach (lp.get_equalities(), it)
29 {
30 os << *(it->first) << " = " << it->second << std::endl;
31 }
32 foreach (lp.get_inequalities(), it)
33 {
34 os << *(it->first) << " <= " << it->second << std::endl;
35 }
36
37 return os;
38}
39
25void dump_lp_solution( 40void dump_lp_solution(
26 VarMapper& vars, 41 VarMapper& vars,
27 const ResourceSharingInfo& info, 42 const ResourceSharingInfo& info,