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

Represents a full set of simulations using all available weather streams. More...

#include <Iteration.h>

Collaboration diagram for fs::sim::Iteration:

Public Member Functions

 Iteration (vector< Scenario * > scenarios) noexcept
 Constructor.
 
 Iteration (const Iteration &rhs)=default
 Copy constructor.
 
 Iteration (Iteration &&rhs)=default
 Move constructor.
 
Iterationoperator= (const Iteration &rhs)=default
 Copy assignment.
 
Iterationoperator= (Iteration &&rhs)=default
 Move assignment.
 
Iterationreset_with_new_start (const shared_ptr< topo::Cell > &start_cell)
 Assign start Cell and create new thresholds for use in each Scenario.
 
Iterationreset (mt19937 *mt_extinction, mt19937 *mt_spread)
 Create new thresholds for use in each Scenario.
 
const vector< Scenario * > & getScenarios () const noexcept
 List of Scenarios this Iteration contains.
 
void cancel (bool show_warning) noexcept
 
vector< DurationSize > savePoints () const
 Points in time that ProbabilityMaps get saved for.
 
DurationSize startTime () const
 Time that simulations start.
 
size_t size () const noexcept
 Number of Scenarios in this Iteration.
 
util::SafeVector finalSizes () const
 SafeVector of sizes that Scenarios have resulted in.
 

Private Attributes

vector< Scenario * > scenarios_
 List of Scenarios this Iteration contains.
 
util::SafeVector final_sizes_ {}
 SafeVector of sizes that Scenarios have resulted in.
 
bool cancelled_ = false
 Whether this has been cancelled and should stop computing.
 

Detailed Description

Represents a full set of simulations using all available weather streams.

Constructor & Destructor Documentation

◆ Iteration() [1/3]

fs::sim::Iteration::Iteration ( vector< Scenario * > scenarios)
explicitnoexcept

Constructor.

Parameters
scenariosList of Scenarios to wrap into Iteration

◆ Iteration() [2/3]

fs::sim::Iteration::Iteration ( const Iteration & rhs)
default

Copy constructor.

Parameters
rhsIteration to copy form

◆ Iteration() [3/3]

fs::sim::Iteration::Iteration ( Iteration && rhs)
default

Move constructor.

Parameters
rhsIteration to move from

Member Function Documentation

◆ cancel()

void fs::sim::Iteration::cancel ( bool show_warning)
noexcept

Mark as cancelled so it stops computing on next event.

Parameters
Whetherto log a warning about this being cancelled

◆ finalSizes()

util::SafeVector fs::sim::Iteration::finalSizes ( ) const
nodiscard

SafeVector of sizes that Scenarios have resulted in.

Returns
SafeVector of sizes that Scenarios have resulted in

◆ getScenarios()

const vector< Scenario * > & fs::sim::Iteration::getScenarios ( ) const
inlinenodiscardnoexcept

List of Scenarios this Iteration contains.

Returns
List of Scenarios this Iteration contains

◆ operator=() [1/2]

Iteration & fs::sim::Iteration::operator= ( const Iteration & rhs)
default

Copy assignment.

Parameters
rhsIteration to copy from
Returns
This, after assignment

◆ operator=() [2/2]

Iteration & fs::sim::Iteration::operator= ( Iteration && rhs)
default

Move assignment.

Parameters
rhsIteration to move from
Returns
This, after assignment

◆ reset()

Iteration * fs::sim::Iteration::reset ( mt19937 * mt_extinction,
mt19937 * mt_spread )

Create new thresholds for use in each Scenario.

Parameters
mt_extinctionExtinction thresholds
mt_spreadSpread thresholds
Returns
This

◆ reset_with_new_start()

Iteration * fs::sim::Iteration::reset_with_new_start ( const shared_ptr< topo::Cell > & start_cell)

Assign start Cell and create new thresholds for use in each Scenario.

Parameters
start_cellCell to start ignition in
Returns
This
Here is the call graph for this function:

◆ savePoints()

vector< DurationSize > fs::sim::Iteration::savePoints ( ) const
nodiscard

Points in time that ProbabilityMaps get saved for.

Returns
Points in time that ProbabilityMaps get saved for

◆ size()

size_t fs::sim::Iteration::size ( ) const
nodiscardnoexcept

Number of Scenarios in this Iteration.

Returns
Number of Scenarios in this Iteration

◆ startTime()

DurationSize fs::sim::Iteration::startTime ( ) const
nodiscard

Time that simulations start.

Returns
Time that simulations start

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