Sitelet https://github.com/VirtualPlantLab/PlantSimEngine.jl/pull/177
Skip to content

Unified interface for model mapping - #177

Merged
VEZY merged 5 commits into
multiple-timesteps-take-3from
Unified-interface-for-model-mapping
Feb 15, 2026
Merged

VEZY merged 5 commits into
multiple-timesteps-take-3from
Unified-interface-for-model-mapping

Conversation

@VEZY

@VEZY VEZY commented Feb 13, 2026 •

Copy link
Copy Markdown
Member

Implementing #120

Deprecating ModelList in favor of ModelMapping.
Deprecating the use of a Dict for model mapping in favor of ModelMapping.

ModelMapping is now the unique interface users face for declaring models.
At the time the single-scale pathway creates a ModelList, so we re-use all previous code. The multiscale pathway re-uses the previous Dict one.

This PR is not about reducing the pathways to one, but future work should do that, i.e. one way for computing the dependency graph, making all checks, etc, whatever the scale (single- or multi-). The only major difference I think is that ModelList can pre-allocate its outputs because their length is fixed. This would require some rework in the multirate setup, though (see below).

For now multirate is not handled in ModelList, but we should make a multiscale setup from the ModelList in this case (as a shortcut) before implementing something more clever that may pre-allocate outputs.

To do:

  • Make the tests pass (use ModelMapping for user-facing code (e.g. doc and tests), and ModelMapping{SingleScale} when possible in the source code, or ModelList otherwise.
  • Check that multirate is well handled in ModelMapping{SingleScale}: should either pre-allocate properly (involving) or at least fall back to the multiscale approach. In the latter case, handle the case where we don't provide the MTG (no MTG in single-scale setup)

@VEZY
VEZY changed the base branch from main to multiple-timesteps-take-3 February 13, 2026 15:14
@VEZY
VEZY merged commit 75a96e2 into multiple-timesteps-take-3 Feb 15, 2026
8 of 10 checks passed
@VEZY
VEZY deleted the Unified-interface-for-model-mapping branch February 15, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant