-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
CREM's configuration model is one of 'convention over configuration'. A configuration file can be very small, if you're happy to accept default settings by not supplying a configuration item.
CREM configuration files are expressed in the TOML standard. If you're familiar with Windows INI files, TOML is a close cousin, with all the nasties of typical INI files removed.
Currently a full model scenario is defined with a single config file. Below is an example minimal configuration describing a scenario:
[scenario]
Name = "Minimal Valid Scenario"
[Annealer]
Type="Kirkpatrick"
[Model]
Type="CatchmentModel"
This scenario requires a mandatory name, the type of annealer to use in the scenario, and the type of underlying model to explore with the annealer specified. In our example, we specify the the default single-objective annealer called "Kirkpatrick" (discussed later), and an internal testing model, called "DumbModel".
Though this minimal configuration is "valid", it won't allow the explorer to do anything useful. This minimal configuration deliberately spins up an annealer that does no run-time work. The general approach of convention over configuration is that we don't specify configuration if we're willing to accept the default (conventional) value. There's essentially no "default" we can realistically set for configuring an annealer. The parameters to annealing need to be considered carefully.
Things can get a lot more complex. In fact, if it's something you would reasonably want to re-configure, the program's aim is that you'll be able to. To give you an idea of how richly configured a scenario can be, here's the default scenario that currently ships with the deployable version of the CREM explorer for the core "CatchmentModel":
[Scenario]
Name = "Default Scenario"
OutputPath = "output"
OutputType = "EXCEL" # "CSV" (default) | "JSON" | "EXCEL"
[Scenario.Reporting]
ReportEveryNumberOfIterations = 10_000
[Scenario.Reporting.LogLevelDestinations]
Annealer = "StandardOutput"
Debugging = "Discarded" # "Discarded" (Default) | "StandardOutput" | "StandardError"
#Debug = "StandardOutput"
#Model = "StandardOutput"
[Annealer]
Type = "Kirkpatrick"
[Annealer.Parameters]
DecisionVariable = "SedimentVsCost"
StartingTemperature = 10_000.0
CoolingFactor = 0.999
MaximumIterations = 1_000_000
[Model]
Type = "CatchmentModel"
[Model.Parameters]
#SedimentProductionDecisionWeight = 0.5 # 0.5 (default)
#ImplementationCostDecisionWeight = 0.5 # 0.5 (default)
DataSourcePath = "input/Laidley_data_v1_5.xlsx"
BankErosionFudgeFactor = 0.0005 # 5 * 10^(-4) (default) -- Min = 10^(-4), Max = 5*10^(-4)
WaterDensity = 1.0 # 1 t/m^3 (default)
LocalAcceleration = 9.81 # 9.81 m/s^2 (default)
GullyCompensationFactor = 0.5 # 0.5 (default)
SedimentDensity = 1.5 # (1.5 t/m^3 default)
SuspendedSedimentProportion = 0.5 # 0.5 (default)
YearsOfErosion = 100 # 100.0 (default)
RiparianRevegetationCostPerKilometer = 24000.0 # 24,000 (default)
RiparianBufferVegetationProportionTarget = 0.75 # 0.75 (default)
GullyRestorationCostPerKilometer = 44000.0 # 44,000 (default)
GullySedimentReductionTarget = 0.8 # 0.8 (default)
HillSlopeRestorationCostPerKilometerSquared = 200_000.0 # 200_000.0 (default)
HillSlopeBevegetationProportionTarget = 0.75 # 0.75 (default)
As the project progresses, documentation on configuration of scenarios will be expanded to better describe what the above configuration does. Yes, this is placeholder text!