scipopt / SCIP.jl

Julia interface to SCIP solver
MIT License
95 stars 24 forks source link

upgrade to MOI 10 #203

Closed matbesancon closed 3 years ago

matbesancon commented 3 years ago

Still some tests to fix, some probably been move around.

matbesancon commented 3 years ago

Some tests are a bit weird to fix (what is the solver supposed to do when a BadModel cannot be copied? there is no docstring) duplicate_VariableName feels like it should not be run when VariableName was excluded.

matbesancon commented 3 years ago

Still some strange things with indicator constraints:

#     test_constraint_Indicator_ACTIVATE_ON_ZERO: Error During Test at /home/mbesancon/.julia/packages/MathOptInterface/Evu1m/src/Test/test_constraint.jl:868
#   Test threw exception
#   Expression: MOI.get(model, MOI.ConstraintSet(), c) == s
#   ArgumentError: Bridge of type `MathOptInterface.Bridges.Constraint.IndicatorActiveOnFalseBridge{Float64, MathOptInterface.VectorAffineFunction{Float64}, MathOptInterface.GreaterThan{Float64}}` does not support accessing the attribute `MathOptInterface.ConstraintSet()`. If you encountered this error unexpectedly, it probably means your model has been reformulated using the bridge, and you are attempting to query an attribute that we haven't implemented yet for this bridge. Please open an issue at https://github.com/jump-dev/MathOptInterface.jl/issues/new and provide a reproducible example explaining what you were trying to do.

to check later

matbesancon commented 3 years ago

OK we are getting close to a mergeable state, I removed the bound tests for now

matbesancon commented 3 years ago

@odow in the two commits starting with "remove bound" above, I am not sure if this was the intended behavior or not.

matbesancon commented 3 years ago

I'd like to see if there are some containers we can simplify, if feels like we have a ton of dictionaries storing various constraint and variable indices, never sure which one should be checked

rschwarz commented 3 years ago

I'd like to see if there are some containers we can simplify, if feels like we have a ton of dictionaries storing various constraint and variable indices, never sure which one should be checked

Not sure what you mean. In SCIPData, there's only one Dict each for variables and constraints.

In the Optimizer struct, there are more dictionaries, but these store different values (e.g. bounds, starting point).

matbesancon commented 3 years ago

yes the confusion was more in some parts on what dict is supposed to be used for checking that something exists