Electa-Git / PowerModelsACDC.jl

A hybrid AC/DC OPF package based on PowerModels.jl
BSD 3-Clause "New" or "Revised" License
52 stars 20 forks source link

bump Jump #77

Closed hexaeder closed 2 years ago

hexaeder commented 2 years ago

PowerModels.jl is allready compatible with Jump @ 1.0. I guess a simple Bump might be enough here to?

EDIT: Alternatively you could also close that PR an reenable the CompatHelpera action again. Unfortunateley, after 60 days without activity in a repo those get deactivated...

ccoffrin commented 2 years ago

You might add support for Memento v1.4 while you are at it.

hexaeder commented 2 years ago

Well, since PowerModels.jl works with jump 0.22, 0.23 and 1, I was hoping the changes between those versions are non-breaking for PowerModelsACDC.jl as well. Turns out, they are. There are lots of errors related to some invalid change of the model after final_touch has been called.

  MathOptInterface.AddConstraintNotAllowed{MathOptInterface.ScalarAffineFunction{Float64}, MathOptInterface.GreaterThan{Float64}}: Adding `MathOptInterface.ScalarAffineFunction{Float64}`-in-`MathOptInterface.GreaterThan{Float64}` constraints cannot be performed: MatrixOfConstraints does not allow modifications to be made to the model once
  `MOI.Utilities.final_touch` has been called. This is called at the end of
  `MOI.copy_to` and in `MOI.Utilities.attach_optimizer` (which is called by
  `MOI.optimize!` in a `MOI.Utilities.CachingOptimizer`). In order to be able to
  apply modifications to this model, you should add a layer
  `MOI.Utilities.CachingOptimizer(MOI.Utilities.Model{Float64}(), model)`
  where `model` is the current model. This will automatically empty `model` when
  modifications are done after `MOI.Utilities.final_touch` is called and copy the
  model again in `MOI.Utilities.attach_optimizer`.
   You may want to use a `CachingOptimizer` in `AUTOMATIC` mode or you may need to call `reset_optimizer` before doing this operation if the `CachingOptimizer` is in `MANUAL` mode.

I have no idea how to fix those since I am not familiar with the inner workings of that package. Sorry!

For Momento, tests pass on current version 1.4. However I seems like PowerModelsACDC uses some undocumentent internal features of Memento since all non-breaking releases are pinned down explicitly in the Project.toml. Since logging is disabled for the tests, i am not sure if a running test suite is enough to ensure compatibility.