help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Solving pure IP by calling MIP solver gives wrong status


From: Andrew Makhorin
Subject: Re: [Help-glpk] Solving pure IP by calling MIP solver gives wrong status
Date: Mon, 03 Jun 2013 22:26:56 +0400

> 
> In the end I have the following output:
> 
> 
> Constructing initial basis...
> Size of triangular part = 2
> GLPK Simplex Optimizer, v4.45
> 2 rows, 5 columns, 10 non-zeros
>       0: obj =   0.000000000e+00  infeas =  1.000e+00 (0)
> *     1: obj =   1.666666667e-01  infeas =  0.000e+00 (0)
> *     3: obj =   3.411764706e+00  infeas =  0.000e+00 (0)
> OPTIMAL SOLUTION FOUND
> GLPK Integer Optimizer, v4.45
> 2 rows, 5 columns, 10 non-zeros
> 5 integer variables, none of which are binary
> Integer optimization begins...
> +     3: mip =     not found yet <=              +inf        (1; 0)
> +     4: mip =     not found yet <=     tree is empty        (0; 1)
> PROBLEM HAS NO INTEGER FEASIBLE SOLUTION
> 
> 
> glpk status = 5  (GLP_OPT = 5 ; GLP_NOFEAS = 4)
> obj val = 0   ( in the code obj_val variable intialized by -1.0 )
> 
> 
> Hence, given problem should be infeasible, status = 4, but instead in
> has optimal solution.
> Might it be a bug in the solver?

Looks like you call glp_get_status rather than glp_mip_status.
Glp_get_status returns the status of lp relaxation, which is optimal in
your case. To retrieve the *mip* status you should call glp_mip_status.
For details please see the glpk reference manual.





reply via email to

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