Re: [Fwd: GLPK Linear Programming solver]

2022-06-28 Thread Michael Hennebry

From: Prabhu Manyem 

I get an optimal solution with the SAME objective function value, but
now, some variables are NOT integers... I get a fractional solution.

Why the difference between the 2 methods?
How to fix this problem for the command line execution of GLPK?


Since they have the same objective function,
both solutions qualify as optimal.
You did not ask for an integer solution,
--nomip makes that clear,
so there was no reason for you to get one.
glp_simplex does not guarantee an integer solution either.
For that you need glp_intopt .

--
Michael   henne...@web.cs.ndsu.nodak.edu
"Sorry but your password must contain an uppercase letter, a number,
a haiku, a gang sign, a heiroglyph, and the blood of a virgin."
 --  someeecards



[Fwd: GLPK Linear Programming solver]

2022-06-28 Thread Andrew Makhorin
 Forwarded Message 
From: Prabhu Manyem 
To: Andrew Makhorin , Neill Clift 
Subject: GLPK Linear Programming solver
Date: Tue, 28 Jun 2022 14:39:01 +0930

> Hello,
> 
> About the GLPK Linear Programming solver 5.0, running Linear
> Programming models:
> 
> For some instances, when I run the solver from inside a C program,
> using the statement
>   glp_simplex(mis1, NULL),
> I get a solution which is fully Integer... For every variable, I
> obtain an integer value.
> 
> However, when I run the same model in Linux command line, using the
> command
> glpsol --nomip --simplex --lp Max_Clique_model.lp
> I get an optimal solution with the SAME objective function value, but
> now, some variables are NOT integers... I get a fractional solution.
> 
> Why the difference between the 2 methods?
> How to fix this problem for the command line execution of GLPK?
> 
> Thank you very much for your help.
> 
> Dr Prabhu Manyem
> Retired Professor of Applied Mathematics
> Nanchang Institute of Technology
>