FireSTARR
Loading...
Searching...
No Matches
Event.h
1/* SPDX-License-Identifier: AGPL-3.0-or-later */
2#ifndef FS_EVENT_H
3#define FS_EVENT_H
4#include "stdafx.h"
5#include <compare>
6#include "Cell.h"
7#include "Location.h"
8#include "Weather.h"
9namespace fs
10{
11using fs::Direction;
15struct Event
16{
20 enum class Type
21 {
22 Invalid,
23 Save,
24 EndSimulation,
25 NewFire,
26 FireSpread,
27 };
31 static constexpr Cell NoLocation{};
35 DurationSize time{INVALID_TIME};
39 Type type{Type::Invalid};
43 DurationSize time_at_location{0.0};
44 XYIdx xy{};
48 ROSSize ros{};
52 IntensitySize intensity{};
56 Direction raz{INVALID_DIRECTION};
60 CellIndex source{};
61 std::partial_ordering operator<=>(const Event& rhs) const
62 {
63 if (const auto cmp = time <=> rhs.time; 0 != cmp)
64 {
65 return cmp;
66 }
67 if (const auto cmp = type <=> rhs.type; 0 != cmp)
68 {
69 return cmp;
70 }
71 return xy <=> rhs.xy;
72 }
73};
74}
75#endif
A Position with a Slope, Aspect, and Fuel.
Definition Cell.h:13
Definition Weather.h:22
A specific Event scheduled in a specific Scenario.
Definition Event.h:16
IntensitySize intensity
Burn Intensity (kW/m)
Definition Event.h:52
DurationSize time_at_location
Duration that Event Cell has been burning (decimal days)
Definition Event.h:43
static constexpr Cell NoLocation
Cell representing no location.
Definition Event.h:31
ROSSize ros
Head fire rate of spread (m/min)
Definition Event.h:48
Type type
Type of Event.
Definition Event.h:39
Type
Type of Event.
Definition Event.h:21
CellIndex source
CellIndex for relative Cell that spread into from.
Definition Event.h:60
Direction raz
Head fire spread direction.
Definition Event.h:56
DurationSize time
Time of Event (decimal days)
Definition Event.h:35
Definition Location.h:81