-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Description
Due to the various "compat" lines https://github.com/e2nIEE/PandaModels.jl/blob/develop/Project.toml#L17-L26, PandaModels is constrained to Ipopt<1 and PowerModels v0.19. It's not blocking my current project (https://github.com/gt-sse-center/PandaModelsBackend), but I played around with releasing the constraints and collecting the error, in case anyone recognizes it and is capable of judging a correct fix.
julia -e '
using Pkg
# the fork of PandaModels.jl just releases the compat constraints in Project.toml
Pkg.add([
Pkg.PackageSpec(;name="Ipopt"),
Pkg.PackageSpec(;name="PowerModels", version="0.21.3"),
Pkg.PackageSpec(;name="PyCall"),
Pkg.PackageSpec(;url="https://github.com/loriab/PandaModels.jl", rev="update_pm")
])'
julia -e "using Pkg; Pkg.status(); Pkg.status(outdated=true)"
Status `/CONDA_PREFIX/share/julia/environments/julia25/Project.toml`
[b6b21f68] Ipopt v1.7.3
[2dbab86a] PandaModels v0.7.3 `https://github.com/loriab/PandaModels.jl#update_pm`
[c36e90e8] PowerModels v0.21.3
[438e738f] PyCall v1.96.4
Status `/CONDA_PREFIX/share/julia/environments/julia25/Project.toml`
Test Summary: | Pass Error Total Time
PandaModels.jl | 65 3 68 1m24.8s
test internal functions | 12 12 0.8s
test exported executive functions | 11 3 14 1m16.8s
test for run_powermodels_pf: ac | 3 3 39.8s
test for run_powermodels_pf: ac_native | 4 4 3.2s
test for run_powermodels_opf: ac | 4 4 2.3s
test for powermodels_tnep: ac | 1 1 26.6s
test for powermodels_ots: dc | 1 1 2.4s
test for run_powermodels_multi_storage: ac | 1 1 2.5s
test for voltage deviation | 42 42 6.1s
ERROR: LoadError: Some tests did not pass: 65 passed, 0 failed, 3 errored, 0 broken.
test for run_powermodels_multi_storage: ac: Error During Test at /psi/toolchainconda/envs/julia25/share/julia/packages/PandaModels/eUU8D/test/call_powermodels.jl:78
Got exception outside of a @test
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.
Stacktrace:
[1] add_constraint(model::MathOptInterface.Utilities.MatrixOfConstraints{Float64, MathOptInterface.Utilities.MutableSparseMatrixCSC{Float64, Int32, MathOptInterface.Utilities.ZeroBasedIndexing}, MathOptInterface.Utilities.Hyperrectangle{Float64}, Cbc._LPProductOfSets{Float64}}, func::MathOptInterface.ScalarAffineFunction{Float64}, set::MathOptInterface.GreaterThan{Float64})
@ MathOptInterface.Utilities /psi/toolchainconda/envs/julia25/share/julia/packages/MathOptInterface/jGuEH/src/Utilities/matrix_of_constraints.jl:403
[2] add_constraint(model::Cbc._CbcConstraints{Float64, MathOptInterface.Utilities.MatrixOfConstraints{Float64, MathOptInterface.Utilities.MutableSparseMatrixCSC{Float64, Int32, MathOptInterface.Utilities.ZeroBasedIndexing}, MathOptInterface.Utilities.Hyperrectangle{Float64}, Cbc._LPProductOfSets{Float64}}, MathOptInterface.Utilities.VectorOfConstraints{MathOptInterface.VectorOfVariables, MathOptInterface.SOS1{Float64}}, MathOptInterface.Utilities.VectorOfConstraints{MathOptInterface.VectorOfVariables, MathOptInterface.SOS2{Float64}}}, func::MathOptInterface.ScalarAffineFunction{Float64}, set::MathOptInterface.GreaterThan{Float64})
@ MathOptInterface.Utilities /psi/toolchainconda/envs/julia25/share/julia/packages/MathOptInterface/jGuEH/src/Utilities/struct_of_constraints.jl:67
Metadata
Metadata
Assignees
Labels
No labels