Skip to content

feat(project): Add multi-models to project manifests. - #937

Open
jetuk wants to merge 1 commit into
pywr-project-sub-networksfrom
pywr-project-multi-models
Open

jetuk wants to merge 1 commit into
pywr-project-sub-networksfrom
pywr-project-multi-models

Conversation

@jetuk

@jetuk jetuk commented Nov 3, 2026

Copy link
Copy Markdown
Member

A multi-model composes several networks, linked by inter-network transfers, into a multi-network model. Its domain comes from a local model's base model and overrides, from a base model file, or is given inline. Each network starts from a network definition or from a model's network, may include further network set selections, and declares the transfers into it inline or in a transfers file.

Models and multi-models share one namespace, so compose returns either kind, and pywr-cli run-project runs both. Transfer sources are checked against the multi-model's networks when the manifest is resolved, and the transferred components are checked once the networks are loaded.

The example project now includes a neighbouring network that imports flow from the company network in a multi-model.

A multi-model composes several networks, linked by inter-network
transfers, into a multi-network model. Its domain comes from a local
model's base model and overrides, from a base model file, or is given
inline. Each network starts from a network definition or from a model's
network, may include further network set selections, and declares the
transfers into it inline or in a transfers file.

Models and multi-models share one namespace, so `compose` returns either
kind, and `pywr-cli run-project` runs both. Transfer sources are checked
against the multi-model's networks when the manifest is resolved, and
the transferred components are checked once the networks are loaded.

The example project now includes a neighbouring network that imports
flow from the company network in a multi-model.
@jetuk
jetuk requested a review from Batch21 November 3, 2026 22:06
@jetuk
jetuk added this pull request to stack #935 November 3, 2026 22:06

This branch has not been deployed

No deployments
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