Skip to content

ModelList -> better manage models that takes values from the previous time-step #85

@VEZY

Description

@VEZY

I've noticed a difference in behavior between the ModelList with multiple timesteps and the multiscale simulation. In the multiscale simulation, the status is incrementally modified, so at each timestep, we have access to the results of the previous timesteps. However, in the ModelList with multiple timesteps, I believe the status of each timestep is independent, and we can't access the previous values just by looking at the variable.

This is quite bad because the models we develop for one can't be used for the other one, which defeats the whole purpose of PlantSimEngine. At least this is the case for the models that use values from the previous timestep (e.g. incrementing the biomass).

We should make a uniform approach for that, and I think the one from the multiscale simulation is probably the way to go, at least when we identity that there is one model that is not parallelizable over timesteps in the dependency graph. In this case, instead of creating a status for each time-step, we would create one status that is used repeatedly for each timestep, and at the end of each timestep, we would copy the result into a table, at the row corresponding to the timestep.

Of course in case we have a dependency graph that is fully parallelizable over time-steps, we may continue using the current computation because creating a status per time-step allows for parallelizing the computations over each time-step.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions