help-glpk
[Top][All Lists]
Advanced

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

RE: [Help-glpk] OPB output file anomaly


From: Joey Rios
Subject: RE: [Help-glpk] OPB output file anomaly
Date: Mon, 10 Mar 2008 17:16:13 -0700



> The point is that mps file does not provide information about the
> objective; instead that the first free row is used as the objective
> by default. Once mps file has been read by glpk routine, coefficients
> of the first free row are stored as objective coefficients, however,
> that free row is also kept in the instance. Thus, writing the
> objective row would produce two identical rows in output mps file.
> That's why glpk routine does not write the objective row by default if
> there is a free row in the instance.
>
Hi Andrew,

Thanks for the explanation on MPS format.  I think I understand what you mean by doubling of rows due to objective function/free rows.  This does still leave me confused however.  The issue, from my perspective, is that I can do the following:

1.  Use glpsol with input files a.mod and a.dat (mathprog format) to get solution.
2.  I can also write out a.mps and a.cplex (and a.opb for that matter) using glpsol.
3.  Now if I use glpsol on a.mps or a.cplex I get a different answer from step #1, and that difference is the constant in the objective (which is now missing).

So, more concretely:

glpsol --math -m a.mod -d a.dat --wcpxlp a.cplex
/* and subsequently */
glpsol --cpxlp a.cplex

provides different solutions.

Something just doesn't seem right about that.  Am I still missing something fundamental here?

I looked at the cplex file as you suggested and I see at the end of the objective function a comment line:

\* constant term = -240720 *\

And that, as I mentioned, is the difference between the solution in cplex input mode and the original mathprog mode.  Should the user just know to look for this comment in the cplex file to verify his/her solution?

Any further clarification appreciated.  Thanks again for helping me understand this situation.

Joey


Connect and share in new ways with Windows Live. Get it now!

reply via email to

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