hydrobricks
Loading...
Searching...
No Matches
ModelBuilder Class Reference

Public Member Functions

 ModelBuilder (SubBasin *subBasin, TimeMachine *timer, Logger *logger)
 
void AssignHydroUnitStructures (SettingsModel &modelSettings, SettingsBasin &basinSettings)
 
void BuildModelStructure (SettingsModel &modelSettings)
 
void UpdateSubBasinParameters (SettingsModel &modelSettings)
 
void UpdateHydroUnitsParameters (SettingsModel &modelSettings)
 
void ConnectLoggerToValues (SettingsModel &modelSettings)
 

Member Function Documentation

◆ AssignHydroUnitStructures()

void ModelBuilder::AssignHydroUnitStructures ( SettingsModel & modelSettings,
SettingsBasin & basinSettings )

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
modelSettingsthe model settings (defines the structure variants).
basinSettingsthe basin settings (per-unit land covers and fractions).

◆ BuildModelStructure()

void ModelBuilder::BuildModelStructure ( SettingsModel & modelSettings)

Build the full model structure. The sub-basin components are built from the primary structure (1), then each hydro unit builds the structure variant it was assigned by AssignHydroUnitStructures.

Parameters
modelSettingsthe model settings (defines the structure variants).

◆ ConnectLoggerToValues()

void ModelBuilder::ConnectLoggerToValues ( SettingsModel & modelSettings)

Connect the logger entries to the corresponding value pointers in the sub-basin and hydro unit components, so logged items are recorded during the simulation.

Parameters
modelSettingsthe 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
modelSettingsthe model settings holding the updated parameter values.

◆ UpdateSubBasinParameters()

void ModelBuilder::UpdateSubBasinParameters ( SettingsModel & modelSettings)

Update the parameters of the sub-basin bricks, their processes and the sub-basin splitters from the (primary) structure settings, without rebuilding the model.

Parameters
modelSettingsthe model settings holding the updated parameter values.

The documentation for this class was generated from the following files: