Comments (5)
The reader errors because these files are in fixed MPS format, but Free MPS is used by default.
Notably, these files have row/column names that contain spaces (including IIRC some fieldnames that are just empty).
You need to pass mpsformat = :fixed
to force the use of Fixed MPS:
using QPSReader
netlib_path = fetch_netlib()
blend = readqps(joinpath(netlib_path, "BLEND.SIF"), mpsformat=:fixed)
This resolves the errors on the five instances above
julia> blend = readqps(joinpath(netlib_path, "BLEND.SIF"), mpsformat=:fixed);
[ Info: Using 'BLEND' as NAME (l. 5)
[ Info: Using 'C' as objective (l. 98)
[ Info: Using '' as RHS (l. 376)
julia> prob = readqps(joinpath(netlib_path, "DFL001.SIF"), mpsformat=:fixed);
[ Info: Using 'DFL001' as NAME (l. 5)
[ Info: Using 'NIL' as objective (l. 6098)
[ Info: Using '' as RHS (l. 29101)
[ Info: Using '' as BOUNDS (l. 29934)
julia> prob = readqps(joinpath(netlib_path, "FORPLAN.SIF"), mpsformat=:fixed)
[ Info: Using 'FORPLAN' as NAME (l. 5)
[ Info: Using 'OB1PNW20' as objective (l. 21)
[ Info: Using 'RHS 1' as RHS (l. 2733)
[ Info: Using 'RNG 1' as RANGES (l. 2742)
[ Info: Using 'BND-1' as BOUNDS (l. 2744)
julia> prob = readqps(joinpath(netlib_path, "GFRD-PNC.SIF"), mpsformat=:fixed);
[ Info: Using 'GFRD-PNC' as NAME (l. 5)
[ Info: Using 'OBJ' as objective (l. 20)
[ Info: Using '' as RHS (l. 2821)
[ Info: Using '' as BOUNDS (l. 2856)
julia> prob = readqps(joinpath(netlib_path, "SIERRA.SIF"), mpsformat=:fixed);
[ Info: Using 'SIERRA' as NAME (l. 5)
[ Info: Using 'OBJ' as objective (l. 1247)
[ Info: Using '' as RHS (l. 6566)
[ Info: Using '' as BOUNDS (l. 6958)
from qpsreader.jl.
Ah, I see. Thank you. Maybe the reader could print a message in case of error saying something like "try reading the file with mpsformat=:fixed
".
from qpsreader.jl.
print a message in case of error
I am not 100% in favour of doing that, mainly because there is virtually no way of telling whether an error is due to fixed vs free format, or something else. For instance, in the above example, out of 5 instances, three different errors were encountered.
For what it's worth, Mosek and CPLEX also error when reading those files.
We should however add a line in the README (e.g., in "Usage") to show how one can select the MPS format, and maybe underline the difference between fixed & free format.
from qpsreader.jl.
Sounds good.
from qpsreader.jl.
Closed by #27
from qpsreader.jl.
Related Issues (11)
- Add meaningful tests HOT 1
- Release and register as Julia package? HOT 6
- Drop Julia 1.1, 1.2 from CI HOT 1
- Convention for rim data? HOT 3
- Performance benchmark HOT 2
- Incorrect bounds on binary variables HOT 5
- Write docs
- Fails to read neos-5044663-wairoa HOT 2
- TagBot trigger issue HOT 1
- Use CITATION.cff instead of CITATION.bib
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qpsreader.jl.