Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ JuMP = "1"
LazyArrays = "0.21, 0.22, 1"
MathOptInterface = "1.18"
MathOptSetDistances = "0.2.9"
ParametricOptInterface = "0.12.1"
ParametricOptInterface = "0.14"
julia = "1.6"
2 changes: 1 addition & 1 deletion src/parameters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ function MOI.get(
if _is_parameter(model, variable)
error("Trying to get a forward variable sensitivity for a parameter")
end
return MOI.get(model.optimizer, attr, model.variables[variable])
return MOI.get(model.optimizer, attr, variable)
end

# reverse mode
Expand Down
2 changes: 1 addition & 1 deletion test/jump.jl
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ function test_psd_square_error()

@constraint(model, con, [-p*x 0; 0 x] in PSDCone())

@test_throws MOI.SetAttributeNotAllowed optimize!(model)
@test_throws MOI.Bridges.ModifyBridgeNotAllowed optimize!(model)

# DiffOpt.set_forward_parameter(model, p, 1.0)
# DiffOpt.forward_differentiate!(model)
Expand Down
16 changes: 14 additions & 2 deletions test/moi_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,20 @@ function test_moi_test_runtests()
# )
MOI.set(model, MOI.Silent(), true)
config =
MOI.Test.Config(; atol = 1e-7, exclude = Any[MOI.compute_conflict!])
MOI.Test.runtests(model, config)
MOI.Test.Config(; atol = 1e-7, exclude = Any[MOI.compute_conflict!,])
MOI.Test.runtests(
model,
config;
exclude = Any[
# removed because of the `ZerosBridge` issue:
# https://github.com/jump-dev/MathOptInterface.jl/issues/2861
# - zeros bridge does not support duals because it cumbersome
# - many bridges do not support get ConstraintFunction because it is cumbersome
# so there is no way out of this error for now.
# at the same time this is a modeling corner case tha could be avoided
# by the user.
"test_conic_linear_VectorOfVariables_2"],
)
return
end

Expand Down