[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] Finding minimum and maximum objective value

From: Benjamin Poirier
Subject: [Help-glpk] Finding minimum and maximum objective value
Date: Fri, 20 Nov 2009 02:58:02 +0300


I am currently using glpk. Thank you for the good documentation, the
"Brief example" in section 1.3.1 really helped me to start using the
library quickly. I have a question however. I would like to find both
the minimum and the maximum objective value for the same objective
function, constraints and bounds. I have tried:

glp_set_obj_dir(lp, GLP_MIN);
glp_simplex(lp, NULL);
min= glp_get_obj_val(lp);
glp_set_obj_dir(lp, GLP_MAX);
glp_simplex(lp, NULL);
max= glp_get_obj_val(lp);

but then max == min. Is there something that I have to clear/reset after
changing obj_dir before solving again?

Thank you,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]