For example, in this pseudocode
Code: Select all
declare model fcast_model
* add some equations to fcast_model, compute a forecast, etc.
I'd like to reset the variable "fcast_model" to be an empty model, so I can reuse it (in my actual code, it's part of a complicated loop). Is there any way to do this, besides creating an additional variable, i.e.
Code: Select all
declare model fcast_model
* add some equations to fcast_model, compute a forecast, etc.
declare model empty_model
compute fcast_model = empty_model
* fcast_model is now empty and can be reused for another loop iteration
This is a more general question than just how to empty a model of its equations, although I looked for a function like %rlempty() that corresponded to the "model" data type.