◆ ModelBuilder()
| ModelBuilder::ModelBuilder |
( |
Subbasin * | subbasin, |
|
|
TimeMachine * | timer, |
|
|
Logger * | logger, |
|
|
int | subbasinIndex = 0, |
|
|
int | unitOffset = 0 ) |
- Parameters
-
| subbasin | The subbasin to build. |
| timer | The model timer. |
| logger | The model logger. |
| subbasinIndex | The index of the subbasin in the logger (processing order). |
| unitOffset | The index of the subbasin's first hydro unit in the logger. |
◆ AssignHydroUnitStructures()
Assign each hydro unit the structure variant whose land-cover set matches the unit's present land covers (fraction > 0). No-op when a single structure is defined. Must run before BuildModelStructure so units build their variant.
- Parameters
-
| modelSettings | the model settings (defines the structure variants). |
| basinSettings | the basin settings (per-unit land covers and fractions). |
◆ AssignSubbasinStructure()
Assign the subbasin the structure variant matching the land covers present in its hydro units (the union over the units), with the same rule as the units. The subbasin-level components (e.g. shared glacier reservoirs) are then built from that variant only.
- Parameters
-
| modelSettings | The model settings. |
| basinSettings | The basin settings. |
◆ BuildModelStructure()
| void ModelBuilder::BuildModelStructure |
( |
SettingsModel & | modelSettings | ) |
|
Build the full model structure. The subbasin components are built from the primary structure (1), then each hydro unit builds the structure variant it was assigned by AssignHydroUnitStructures.
- Parameters
-
| modelSettings | the model settings (defines the structure variants). |
◆ ConnectLoggerToValues()
| void ModelBuilder::ConnectLoggerToValues |
( |
SettingsModel & | modelSettings | ) |
|
Connect the logger entries to the corresponding value pointers in the subbasin and hydro unit components, so logged items are recorded during the simulation.
- Parameters
-
| modelSettings | the model settings (defines the items to log). |
◆ UpdateHydroUnitsParameters()
| void ModelBuilder::UpdateHydroUnitsParameters |
( |
SettingsModel & | modelSettings | ) |
|
Update the parameters of every hydro unit's bricks, processes and splitters without rebuilding the model. Each unit's assigned structure variant is selected so the updated values match the components that unit was built with.
- Parameters
-
| modelSettings | the model settings holding the updated parameter values. |
◆ UpdateSubbasinParameters()
| void ModelBuilder::UpdateSubbasinParameters |
( |
SettingsModel & | modelSettings | ) |
|
Update the parameters of the subbasin bricks, their processes and the subbasin splitters from the (primary) structure settings, without rebuilding the model.
- Parameters
-
| modelSettings | the model settings holding the updated parameter values. |
The documentation for this class was generated from the following files:
- /github/workspace/core/src/base/ModelBuilder.h
- /github/workspace/core/src/base/ModelBuilder.cpp