Skip to content

Commit

Permalink
Fix observables for StockFlow
Browse files Browse the repository at this point in the history
  • Loading branch information
jClugstor committed Apr 9, 2024
1 parent 8b4507f commit 9c49ed6
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/model_parsers/StockFlow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,13 @@ function parse_askem_model(input::AbstractDict, ::Type{ASKEMStockFlow})
add_part!(d,:Auxiliary, aux_id = id, aux_name = name, aux_expr = expr, aux_value = value)
end

for obs in input[:semantics][:ode][:observables]
id = Symbol(obs[:id])
name = Symbol(obs[:name])
expr = MathML.parse_str(obs[:expression_mathml])
add_part!(d,:Observable,obs_id = id, obs_name = name, obs_expr = expr)
if haskey(input[:semantics][:ode],:observables)
for obs in input[:semantics][:ode][:observables]
id = Symbol(obs[:id])
name = Symbol(obs[:name])
expr = MathML.parse_str(obs[:expression_mathml])
add_part!(d,:Observable,obs_id = id, obs_name = name, obs_expr = expr)
end
end

for stock in input[:model][:stocks]
Expand Down

0 comments on commit 9c49ed6

Please sign in to comment.