-
Notifications
You must be signed in to change notification settings - Fork 94
Closed
Labels
Submodule: FileFormatsAbout the FileFormats submoduleAbout the FileFormats submodule
Description
I haven't tried to create examples, but the use of Dict
at
MathOptInterface.jl/src/FileFormats/MPS/MPS.jl
Lines 465 to 473 in 535e7f0
mutable struct TempMPSModel | |
name::String | |
obj_name::String | |
columns::Dict{String, TempColumn} | |
rows::Dict{String, TempRow} | |
intorg_flag::Bool # A flag used to parse COLUMNS section. | |
TempMPSModel() = new("", "", Dict{String, TempColumn}(), | |
Dict{String, TempRow}(), false) | |
end |
likely makes copy_to
not deterministic, e.g.,
for (name, column) in temp.columns |
for (c_name, row) in temp.rows |
Same issue in the ordering of variables when the problem is written out:
coefficients = Dict{String, Vector{Tuple{String, Float64}}}() |
for (variable, terms) in coefficients |
bounds = Dict{MOI.VariableIndex, Tuple{Float64, Float64}}() |
for (index, (lower, upper)) in bounds |
Unless we have a good reason not to, variables should keep their ordering when you round-trip read and write to an MPS file. The ordering of variables makes a huge difference for MIP solvers. Ideally the same would hold for constraints, although that's a bit more complex because of how we represent them in MOI.
odow
Metadata
Metadata
Assignees
Labels
Submodule: FileFormatsAbout the FileFormats submoduleAbout the FileFormats submodule