FireSTARR
Loading...
Searching...
No Matches
fs::sim::SettingsImplementation Class Reference

Settings implementation class. More...

Collaboration diagram for fs::sim::SettingsImplementation:

Public Member Functions

 SettingsImplementation (const SettingsImplementation &rhs)=delete
 
 SettingsImplementation (SettingsImplementation &&rhs)=delete
 
SettingsImplementationoperator= (const SettingsImplementation &rhs)=delete
 
SettingsImplementationoperator= (SettingsImplementation &&rhs)=delete
 
void setRoot (const char *dirname) noexcept
 Set root directory and read settings from file.
 
const char * rasterRoot () const noexcept
 Root directory that raster inputs are stored in.
 
const fuel::FuelLookupfuelLookup () noexcept
 Fuel lookup table.
 
MathSize minimumRos () const noexcept
 Minimum rate of spread before fire is considered to be spreading (m/min)
 
void setMinimumRos (const MathSize value) noexcept
 
constexpr MathSize maximumSpreadDistance () const noexcept
 Maximum distance that the fire is allowed to spread in one step (# of cells)
 
constexpr MathSize minimumFfmc () const noexcept
 Minimum Fine Fuel Moisture Code required for spread during the day.
 
constexpr MathSize minimumFfmcAtNight () const noexcept
 Minimum Fine Fuel Moisture Code required for spread during the night.
 
constexpr DurationSize offsetSunrise () const noexcept
 Offset from sunrise at which the day is considered to start (hours)
 
constexpr DurationSize offsetSunset () const noexcept
 Offset from sunrise at which the day is considered to end (hours)
 
constexpr int defaultPercentConifer () const noexcept
 Default Percent Conifer to use for M1/M2 fuels where none is specified (%)
 
constexpr int defaultPercentDeadFir () const noexcept
 Default Percent Dead Fir to use for M3/M4 fuels where none is specified (%)
 
constexpr int intensityMaxLow () const noexcept
 The maximum fire intensity for the 'low' range of intensity (kW/m)
 
constexpr int intensityMaxModerate () const noexcept
 The maximum fire intensity for the 'moderate' range of intensity (kW/m)
 
ThresholdSize confidenceLevel () const noexcept
 Confidence required before simulation stops (% / 100)
 
void setConfidenceLevel (const ThresholdSize value) noexcept
 Set confidence required before simulation stops (% / 100)
 
void setRasterRoot (const char *dirname) noexcept
 
void setFuelLookupTable (const char *filename) noexcept
 
int staticCuring () const noexcept
 Static curing value.
 
void setStaticCuring (const int value) noexcept
 Set static curing value.
 
size_t maximumTimeSeconds () const noexcept
 Maximum time simulation can run before it is ended and whatever results it has are used (s)
 
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)
 
constexpr size_t maximumCountSimulations () const noexcept
 Maximum number of simulations that can run before it is ended and whatever results it has are used.
 
constexpr ThresholdSize thresholdScenarioWeight () const noexcept
 Weight to give to Scenario part of thresholds.
 
constexpr ThresholdSize thresholdDailyWeight () const noexcept
 Weight to give to daily part of thresholds.
 
constexpr ThresholdSize thresholdHourlyWeight () const noexcept
 Weight to give to hourly part of thresholds.
 
vector< int > outputDateOffsets () const
 Days to output probability contours for (1 is start date, 2 is day after, etc.)
 
void setOutputDateOffsets (const char *value)
 Set days to output probability contours for (1 is start date, 2 is day after, etc.)
 
constexpr int maxDateOffset () const noexcept
 Whatever the maximum value in the date offsets is.
 

Static Public Member Functions

static SettingsImplementationinstance () noexcept
 The singleton instance for this class.
 
static SettingsImplementationinstance (bool check_loaded) noexcept
 The singleton instance for this class.
 

Public Attributes

atomic< bool > save_individual = false
 Whether or not to save individual grids.
 
atomic< bool > run_async = true
 Whether or not to run things asynchronously where possible.
 
atomic< bool > deterministic = false
 Whether or not to run deterministically (100% chance of spread & survival)
 
atomic< bool > surface = false
 Whether or not to create a probability surface.
 
atomic< bool > save_as_ascii = false
 Whether or not to save grids as .asc.
 
atomic< bool > save_points = false
 Whether or not to save points used for spread.
 
atomic< bool > save_intensity = true
 Whether or not to save intensity grids.
 
atomic< bool > save_probability = true
 Whether or not to save probability grids.
 
atomic< bool > save_occurrence = false
 Whether or not to save occurrence grids.
 
atomic< bool > save_simulation_area = false
 Whether or not to save simulation area grids.
 
atomic< bool > force_greenup = false
 Whether or not to force greenup for all fires.
 
atomic< bool > force_no_greenup = false
 Whether or not to force no greenup for all fires.
 
atomic< bool > force_curing = false
 Whether or not to force static curing value for all fires.
 
atomic< bool > rowcol_ignition = false
 Whether or not the start point is specified by row and column id of a forced fuel grid.
 

Private Member Functions

 SettingsImplementation () noexcept
 Initialize object but don't load settings from file.
 

Private Attributes

string dir_root_
 Directory used for settings and relative paths.
 
mutex mutex_
 Mutex for parallel access.
 
string raster_root_
 Root directory that raster inputs are stored in.
 
string fuel_lookup_table_file_
 Name of file that defines fuel lookup table.
 
unique_ptr< fuel::FuelLookupfuel_lookup_ = nullptr
 fuel lookup table
 
atomic< MathSize > minimum_ros_
 Minimum rate of spread before fire is considered to be spreading (m/min)
 
MathSize maximum_spread_distance_
 Maximum distance that the fire is allowed to spread in one step (# of cells)
 
MathSize minimum_ffmc_
 Minimum Fine Fuel Moisture Code required for spread during the day.
 
MathSize minimum_ffmc_at_night_
 Minimum Fine Fuel Moisture Code required for spread during the night.
 
DurationSize offset_sunrise_
 Offset from sunrise at which the day is considered to start (hours)
 
DurationSize offset_sunset_
 Offset from sunrise at which the day is considered to end (hours)
 
atomic< ThresholdSize > confidence_level_
 Confidence required before simulation stops (% / 100)
 
atomic< int > ign_row_ = 1
 Ignition position row.
 
atomic< int > ign_col_ = 1
 Ignition position col.
 
atomic< int > static_curing_ = 75
 Static curing value.
 
atomic< size_t > maximum_time_seconds_
 Maximum time simulation can run before it is ended and whatever results it has are used (s)
 
size_t maximum_count_simulations_
 Maximum number of simulations that can run before it is ended and whatever results it has are used.
 
ThresholdSize threshold_scenario_weight_
 Weight to give to Scenario part of thresholds.
 
ThresholdSize threshold_daily_weight_
 Weight to give to daily part of thresholds.
 
ThresholdSize threshold_hourly_weight_
 Weight to give to hourly part of thresholds.
 
vector< int > output_date_offsets_
 Days to output probability contours for (1 is start date, 2 is day after, etc.)
 
int default_percent_conifer_
 Default Percent Conifer to use for M1/M2 fuels where none is specified (%)
 
int default_percent_dead_fir_
 Default Percent Dead Fir to use for M3/M4 fuels where none is specified (%)
 
int max_date_offset_
 Whatever the maximum value in the date offsets is.
 
int intensity_max_low_
 The maximum fire intensity for the 'low' range of intensity (kW/m)
 
int intensity_max_moderate_
 The maximum fire intensity for the 'moderate' range of intensity (kW/m)
 

Detailed Description

Settings implementation class.

Member Function Documentation

◆ confidenceLevel()

ThresholdSize fs::sim::SettingsImplementation::confidenceLevel ( ) const
inlinenodiscardnoexcept

Confidence required before simulation stops (% / 100)

Returns
Confidence required before simulation stops (% / 100)
Here is the caller graph for this function:

◆ defaultPercentConifer()

int fs::sim::SettingsImplementation::defaultPercentConifer ( ) const
inlinenodiscardconstexprnoexcept

Default Percent Conifer to use for M1/M2 fuels where none is specified (%)

Returns
Percent of the stand that is composed of conifer (%)
Here is the caller graph for this function:

◆ defaultPercentDeadFir()

int fs::sim::SettingsImplementation::defaultPercentDeadFir ( ) const
inlinenodiscardconstexprnoexcept

Default Percent Dead Fir to use for M3/M4 fuels where none is specified (%)

Returns
Percent of the stand that is composed of dead fir (NOT percent of the fir that is dead) (%)
Here is the caller graph for this function:

◆ fuelLookup()

const fuel::FuelLookup & fs::sim::SettingsImplementation::fuelLookup ( )
inlinenodiscardnoexcept

Fuel lookup table.

Returns
Fuel lookup table
Here is the caller graph for this function:

◆ instance() [1/2]

SettingsImplementation & fs::sim::fs::sim::SettingsImplementation::instance ( )
staticnoexcept

The singleton instance for this class.

Returns
The singleton instance for this class
Here is the call graph for this function:

◆ instance() [2/2]

SettingsImplementation & fs::sim::fs::sim::SettingsImplementation::instance ( bool check_loaded)
staticnoexcept

The singleton instance for this class.

Parameters
check_loadedWhether to ensure a file has been loaded already
Returns
The singleton instance for this class

◆ intensityMaxLow()

int fs::sim::SettingsImplementation::intensityMaxLow ( ) const
inlinenodiscardconstexprnoexcept

The maximum fire intensity for the 'low' range of intensity (kW/m)

Returns
The maximum fire intensity for the 'low' range of intensity (kW/m)
Here is the caller graph for this function:

◆ intensityMaxModerate()

int fs::sim::SettingsImplementation::intensityMaxModerate ( ) const
inlinenodiscardconstexprnoexcept

The maximum fire intensity for the 'moderate' range of intensity (kW/m)

Returns
The maximum fire intensity for the 'moderate' range of intensity (kW/m)
Here is the caller graph for this function:

◆ maxDateOffset()

int fs::sim::SettingsImplementation::maxDateOffset ( ) const
inlinenodiscardconstexprnoexcept

Whatever the maximum value in the date offsets is.

Returns
Whatever the maximum value in the date offsets is
Here is the caller graph for this function:

◆ maximumCountSimulations()

size_t fs::sim::SettingsImplementation::maximumCountSimulations ( ) const
inlinenodiscardconstexprnoexcept

Maximum number of simulations that can run before it is ended and whatever results it has are used.

Returns
Maximum number of simulations that can run before it is ended and whatever results it has are used
Here is the caller graph for this function:

◆ maximumSpreadDistance()

MathSize fs::sim::SettingsImplementation::maximumSpreadDistance ( ) const
inlinenodiscardconstexprnoexcept

Maximum distance that the fire is allowed to spread in one step (# of cells)

Returns
Maximum distance that the fire is allowed to spread in one step (# of cells)
Here is the caller graph for this function:

◆ maximumTimeSeconds()

size_t fs::sim::SettingsImplementation::maximumTimeSeconds ( ) const
inlinenodiscardnoexcept

Maximum time simulation can run before it is ended and whatever results it has are used (s)

Returns
Maximum time simulation can run before it is ended and whatever results it has are used (s)
Here is the caller graph for this function:

◆ minimumFfmc()

MathSize fs::sim::SettingsImplementation::minimumFfmc ( ) const
inlinenodiscardconstexprnoexcept

Minimum Fine Fuel Moisture Code required for spread during the day.

Returns
Minimum Fine Fuel Moisture Code required for spread during the day
Here is the caller graph for this function:

◆ minimumFfmcAtNight()

MathSize fs::sim::SettingsImplementation::minimumFfmcAtNight ( ) const
inlinenodiscardconstexprnoexcept

Minimum Fine Fuel Moisture Code required for spread during the night.

Returns
Minimum Fine Fuel Moisture Code required for spread during the night
Here is the caller graph for this function:

◆ minimumRos()

MathSize fs::sim::SettingsImplementation::minimumRos ( ) const
inlinenodiscardnoexcept

Minimum rate of spread before fire is considered to be spreading (m/min)

Returns
Minimum rate of spread before fire is considered to be spreading (m/min)
Here is the caller graph for this function:

◆ offsetSunrise()

DurationSize fs::sim::SettingsImplementation::offsetSunrise ( ) const
inlinenodiscardconstexprnoexcept

Offset from sunrise at which the day is considered to start (hours)

Returns
Offset from sunrise at which the day is considered to start (hours)
Here is the caller graph for this function:

◆ offsetSunset()

DurationSize fs::sim::SettingsImplementation::offsetSunset ( ) const
inlinenodiscardconstexprnoexcept

Offset from sunrise at which the day is considered to end (hours)

Returns
Offset from sunrise at which the day is considered to end (hours)
Here is the caller graph for this function:

◆ outputDateOffsets()

vector< int > fs::sim::SettingsImplementation::outputDateOffsets ( ) const
inlinenodiscard

Days to output probability contours for (1 is start date, 2 is day after, etc.)

Returns
Days to output probability contours for (1 is start date, 2 is day after, etc.)
Here is the caller graph for this function:

◆ rasterRoot()

const char * fs::sim::SettingsImplementation::rasterRoot ( ) const
inlinenodiscardnoexcept

Root directory that raster inputs are stored in.

Returns
Root directory that raster inputs are stored in
Here is the caller graph for this function:

◆ setConfidenceLevel()

void fs::sim::SettingsImplementation::setConfidenceLevel ( const ThresholdSize value)
inlinenoexcept

Set confidence required before simulation stops (% / 100)

Returns
Set confidence required before simulation stops (% / 100)
Here is the caller graph for this function:

◆ setMaximumTimeSeconds()

void fs::sim::SettingsImplementation::setMaximumTimeSeconds ( const size_t value)
inlinenoexcept

Set maximum time simulation can run before it is ended and whatever results it has are used (s)

Returns
Set maximum time simulation can run before it is ended and whatever results it has are used (s)
Here is the caller graph for this function:

◆ setOutputDateOffsets()

void fs::sim::SettingsImplementation::setOutputDateOffsets ( const char * value)
inline

Set days to output probability contours for (1 is start date, 2 is day after, etc.)

Returns
None
Here is the caller graph for this function:

◆ setRoot()

void fs::sim::SettingsImplementation::setRoot ( const char * dirname)
noexcept

Set root directory and read settings from file.

Parameters
dirnameDirectory to use for settings and relative paths
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setStaticCuring()

void fs::sim::SettingsImplementation::setStaticCuring ( const int value)
inlinenoexcept

Set static curing value.

Returns
Set static curing value
Here is the caller graph for this function:

◆ staticCuring()

int fs::sim::SettingsImplementation::staticCuring ( ) const
inlinenodiscardnoexcept

Static curing value.

Returns
Static curing value
Here is the caller graph for this function:

◆ thresholdDailyWeight()

ThresholdSize fs::sim::SettingsImplementation::thresholdDailyWeight ( ) const
inlinenodiscardconstexprnoexcept

Weight to give to daily part of thresholds.

Returns
Weight to give to daily part of thresholds
Here is the caller graph for this function:

◆ thresholdHourlyWeight()

ThresholdSize fs::sim::SettingsImplementation::thresholdHourlyWeight ( ) const
inlinenodiscardconstexprnoexcept

Weight to give to hourly part of thresholds.

Returns
Weight to give to hourly part of thresholds
Here is the caller graph for this function:

◆ thresholdScenarioWeight()

ThresholdSize fs::sim::SettingsImplementation::thresholdScenarioWeight ( ) const
inlinenodiscardconstexprnoexcept

Weight to give to Scenario part of thresholds.

Returns
Weight to give to Scenario part of thresholds
Here is the caller graph for this function:

Member Data Documentation

◆ deterministic

atomic<bool> fs::sim::SettingsImplementation::deterministic = false

Whether or not to run deterministically (100% chance of spread & survival)

Returns
Whether or not to run deterministically (100% chance of spread & survival)

◆ force_curing

atomic<bool> fs::sim::SettingsImplementation::force_curing = false

Whether or not to force static curing value for all fires.

Returns
Whether or not to force static curing value for all fires

◆ force_greenup

atomic<bool> fs::sim::SettingsImplementation::force_greenup = false

Whether or not to force greenup for all fires.

Returns
Whether or not to force greenup for all fires

◆ force_no_greenup

atomic<bool> fs::sim::SettingsImplementation::force_no_greenup = false

Whether or not to force no greenup for all fires.

Returns
Whether or not to force no greenup for all fires

◆ rowcol_ignition

atomic<bool> fs::sim::SettingsImplementation::rowcol_ignition = false

Whether or not the start point is specified by row and column id of a forced fuel grid.

Returns
Whether or not the start point is specified by row and column id of a forced fuel grid

◆ run_async

atomic<bool> fs::sim::SettingsImplementation::run_async = true

Whether or not to run things asynchronously where possible.

Returns
Whether or not to run things asynchronously where possible

◆ save_as_ascii

atomic<bool> fs::sim::SettingsImplementation::save_as_ascii = false

Whether or not to save grids as .asc.

Returns
Whether or not to save grids as .asc

◆ save_individual

atomic<bool> fs::sim::SettingsImplementation::save_individual = false

Whether or not to save individual grids.

Returns
Whether or not to save individual grids

◆ save_intensity

atomic<bool> fs::sim::SettingsImplementation::save_intensity = true

Whether or not to save intensity grids.

Returns
Whether or not to save intensity grids

◆ save_occurrence

atomic<bool> fs::sim::SettingsImplementation::save_occurrence = false

Whether or not to save occurrence grids.

Returns
Whether or not to save occurrence grids

◆ save_points

atomic<bool> fs::sim::SettingsImplementation::save_points = false

Whether or not to save points used for spread.

Returns
Whether or not to save points used for spread

◆ save_probability

atomic<bool> fs::sim::SettingsImplementation::save_probability = true

Whether or not to save probability grids.

Returns
Whether or not to save probability grids

◆ save_simulation_area

atomic<bool> fs::sim::SettingsImplementation::save_simulation_area = false

Whether or not to save simulation area grids.

Returns
Whether or not to save simulation area grids

◆ surface

atomic<bool> fs::sim::SettingsImplementation::surface = false

Whether or not to create a probability surface.

Returns
Whether or not to create a probability surface

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