Rehaul model object
It would be more functional if the model object was not responsible for the full compilation of the model. Instead, the simulation class should do the full compilation - while the model class validates the model structure and parses the structure.
model object:
- parse the model
- validates the structure (
model_validation) - allows for editing the: statevalues, parametervalues etc.
simulation object:
- initialize the simulation object (including compiling the model information from the model class), preferably with a
init()function. Effectively, this means that the simulation class is built up from the activity and model object. -
simulate()calls for the simulation of the object (as before).
This would open up for more flexible development for the simulation object, as it will not be restricted by the pre-compiled model object that misses information of inputs that currently is provided the simulation object throught the activity object. It would be a more natural order of operation if the simulation object compiles the model as it has all information available from both the model and activity objects.
Edited by Henrik Podéus Derelöv