[Top][All Lists]

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

Re: [Help-glpk] glp_get_col_prim() problem

From: Volkan YAZICI
Subject: Re: [Help-glpk] glp_get_col_prim() problem
Date: Thu, 22 Apr 2010 16:01:10 +0300
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)


On Thu, 22 Apr 2010, Andrew Makhorin <address@hidden> 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?


reply via email to

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