-
Notifications
You must be signed in to change notification settings - Fork 35
Closed
Labels
Milestone
Description
When I do this:
julia> m = MimiFUND.get_model()
Mimi.Model
Module: Mimi
Components:
ComponentId(MimiFUND.scenariouncertainty)
ComponentId(MimiFUND.population)
ComponentId(MimiFUND.geography)
ComponentId(MimiFUND.socioeconomic)
ComponentId(MimiFUND.emissions)
ComponentId(MimiFUND.climateco2cycle)
ComponentId(MimiFUND.climatech4cycle)
ComponentId(MimiFUND.climaten2ocycle)
ComponentId(MimiFUND.climatesf6cycle)
ComponentId(MimiFUND.climateforcing)
ComponentId(MimiFUND.climatedynamics)
ComponentId(MimiFUND.biodiversity)
ComponentId(MimiFUND.climateregional)
ComponentId(MimiFUND.ocean)
ComponentId(MimiFUND.impactagriculture)
ComponentId(MimiFUND.impactbiodiversity)
ComponentId(MimiFUND.impactcardiovascularrespiratory)
ComponentId(MimiFUND.impactcooling)
ComponentId(MimiFUND.impactdiarrhoea)
ComponentId(MimiFUND.impactextratropicalstorms)
ComponentId(MimiFUND.impactforests)
ComponentId(MimiFUND.impactheating)
ComponentId(MimiFUND.impactvectorbornediseases)
ComponentId(MimiFUND.impacttropicalstorms)
ComponentId(MimiFUND.vslvmorb)
ComponentId(MimiFUND.impactdeathmorbidity)
ComponentId(MimiFUND.impactwaterresources)
ComponentId(MimiFUND.impactsealevelrise)
ComponentId(MimiFUND.impactaggregation)
Built: false
julia> m = MimiFUND.get_model()^C
julia> m.md.dirty
true
julia> run(m)
julia> m.md.dirty
false
julia> update_param!(m, :co2pre, 270)
true
julia> m.md.dirty
true
What this means is that code like this:
for i=1:10
update_param!(m, :foo, rand())
run(m)
end
will rebuild the model instance in every loop.
That is not how it should be, right? We want to be able to update external parameter values and rerun without rebuilding, it seems to me?
Or do we need to manually construct a model instance in that case and then update the parameter values only in the model instance?