From 846df6812a98f4c43073e16bdb22a0fdbe09289e Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Thu, 1 Dec 2011 19:04:36 +0100 Subject: [PATCH] lpp_gurobi:disable log to console unless requested --- ir/lpp/lpp_gurobi.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/ir/lpp/lpp_gurobi.c b/ir/lpp/lpp_gurobi.c index fe0cb3af6..a87e6e1e1 100644 --- a/ir/lpp/lpp_gurobi.c +++ b/ir/lpp/lpp_gurobi.c @@ -74,6 +74,11 @@ static gurobi_t *new_gurobi(lpp_t *lpp) #if 0 error = GRBsetlogfile(grb->env, lpp->log); check_gurobi_error(grb, error); +#else + if (lpp->log != stdout && lpp->log != stderr) { + error = GRBsetintparam(grb->env, GRB_INT_PAR_OUTPUTFLAG, 0); + check_gurobi_error(grb, error); + } #endif return grb; @@ -193,22 +198,15 @@ static void gurobi_solve(gurobi_t *grb) check_gurobi_error(grb, error); } - /* - * If we have enough time, we instruct cplex to imply some - * of its higher order magic to pursue the best solution - */ - if(lpp->emphasis) { - /* not implemented */ - } - +#if 0 /* * If a bound of the objective function is supplied, * set it accordingly, dependign on minimization or maximization. */ if(lpp->set_bound) { - //panic("bound not implemented yet"); fprintf(stderr, "Warning: gurobi bound not implemented yet\n"); } +#endif /* solve */ error = GRBoptimize(grb->model); -- 2.20.1