Simulation Orchestration Class Diagram#
Scope#
This diagram documents the static orchestration layer that connects the
public Project facade to simulation planning and solver execution.
It focuses on:
Projectas the top-level orchestrator that the CLI (hmp run) and Python users instantiate,SimulationPlannerand the immutableSimulationPlan/ProcessRunobjects it builds,SimulationRunneras the runtime dispatcher,the project-owned runtime state exchanged between orchestration phases,
process runtimes (
Flow,Transport) and the solver adapters they feed.
Code map#
hydromodpy/project/facade.py: the publicProjectfacade. Holds the mutable runtime state and wires the pipeline phases.hydromodpy/cli/commands/run.pyandhydromodpy/cli/workflows.py: thehmp run <toml>entry point. Loads the TOML, builds aHydroModPyConfig, and delegates toProject.hydromodpy/simulation/planning/planner.pyandplan.py: planner boundary and immutable planning result.hydromodpy/simulation/execution/runner.py: runtime dispatcher overProcessRunentries.hydromodpy/physics/andhydromodpy/solver/: downstream runtime objects and concrete backends.
Recommended reading path#
hydromodpy/cli/commands/run.pyhydromodpy/project/facade.pyhydromodpy/simulation/planning/planner.pyhydromodpy/simulation/planning/plan.pyhydromodpy/simulation/execution/runner.pyhydromodpy/physics/process/flow/flow.pyortransport/transport.py
Diagram source#
Notes#
SimulationPlanis intentionally immutable. The planner produces it once, then the runner consumes it without rewriting scheduling decisions.The mutable execution state stays owned by
Project, which gradually accumulates runtime objects and produced models across phases (setup_workspace,build_geographic,load_data,build_mesh,prepare,execute,ingest,render).SimulationRunnerdoes not decide the schedule. It only dispatches the already-resolvedProcessRunentries to the right solver adapter.Solver adapters are selected from
ProcessRun.solver, which keeps solver choice explicit and traceable in the plan itself.