summaryrefslogtreecommitdiffhomepage
path: root/ir/lpp
diff options
context:
space:
mode:
authorManuel Mohr <manuel.mohr@kit.edu>2013-02-01 09:53:39 +0100
committerManuel Mohr <manuel.mohr@kit.edu>2013-02-01 10:25:55 +0100
commit6effa6d0fb14c2458c19916c3a0d7a14b81f4b4a (patch)
tree473fa68074deae7f295dedf75d2c082b4bc45286 /ir/lpp
parent4c8736830029e1b0222f2f3d828eb5718cf9c461 (diff)
lpp: Issue warning when trying to set bounds for Gurobi.
Gurobi does not support setting lower bounds for minimization problems (or upper bounds for maximization problems), so issue a warning.
Diffstat (limited to 'ir/lpp')
-rw-r--r--ir/lpp/lpp_gurobi.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/ir/lpp/lpp_gurobi.c b/ir/lpp/lpp_gurobi.c
index 02bfac8..610badf 100644
--- a/ir/lpp/lpp_gurobi.c
+++ b/ir/lpp/lpp_gurobi.c
@@ -165,6 +165,17 @@ static void gurobi_solve(gurobi_t *grb)
check_gurobi_error(grb, error);
}
+ /* Judging from the CPLEX code, we'd like to set a lower bound for
+ * minimization problems and an upper bound for maximization problems.
+ * According to [1], Gurobi does simply not support these combinations
+ * (although lower/maximization and upper/minimization are okay).
+ *
+ * [1] https://groups.google.com/forum/?fromgroups=#!topic/gurobi/QkDpAAW7Cvw
+ */
+ if (lpp->set_bound) {
+ fprintf(stderr, "Warning: Gurobi does not support setting bounds.\n");
+ }
+
/* The MIPGAP parameter determines when we consider a solution optimal.
* To quote the documentation:
* "The MIP solver will terminate (with an optimal result) when the