Mimi Framework

Set `emission` parameter in FUND

Hi there,

When I try to use set_param! on the emission parameter in FUND, it gives me the following error

ERROR: Cannot set parameter :emission; not found in ModelDef or children

Just wondering why this is the case? When I call m[:emissions, :emission] it does seem to return the variable, and I can see it in the :emissions component of the code, so I’m not sure why it’s not letting me set the parameter. Thanks!

(The code I’m running is set_param!(m, :emission, input_emissions))

Hi Tammy,

I think it looks like :emission is a Variable in FUND, not a Parameter, right? In that case you can’t call set_param! on it. Happy to help further if that’s still confusing though or if it makes what you need to do to get your results difficult.

You can also feel free to start using the new parameter syntax, basically just always using update_param! as described here … so in this case if emission was a shared parameter, like most FUND parameters are at the moment, you do update_param!(m, :emission, input_emissions) or if it was unshared update_param!(m, :emissions, :emission, input_emissions) assuming you’ve pulled in the latest versions of FUND and Mimi.

No pressure on that though … all of the old syntax still works and no one has gotten around to actually updating the FUND code to use the new syntax ie. decide which parameters should actually be “shared” versus "unshared. You have plenty to do so you don’t have to spend time thinking on this until you have a break, just wanted to let you know! I’lll polish up that part of FUND sometime soon.


Ohhh, right, sorry – my bad! Yes, that makes sense. Thanks so much! :slight_smile:

1 Like