Skip to content
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

Bridges throw wrong errors during modification #1603

Closed
odow opened this issue Sep 14, 2021 · 0 comments · Fixed by #1608
Closed

Bridges throw wrong errors during modification #1603

odow opened this issue Sep 14, 2021 · 0 comments · Fixed by #1608
Labels
Submodule: Bridges About the Bridges submodule Type: Bug

Comments

@odow
Copy link
Member

odow commented Sep 14, 2021

Found during jump-dev/SCS.jl#219

optimizer = SCS.Optimizer()
MOI.set(optimizer, MOI.Silent(), true)
model = MOI.Bridges.full_bridge_optimizer(
    MOI.Utilities.CachingOptimizer(
        MOI.Utilities.UniversalFallback(MOI.Utilities.Model{Float64}()),
        optimizer,
    ),
    Float64,
)
julia> MOI.Test.test_modification_set_function_single_variable(model, MOI.Test.Config())
Test Failed at /Users/oscar/.julia/dev/MathOptInterface/src/Test/test_modification.jl:29
  Expression: MOI.set(model, MOI.ConstraintFunction(), c, y)
    Expected: MathOptInterface.SettingVariableIndexNotAllowed()
      Thrown: MathOptInterface.SetAttributeNotAllowed{MathOptInterface.ConstraintFunction}(MathOptInterface.ConstraintFunction(), "")
ERROR: There was an error during testing
optimizer = SCS.Optimizer()
MOI.set(optimizer, MOI.Silent(), true)
model = MOI.Bridges.full_bridge_optimizer(
    MOI.Utilities.CachingOptimizer(
        MOI.Utilities.UniversalFallback(MOI.Utilities.Model{Float64}()),
        optimizer,
    ),
    Float64,
)
julia> MOI.Test.test_objective_incorrect_modifications(model, MOI.Test.Config())
Test Failed at /Users/oscar/.julia/dev/MathOptInterface/src/Test/test_objective.jl:539
  Expression: MOI.set(model, MOI.ConstraintSet(), c, MOI.LessThan(1.0))
    Expected: ArgumentError
  No exception thrown
ERROR: There was an error during testing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Submodule: Bridges About the Bridges submodule Type: Bug
Development

Successfully merging a pull request may close this issue.

1 participant