-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug in copy_to #172
Comments
Rows with 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 |
This was referenced Sep 26, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The text was updated successfully, but these errors were encountered: