FireSTARR
Loading...
Searching...
No Matches
Settings.h
1/* Copyright (c) Queen's Printer for Ontario, 2020. */
2/* Copyright (c) His Majesty the King in Right of Canada as represented by the Minister of Natural Resources, 2021-2025. */
3
4/* SPDX-License-Identifier: AGPL-3.0-or-later */
5
6#pragma once
7#include <vector>
8#include "FuelLookup.h"
9
10namespace fs
11{
12namespace sim
13{
17static const MathSize COMPARE_LIMIT = 1.0E-20f;
22{
23public:
28 static void setRoot(const char* dirname) noexcept;
33 static void setRasterRoot(const char* dirname) noexcept;
38 [[nodiscard]] static const char* rasterRoot() noexcept;
43 static void setFuelLookupTable(const char* filename) noexcept;
48 [[nodiscard]] static const fuel::FuelLookup& fuelLookup() noexcept;
53 [[nodiscard]] static bool saveIndividual() noexcept;
59 static void setSaveIndividual(bool value) noexcept;
64 [[nodiscard]] static bool runAsync() noexcept;
70 static void setRunAsync(bool value) noexcept;
75 [[nodiscard]] static bool deterministic() noexcept;
81 static void setDeterministic(bool value) noexcept;
86 [[nodiscard]] static bool surface() noexcept;
92 static void setSurface(bool value) noexcept;
97 [[nodiscard]] static bool saveAsAscii() noexcept;
103 static void setSaveAsAscii(bool value) noexcept;
108 [[nodiscard]] static bool savePoints() noexcept;
114 static void setSavePoints(bool value) noexcept;
119 [[nodiscard]] static bool saveIntensity() noexcept;
125 static void setSaveIntensity(bool value) noexcept;
130 [[nodiscard]] static bool saveProbability() noexcept;
136 static void setSaveProbability(bool value) noexcept;
141 [[nodiscard]] static bool saveOccurrence() noexcept;
147 static void setSaveOccurrence(bool value) noexcept;
152 [[nodiscard]] static bool saveSimulationArea() noexcept;
158 static void setSaveSimulationArea(bool value) noexcept;
163 [[nodiscard]] static bool forceGreenup() noexcept;
168 static void setForceGreenup(bool value) noexcept;
173 [[nodiscard]] static bool forceNoGreenup() noexcept;
178 static void setForceNoGreenup(bool value) noexcept;
183 [[nodiscard]] static bool forceStaticCuring() noexcept;
188 [[nodiscard]] static int staticCuring() noexcept;
193 static void setStaticCuring(const int value) noexcept;
198 [[nodiscard]] static MathSize minimumRos() noexcept;
199 static void setMinimumRos(MathSize value) noexcept;
204 [[nodiscard]] static MathSize maximumSpreadDistance() noexcept;
209 [[nodiscard]] static MathSize minimumFfmc() noexcept;
214 [[nodiscard]] static MathSize minimumFfmcAtNight() noexcept;
219 [[nodiscard]] static DurationSize offsetSunrise() noexcept;
224 [[nodiscard]] static DurationSize offsetSunset() noexcept;
229 [[nodiscard]] static int defaultPercentConifer() noexcept;
234 [[nodiscard]] static int defaultPercentDeadFir() noexcept;
239 [[nodiscard]] static int intensityMaxLow() noexcept;
244 [[nodiscard]] static int intensityMaxModerate() noexcept;
249 [[nodiscard]] static ThresholdSize confidenceLevel() noexcept;
254 static void setConfidenceLevel(const ThresholdSize value) noexcept;
259 [[nodiscard]] static size_t maximumTimeSeconds() noexcept;
264 static void setMaximumTimeSeconds(const size_t value) noexcept;
269 [[nodiscard]] static size_t maximumCountSimulations() noexcept;
274 [[nodiscard]] static ThresholdSize thresholdScenarioWeight() noexcept;
279 [[nodiscard]] static ThresholdSize thresholdDailyWeight() noexcept;
284 [[nodiscard]] static ThresholdSize thresholdHourlyWeight() noexcept;
289 [[nodiscard]] static vector<int> outputDateOffsets();
294 static void setOutputDateOffsets(const char* value);
299 [[nodiscard]] static int maxDateOffset() noexcept;
300 Settings() = delete;
301};
302}
303}
Provides ability to look up a fuel type based on name or code.
Definition FuelLookup.h:23
Reads and provides access to settings for the simulation.
Definition Settings.h:22
static void setConfidenceLevel(const ThresholdSize value) noexcept
Set confidence required before simulation stops (% / 100)
Definition Settings.cpp:756
static MathSize maximumSpreadDistance() noexcept
Maximum distance that the fire is allowed to spread in one step (# of cells)
Definition Settings.cpp:716
static void setRoot(const char *dirname) noexcept
Set root directory and read settings from file.
Definition Settings.cpp:580
static DurationSize offsetSunset() noexcept
Offset from sunrise at which the day is considered to end (hours)
Definition Settings.cpp:732
static int defaultPercentDeadFir() noexcept
Default Percent Dead Fir to use for M3/M4 fuels where none is specified (%)
Definition Settings.cpp:740
static void setOutputDateOffsets(const char *value)
Set days to output probability contours for (1 is start date, 2 is day after, etc....
Definition Settings.cpp:788
static bool forceStaticCuring() noexcept
Whether or not to force static grass curing value for all fires.
Definition Settings.cpp:696
static size_t maximumCountSimulations() noexcept
Maximum number of simulations that can run before it is ended and whatever results it has are used.
Definition Settings.cpp:768
static MathSize minimumFfmcAtNight() noexcept
Minimum Fine Fuel Moisture Code required for spread during the night.
Definition Settings.cpp:724
static void setSaveIntensity(bool value) noexcept
Set whether or not to save intensity grids.
Definition Settings.cpp:652
static int defaultPercentConifer() noexcept
Default Percent Conifer to use for M1/M2 fuels where none is specified (%)
Definition Settings.cpp:736
static ThresholdSize confidenceLevel() noexcept
Confidence required before simulation stops (% / 100)
Definition Settings.cpp:752
static int maxDateOffset() noexcept
Whatever the maximum value in the date offsets is.
Definition Settings.cpp:792
static bool savePoints() noexcept
Whether or not to save points used for spread.
Definition Settings.cpp:640
static bool forceNoGreenup() noexcept
Whether or not to force no greenup for all fires.
Definition Settings.cpp:688
static vector< int > outputDateOffsets()
Days to output probability contours for (1 is start date, 2 is day after, etc.)
Definition Settings.cpp:784
static bool forceGreenup() noexcept
Whether or not to force greenup for all fires.
Definition Settings.cpp:680
static void setDeterministic(bool value) noexcept
Set whether or not to run deterministically (100% chance of spread & survival)
Definition Settings.cpp:628
static void setSurface(bool value) noexcept
Set whether or not to run all Cell(s) that can burn in entire Environment.
Definition Settings.cpp:624
static void setRasterRoot(const char *dirname) noexcept
Set raster root directory.
Definition Settings.cpp:584
static MathSize minimumRos() noexcept
Minimum rate of spread before fire is considered to be spreading (m/min)
Definition Settings.cpp:708
static bool saveIntensity() noexcept
Whether or not to save intensity grids.
Definition Settings.cpp:648
static ThresholdSize thresholdScenarioWeight() noexcept
Weight to give to Scenario part of thresholds.
Definition Settings.cpp:772
static bool runAsync() noexcept
Whether or not to run things asynchronously where possible.
Definition Settings.cpp:608
static void setFuelLookupTable(const char *filename) noexcept
Set fuel lookup table file.
Definition Settings.cpp:592
static int staticCuring() noexcept
Static curing value.
Definition Settings.cpp:700
static const char * rasterRoot() noexcept
Root directory that raster inputs are stored in.
Definition Settings.cpp:588
static void setSaveSimulationArea(bool value) noexcept
Set whether or not to save simulation area grids.
Definition Settings.cpp:676
static void setSaveOccurrence(bool value) noexcept
Set whether or not to save occurrence grids.
Definition Settings.cpp:668
static void setSaveIndividual(bool value) noexcept
Set whether or not to save individual grids.
Definition Settings.cpp:604
static void setForceNoGreenup(bool value) noexcept
Whether or not to force no greenup for all fires.
Definition Settings.cpp:692
static void setMaximumTimeSeconds(const size_t value) noexcept
Set maximum time simulation can run before it is ended and whatever results it has are used (s)
Definition Settings.cpp:764
static const fuel::FuelLookup & fuelLookup() noexcept
Fuel lookup table.
Definition Settings.cpp:596
static size_t maximumTimeSeconds() noexcept
Maximum time simulation can run before it is ended and whatever results it has are used (s)
Definition Settings.cpp:760
static void setSaveAsAscii(bool value) noexcept
Set whether or not to save grids as .asc.
Definition Settings.cpp:636
static void setSavePoints(bool value) noexcept
Set whether or not to save points used for spread.
Definition Settings.cpp:644
static ThresholdSize thresholdDailyWeight() noexcept
Weight to give to daily part of thresholds.
Definition Settings.cpp:776
static bool deterministic() noexcept
Whether or not to run deterministically (100% chance of spread & survival)
Definition Settings.cpp:616
static bool saveOccurrence() noexcept
Whether or not to save occurrence grids.
Definition Settings.cpp:664
static ThresholdSize thresholdHourlyWeight() noexcept
Weight to give to hourly part of thresholds.
Definition Settings.cpp:780
static int intensityMaxLow() noexcept
The maximum fire intensity for the 'low' range of intensity (kW/m)
Definition Settings.cpp:744
static void setForceGreenup(bool value) noexcept
Whether or not to force greenup for all fires.
Definition Settings.cpp:684
static void setRunAsync(bool value) noexcept
Set whether or not to run things asynchronously where possible.
Definition Settings.cpp:612
static DurationSize offsetSunrise() noexcept
Offset from sunrise at which the day is considered to start (hours)
Definition Settings.cpp:728
static void setStaticCuring(const int value) noexcept
Set static curing value.
Definition Settings.cpp:704
static bool saveIndividual() noexcept
Whether or not to save individual grids.
Definition Settings.cpp:600
static MathSize minimumFfmc() noexcept
Minimum Fine Fuel Moisture Code required for spread during the day.
Definition Settings.cpp:720
static bool saveProbability() noexcept
Whether or not to save probability grids.
Definition Settings.cpp:656
static int intensityMaxModerate() noexcept
The maximum fire intensity for the 'moderate' range of intensity (kW/m)
Definition Settings.cpp:748
static bool saveSimulationArea() noexcept
Whether or not to save simulation area grids.
Definition Settings.cpp:672
static bool surface() noexcept
Whether or not to run all Cell(s) that can burn in entire Environment.
Definition Settings.cpp:620
static bool saveAsAscii() noexcept
Whether or not to save grids as .asc.
Definition Settings.cpp:632
static void setSaveProbability(bool value) noexcept
Set whether or not to save probability grids.
Definition Settings.cpp:660