help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Converting solutions between CPlex and GLPK


From: Andrew Makhorin
Subject: Re: [Help-glpk] Converting solutions between CPlex and GLPK
Date: Thu, 01 Sep 2011 20:06:11 +0400

> > You may use 'glpsol -o filename --tmlim 1' to produce a listing that
> > contains all rows and columns in the same order as glpsol expects them
> > to appear on reading the solution file. Then compare that listing and
> > the cplex output to find which row is missing. I guess it is the
> > objective function row, which is free and therefore not processed by
> > cplex.
> 
> Thanks, but I tried something similar. I compared the CPlex converted 
> solution to the GLPK solution, but the solvers gave different solutions,
> making it hard to compare. Maybe I can retry with a simpler problem 
> having a single solution.

I meant comparing by names and ordinal numbers (indices), not by values,
since cplex provides row (constraint) and column (variable) names in its
sol file:


<linearConstraints>
  <constraint name="c1" index="0" slack="0"/>
  <constraint name="c2" index="1" slack="2"/>
  <constraint name="c3" index="2" slack="0"/>
 </linearConstraints>
 <variables>
  <variable name="x1" index="0" value="40"/>
  <variable name="x2" index="1" value="10.5"/>
  <variable name="x3" index="2" value="19.5"/>
  <variable name="x4" index="3" value="3"/>
 </variables>




reply via email to

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