11#include <unordered_map>
12#include <unordered_set>
17std::vector<int> adjacentCells(
int cell,
int nrows,
int ncols);
23 float ws, waz, rh, tmp, apcp, ffmc, dmc, dc, isi, bui,
31 float ws, saz, cur, ps, cbh, ccf, cbd, elev, tmp, rh, lat, lon, ffmc, bui, gfl,
34 int waz, nftype, FMC, time, pattern, mon, jd, jd_min, pc, pdf;
43 float cbh, fmc, fl, h;
49 float hffmc, sfc, csi, fl, fh, a, b, c, rss, angle, ros_active, cfb, se, rso, fmc, sfi, isi, be, sf, raz, wsv, ff,
50 crown_intensity, crown_flame_length, max_flame_length;
52 int crown, jd_min, jd;
57 float ros, dist, rost, cfb, fc, cfc, time, rss, isi;
64 float lb, area, perm, pgr, lbt;
80 std::vector<int> coord;
96 std::unordered_map<int, std::vector<int>> gMsgList;
97 std::unordered_map<int, std::vector<int>> gMsgListSeason;
98 std::unordered_map<int, double> fireProgress;
99 std::unordered_map<int, double> angleDict;
100 std::unordered_map<int, double> ROSAngleDir;
103 std::unordered_map<int, double> distToCenter;
104 std::unordered_map<int, int> angleToNb;
111 std::vector<int> _coord,
119 std::unordered_set<int>& availSet,
122 void ros_distr_old(
double thetafire,
double forward,
double flank,
double back);
123 double rhoTheta(
double theta,
double a,
double b);
124 void ros_distr(
double thetafire,
double forward,
double flank,
double back,
double EFactor);
125 void ros_distr_V2(
double thetafire,
double a,
double b,
double c,
double EFactor);
128 std::unordered_set<int>& AvailSet,
131 std::vector<std::vector<int>>& coordCells,
132 std::unordered_map<int, Cells>& Cells_Obj,
135 std::vector<double>* FSCell,
136 std::vector<float>* crownMetrics,
140 std::vector<int>& crownState,
141 std::vector<float>& crownFraction,
142 std::vector<float>& surfFraction,
143 std::vector<float>& Intensities,
144 std::vector<float>& RateOfSpreads,
145 std::vector<float>& SurfaceFlameLengths,
146 std::vector<float>& CrownFlameLengths,
147 std::vector<float>& CrownIntensities,
148 std::vector<float>& MaxFlameLengths);
151 std::unordered_set<int>& AvailSet,
154 std::vector<std::vector<int>>& coordCells,
155 std::unordered_map<int, Cells>& Cells_Obj,
158 std::vector<double>* FSCell,
159 std::vector<float>* crownMetrics,
163 std::vector<float>& EllipseFactors,
164 std::vector<int>& crownState,
165 std::vector<float>& crownFraction,
166 std::vector<float>& surfFraction,
167 std::vector<float>& Intensities,
168 std::vector<float>& RateOfSpreads,
169 std::vector<float>& FlameLengths);
189 std::vector<int>& ignitionPoints,
197 void harvested(
int id,
int period);
202 double allocate(
double offset,
double base,
double ros1,
double ros2);
203 float slope_effect(
float elev_i,
float elev_j,
int cellsize);
bool get_burned(int period, int season, int NMsg, inputs df[], fuel_coefs *coef, arguments *args, weatherDF *wdf_ptr, bool &activeCrown, int perimeterCells)
Checks if a cell that has been reached by fire begins to burn.
Definition Cells.cpp:1145
void initializeFireFields(std::vector< std::vector< int > > &coordCells, std::unordered_set< int > &availSet, int cols, int rows)
Initializes fire-related fields for the cell during ignition.
Definition Cells.cpp:124
std::vector< int > manageFireBBO(int period, std::unordered_set< int > &AvailSet, inputs *df_ptr, fuel_coefs *coef, std::vector< std::vector< int > > &coordCells, std::unordered_map< int, Cells > &Cells_Obj, arguments *args, weatherDF *wdf_ptr, std::vector< double > *FSCell, std::vector< float > *crownMetrics, bool &activeCrown, double randomROS, int perimeterCells, std::vector< float > &EllipseFactors, std::vector< int > &crownState, std::vector< float > &crownFraction, std::vector< float > &surfFraction, std::vector< float > &Intensities, std::vector< float > &RateOfSpreads, std::vector< float > &FlameLengths)
Definition Cells.cpp:821
void setStatus(int status_int)
Sets a cell's fire status (0: Available, 1: Burning, 2: Burnt, 3: Harvested, 4: Non Fuel).
Definition Cells.cpp:1243
std::vector< int > manageFire(int period, std::unordered_set< int > &AvailSet, inputs df[], fuel_coefs *coef, std::vector< std::vector< int > > &coordCells, std::unordered_map< int, Cells > &Cells_Obj, arguments *args, weatherDF *wdf_ptr, std::vector< double > *FSCell, std::vector< float > *crownMetrics, bool &activeCrown, double randomROS, int perimeterCells, std::vector< int > &crownState, std::vector< float > &crownFraction, std::vector< float > &surfFraction, std::vector< float > &Intensities, std::vector< float > &RateOfSpreads, std::vector< float > &SurfaceFlameLengths, std::vector< float > &CrownFlameLengths, std::vector< float > &CrownIntensities, std::vector< float > &MaxFlameLengths)
Manage's the cell's response to being reached by fire.
Definition Cells.cpp:467
void ros_distr(double thetafire, double forward, double flank, double back, double EFactor)
Definition Cells.cpp:311
std::string getStatus()
Retrieve the cell's fire status.
Definition Cells.cpp:1254
void ros_distr_old(double thetafire, double forward, double flank, double back)
Definition Cells.cpp:240
void ros_distr_V2(double thetafire, double a, double b, double c, double EFactor)
Distributes the Rate of Spread (ROS) across the cell's neighbors based on fire direction and ellipse ...
Definition Cells.cpp:374
bool ignition(int period, int year, std::vector< int > &ignitionPoints, inputs *df_ptr, fuel_coefs *coef, arguments *args, weatherDF *wdf_ptr, bool &activeCrown, int perimeterCells)
Ignites a cell.
Definition Cells.cpp:1285
double rhoTheta(double theta, double a, double b)
Calculates the radial distance for a given angle in an ellipse defined by its semi-major and semi-min...
Definition Cells.cpp:287