Skip to content
Snippets Groups Projects
Unverified Commit 8eee6510 authored by Miroslav Kratochvil's avatar Miroslav Kratochvil :bicyclist: Committed by GitHub
Browse files

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

document `optimize_objective`
parents 10eae1d9 c6bab97a
No related branches found
No related tags found
No related merge requests found
......@@ -58,6 +58,12 @@ function is_solved(optmodel)
termination_status(optmodel) in [MOI.OPTIMAL, MOI.LOCALLY_SOLVED] ? true : false
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}
optimize!(optmodel)
if is_solved(optmodel)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment