Getting the objective value of a specific solution. #20
Unanswered
thomasgudjonwright
asked this question in
Help & FAQ
Replies: 1 comment 1 reply
-
Hi @thomasgudjonwright, after you have built the model with using Cbc
using JuMP
using UnitCommitment
instance = UnitCommitment.read_benchmark("matpower/case118/2017-02-01")
model = UnitCommitment.build_model(
instance=instance,
optimizer=Cbc.Optimizer,
)
UnitCommitment.optimize!(model)
@show JuMP.objective_value(model) If you are trying to query the value of each decision variable instead, that's described in our documentation. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I apologize if I am missing something obvious, but I am wondering how one would access the objective value of a given solution. I see that you have a
validate
method which verifies the candidate solution is feasible. I first thought I could do this viaJuMP.value
, however variable names seem to all benoname
inmodel[:obj]
so I am unable to create a function from the key to values in the solution Dict. Any thoughts or easy solutions I am missing?Thanks in advance!
Tom
Beta Was this translation helpful? Give feedback.
All reactions