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 saveProbability() noexcept;
59 static void setSaveProbability(bool value) noexcept;
64 [[nodiscard]] static MathSize minimumRos() noexcept;
65 static void setMinimumRos(MathSize value) noexcept;
70 [[nodiscard]] static MathSize maximumSpreadDistance() noexcept;
75 [[nodiscard]] static MathSize minimumFfmc() noexcept;
80 [[nodiscard]] static MathSize minimumFfmcAtNight() noexcept;
85 [[nodiscard]] static DurationSize offsetSunrise() noexcept;
90 [[nodiscard]] static DurationSize offsetSunset() noexcept;
95 [[nodiscard]] static int defaultPercentConifer() noexcept;
100 [[nodiscard]] static int defaultPercentDeadFir() noexcept;
105 [[nodiscard]] static ThresholdSize confidenceLevel() noexcept;
110 static void setConfidenceLevel(const ThresholdSize value) noexcept;
115 [[nodiscard]] static size_t maximumTimeSeconds() noexcept;
120 static void setMaximumTimeSeconds(const size_t value) noexcept;
125 [[nodiscard]] static size_t interimOutputIntervalSeconds() noexcept;
130 static void setInterimOutputIntervalSeconds(const size_t value) noexcept;
135 [[nodiscard]] static size_t maximumCountSimulations() noexcept;
140 [[nodiscard]] static ThresholdSize thresholdScenarioWeight() noexcept;
145 [[nodiscard]] static ThresholdSize thresholdDailyWeight() noexcept;
150 [[nodiscard]] static ThresholdSize thresholdHourlyWeight() noexcept;
155 [[nodiscard]] static vector<int> outputDateOffsets();
160 static void setOutputDateOffsets(const char* value);
165 [[nodiscard]] static int maxDateOffset() noexcept;
166 Settings() = delete;
167};
168}
169}
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:635
static MathSize maximumSpreadDistance() noexcept
Maximum distance that the fire is allowed to spread in one step (# of cells)
Definition Settings.cpp:603
static void setRoot(const char *dirname) noexcept
Set root directory and read settings from file.
Definition Settings.cpp:567
static DurationSize offsetSunset() noexcept
Offset from sunrise at which the day is considered to end (hours)
Definition Settings.cpp:619
static int defaultPercentDeadFir() noexcept
Default Percent Dead Fir to use for M3/M4 fuels where none is specified (%)
Definition Settings.cpp:627
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:675
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:655
static MathSize minimumFfmcAtNight() noexcept
Minimum Fine Fuel Moisture Code required for spread during the night.
Definition Settings.cpp:611
static int defaultPercentConifer() noexcept
Default Percent Conifer to use for M1/M2 fuels where none is specified (%)
Definition Settings.cpp:623
static ThresholdSize confidenceLevel() noexcept
Confidence required before simulation stops (% / 100)
Definition Settings.cpp:631
static int maxDateOffset() noexcept
Whatever the maximum value in the date offsets is.
Definition Settings.cpp:679
static vector< int > outputDateOffsets()
Days to output probability contours for (1 is start date, 2 is day after, etc.)
Definition Settings.cpp:671
static void setRasterRoot(const char *dirname) noexcept
Set raster root directory.
Definition Settings.cpp:571
static MathSize minimumRos() noexcept
Minimum rate of spread before fire is considered to be spreading (m/min)
Definition Settings.cpp:595
static ThresholdSize thresholdScenarioWeight() noexcept
Weight to give to Scenario part of thresholds.
Definition Settings.cpp:659
static void setFuelLookupTable(const char *filename) noexcept
Set fuel lookup table file.
Definition Settings.cpp:579
static const char * rasterRoot() noexcept
Root directory that raster inputs are stored in.
Definition Settings.cpp:575
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:643
static const fuel::FuelLookup & fuelLookup() noexcept
Fuel lookup table.
Definition Settings.cpp:583
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:639
static ThresholdSize thresholdDailyWeight() noexcept
Weight to give to daily part of thresholds.
Definition Settings.cpp:663
static ThresholdSize thresholdHourlyWeight() noexcept
Weight to give to hourly part of thresholds.
Definition Settings.cpp:667
static size_t interimOutputIntervalSeconds() noexcept
Time between generating interim outputs (s)
Definition Settings.cpp:647
static DurationSize offsetSunrise() noexcept
Offset from sunrise at which the day is considered to start (hours)
Definition Settings.cpp:615
static void setInterimOutputIntervalSeconds(const size_t value) noexcept
Set time between generating interim outputs (s)
Definition Settings.cpp:651
static MathSize minimumFfmc() noexcept
Minimum Fine Fuel Moisture Code required for spread during the day.
Definition Settings.cpp:607
static bool saveProbability() noexcept
Whether or not to save probability grids.
Definition Settings.cpp:587
static void setSaveProbability(bool value) noexcept
Set whether or not to save probability grids.
Definition Settings.cpp:591