locked
MPS output wrt unbounded general integer variables RRS feed

  • General discussion

  • When writing an MPS file with

                    context.SaveModel(FileFormat.FreeMPS, sw);

    it looks like general integer variables without a bound are incorrectly written. I believe they are missing an LI record (with value 0.0) in the bounds section, so they will be considered to be binary by other solvers.

    Similarly the MPS reader is also incorrect.
    Example:
    C:\Users\erwin\Documents>type mip4mps.oml
    Model[
      Decisions[Integers[0, Infinity], x],
      Constraints[x <= 5],
      Goals[Maximize[x]]
    ]
    
    C:\Users\erwin\Documents>type output.mps
    NAME          MODEL
    ROWS
     L  constrai
     N  goal_8ef
    COLUMNS
        INTMARK   'MARKER'                 'INTORG'
        x         constrai   1             goal_8ef  -1
        INTMARK   'MARKER'                 'INTEND'
    RHS
        RHS       constrai   5
    BOUNDS
    ENDATA
    
    C:\Users\erwin\Documents>
    The latter MPS file gives x=5 for MSF and x=1 for other solvers.
    Erwin


    ----------------------------------------------------------------
    Erwin Kalvelagen
    Amsterdam Optimization Modeling Group
    erwin@amsterdamoptimization.com
    http://amsterdamoptimization.com
    ----------------------------------------------------------------


    Tuesday, October 18, 2011 1:22 AM