Commit f445a6d3 authored by Miroslav Kratochvil's avatar Miroslav Kratochvil
Browse files

add a shortcut for extracting sMOMENT mass utilization

parent 7244ee67
Pipeline #55084 failed with stages
in 10 minutes and 26 seconds
......@@ -39,4 +39,20 @@ A pipe-able variant of [`mass_group_dict`](@ref).
protein_mass_group_dict(model::GeckoModel) = x -> mass_group_dict(model, x)
#TODO: total protein mass for sMOMENT
Extract the total mass utilization in a solved [`SMomentModel`](@ref).
protein_mass(model::SMomentModel, opt_model) =
is_solved(opt_model) ?
sum((col.capacity_required for col in model.columns) .* value.(opt_model[:x])) : nothing
A pipe-able variant of [`protein_mass`](@ref).
protein_mass(model::SMomentModel) = x -> protein_mass(model, x)
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