Hi,

On Thu, 22 Apr 2010, Andrew Makhorin <m...@gnu.org> writes:
> Most likely your instance has multiple optima, so your program finds
> one optimal solution while glpsol finds another. As you can see the
> optimal objective value is the same in both cases.
>
> Note that to solve mip you need to call glp_simplex (to find optimal
> solution to lp relaxation) and *then* call glp_intopt (to find integer
> optimal solution), in which case the column values should be obtained
> with glp_mip_col_val, not with glp_get_col_prim. It happened that for
> your particular instance optimal solution to lp relaxation is integer
> feasible and therefore integer optimal; however, in a general case
> glp_intopt should be used. For details please see the glpk reference
> manual.

I incorporated glp_mip_col_val() and glp_intopt() into the code, and it
works like a charm. OTOH, please excuse my ignorance, but assuming all
my variables are marked as binary in CPLEX LP file, do I really need to
call glp_intopt() after glp_simplex() even if glp_get_status(lp) ==
GLP_OPT assertion holds?


Regards.


_______________________________________________
Help-glpk mailing list
Help-glpk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to