10#include <unordered_map>
11#include <unordered_set>
16std::vector<int> adjacentCells(
int cell,
int nrows,
int ncols);
22 float ws, waz, rh, tmp, apcp, ffmc, dmc, dc, isi, bui,
30 float ws, saz, cur, ps, cbh, ccf, cbd, elev, tmp, rh, lat, lon, ffmc, bui, gfl,
33 int waz, nftype, FMC, time, pattern, mon, jd, jd_min, pc, pdf;
42 float cbh, fmc, fl, h;
48 float hffmc, sfc, csi, fl, fh, a, b, c, rss, angle, ros_active, cfb, se, rso, fmc, sfi, isi, be, sf, raz, wsv, ff,
49 crown_intensity, crown_flame_length, max_flame_length;
51 int crown, jd_min, jd;
56 float ros, dist, rost, cfb, fc, cfc, time, rss, isi;
63 float lb, area, perm, pgr, lbt;
79 std::vector<int> coord;
95 std::unordered_map<int, std::vector<int>> gMsgList;
96 std::unordered_map<int, std::vector<int>> gMsgListSeason;
97 std::unordered_map<int, double> fireProgress;
98 std::unordered_map<int, double> angleDict;
99 std::unordered_map<int, double> ROSAngleDir;
102 std::unordered_map<int, double> distToCenter;
103 std::unordered_map<int, int> angleToNb;
110 std::vector<int> _coord,
118 std::unordered_set<int>& availSet,
121 void ros_distr_old(
double thetafire,
double forward,
double flank,
double back);
122 double rhoTheta(
double theta,
double a,
double b);
123 void ros_distr_V2(
double thetafire,
double a,
double b,
double c,
double EFactor);
126 std::unordered_set<int>& AvailSet,
129 std::vector<std::vector<int>>& coordCells,
130 std::unordered_map<int, Cells>& Cells_Obj,
133 std::vector<double>* FSCell,
134 std::vector<float>* crownMetrics,
138 std::vector<int>& crownState,
139 std::vector<float>& crownFraction,
140 std::vector<float>& surfFraction,
141 std::vector<float>& Intensities,
142 std::vector<float>& RateOfSpreads,
143 std::vector<float>& SurfaceFlameLengths,
144 std::vector<float>& CrownFlameLengths,
145 std::vector<float>& CrownIntensities,
146 std::vector<float>& MaxFlameLengths);
149 std::unordered_set<int>& AvailSet,
152 std::vector<std::vector<int>>& coordCells,
153 std::unordered_map<int, Cells>& Cells_Obj,
156 std::vector<double>* FSCell,
157 std::vector<float>* crownMetrics,
161 std::vector<float>& EllipseFactors,
162 std::vector<int>& crownState,
163 std::vector<float>& crownFraction,
164 std::vector<float>& surfFraction,
165 std::vector<float>& Intensities,
166 std::vector<float>& RateOfSpreads,
167 std::vector<float>& FlameLengths);
187 std::vector<int>& ignitionPoints,
195 void harvested(
int id,
int period);
200 double allocate(
double offset,
double base,
double ros1,
double ros2);
201 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:1091
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:123
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:767
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:1189
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:413
std::string getStatus()
Retrieve the cell's fire status.
Definition Cells.cpp:1200
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:320
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:1231
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:288