Closed odow closed 9 months ago
Rows with 0 >= 0
are being scrambled
julia> import HiGHS
julia> import MathOptInterface as MOI
julia> model = MOI.Utilities.Model{Float64}()
MOIU.Model{Float64}
julia> x = MOI.add_variable(model)
MOI.VariableIndex(1)
julia> g = zero(MOI.ScalarAffineFunction{Float64})
0.0
julia> MOI.add_constraint(model, 2.0 * x, MOI.GreaterThan(0.0))
MathOptInterface.ConstraintIndex{MathOptInterface.ScalarAffineFunction{Float64}, MathOptInterface.GreaterThan{Float64}}(1)
julia> MOI.add_constraint(model, g, MOI.GreaterThan(0.0))
MathOptInterface.ConstraintIndex{MathOptInterface.ScalarAffineFunction{Float64}, MathOptInterface.GreaterThan{Float64}}(2)
julia> MOI.add_constraint(model, 1.0 * x, MOI.EqualTo(1.0))
MathOptInterface.ConstraintIndex{MathOptInterface.ScalarAffineFunction{Float64}, MathOptInterface.EqualTo{Float64}}(1)
julia> h = HiGHS.Optimizer(); MOI.copy_to(h, model)
Running HiGHS 1.5.3 [date: 1970-01-01, git hash: 45a127b78]
Copyright (c) 2023 HiGHS under MIT licence terms
MathOptInterface.Utilities.IndexMap with 4 entries:
MOI.VariableIndex(1) => MOI.VariableIndex(1)
ConstraintIndex{ScalarAffineFunction{Float64}, EqualTo{Floa… => ConstraintIndex{ScalarAffineFunction{Float64}, EqualTo{Float64}}(3)
ConstraintIndex{ScalarAffineFunction{Float64}, GreaterThan{… => ConstraintIndex{ScalarAffineFunction{Float64}, GreaterThan{Float64}}(2)
ConstraintIndex{ScalarAffineFunction{Float64}, GreaterThan{… => ConstraintIndex{ScalarAffineFunction{Float64}, GreaterThan{Float64}}(1)
julia> print(h)
Minimize ScalarAffineFunction{Float64}:
0.0
Subject to:
ScalarAffineFunction{Float64}-in-EqualTo{Float64}
0.0 == 1.0
ScalarAffineFunction{Float64}-in-GreaterThan{Float64}
0.0 + 2.0 v[1] >= 0.0
0.0 + 1.0 v[1] >= 0.0
Using the file from https://discourse.julialang.org/t/highs-error-no-invertible-representation-for-getdualray/101372/11?u=odow
But the model is easy to grok that it should be feasible.