Unverified Commit 8eee6510 authored by Miroslav Kratochvil's avatar Miroslav Kratochvil Committed by GitHub
Browse files

Merge pull request #409 from LCSB-BioCore/mk-doc-optimize-objective

document `optimize_objective`
parents 10eae1d9 c6bab97a
Pipeline #44943 failed with stages
in 2 minutes and 6 seconds
...@@ -58,6 +58,12 @@ function is_solved(optmodel) ...@@ -58,6 +58,12 @@ function is_solved(optmodel)
termination_status(optmodel) in [MOI.OPTIMAL, MOI.LOCALLY_SOLVED] ? true : false termination_status(optmodel) in [MOI.OPTIMAL, MOI.LOCALLY_SOLVED] ? true : false
end end
"""
optimize_objective(optmodel)::Union{Float64,Nothing}
Shortcut for running JuMP `optimize!` on a model and returning the objective
value, if solved.
"""
function optimize_objective(optmodel)::Union{Float64,Nothing} function optimize_objective(optmodel)::Union{Float64,Nothing}
optimize!(optmodel) optimize!(optmodel)
if is_solved(optmodel) if is_solved(optmodel)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment