Summary
MessagesFileNN.csv appears to be generated from the in-memory FSCell buffer using a row count that does not match the semantics of FSCell.
As a result, the output file is not guaranteed to contain either:
- the complete set of recorded fire spread events, or
- exactly one message per burned destination cell.
Instead, it currently writes an order-dependent prefix of the recorded event stream.
What FSCell contains
In CellsFBP::manageFire(...), every time the fire front from a burning cell reaches the center of a neighboring cell, one message event is appended to FSCell.
Each event consists of four values:
- source cell ID
- destination cell ID
- fire period
- realized ROS
Relevant code:
if (fireProgress[nb] >= distToCenter[nb]) {
FSCell->push_back(realId);
FSCell->push_back(nb);
FSCell->push_back(period);
FSCell->push_back(ros);
}
Therefore, FSCell is naturally an append-only event stream containing every recorded reach-to-center message generated during the simulation.
Where the mismatch occurs
At the end of the simulation, MessagesFileNN.csv is written using
CSVPloter.printCSVDouble_V2(
this->burntCells.size() - this->nIgnitions,
4,
this->FSCell
);
However, printCSVDouble_V2(...) simply writes the first rows tuples from the supplied vector.
Thus the number of rows written is
burntCells.size() - nIgnitions
instead of
which is the actual number of recorded events stored in FSCell.
FSCell may legitimately contain:
- repeated
(source, destination) message events across multiple fire periods,
- multiple incoming message events for the same destination cell,
- reach-to-center events for destinations that ultimately never satisfy
get_burned(...).
Consequently, MessagesFileNN.csv is currently not guaranteed to represent either:
- the complete set of recorded message events, or
- one canonical message per burned non-ignition cell.
Instead, it becomes an order-dependent prefix of the event buffer.
Furthermore, because events are appended while iterating over containers such as burningCells and ROSAngleDir, the retained prefix does not appear to correspond to any explicit or documented selection rule.
Observed downstream impact
This affects all outputs that consume MessagesFileNN.csv, including:
PropagationTreeNN.png
FireSpreadTreeNN_*.png
- aggregated spread graphs constructed from the message files
because these visualizations are built from a potentially truncated event stream.
Questions for the maintainers
-
Was MessagesFileNN.csv intended to contain:
- all recorded reach-to-center events, or
- exactly one representative message per burned destination cell?
-
If the latter is the intended behavior, what is the intended parent/message selection rule?
- First arrival?
- Earliest fire period?
- Highest ROS?
- Another criterion?
Without an explicit selection rule, the current implementation appears to produce an order-dependent subset of the recorded events rather than a well-defined propagation tree.
Summary
MessagesFileNN.csvappears to be generated from the in-memoryFSCellbuffer using a row count that does not match the semantics ofFSCell.As a result, the output file is not guaranteed to contain either:
Instead, it currently writes an order-dependent prefix of the recorded event stream.
What
FSCellcontainsIn
CellsFBP::manageFire(...), every time the fire front from a burning cell reaches the center of a neighboring cell, one message event is appended toFSCell.Each event consists of four values:
Relevant code:
Therefore,
FSCellis naturally an append-only event stream containing every recorded reach-to-center message generated during the simulation.Where the mismatch occurs
At the end of the simulation,
MessagesFileNN.csvis written usingCSVPloter.printCSVDouble_V2( this->burntCells.size() - this->nIgnitions, 4, this->FSCell );However,
printCSVDouble_V2(...)simply writes the firstrowstuples from the supplied vector.Thus the number of rows written is
instead of
which is the actual number of recorded events stored in
FSCell.FSCellmay legitimately contain:(source, destination)message events across multiple fire periods,get_burned(...).Consequently,
MessagesFileNN.csvis currently not guaranteed to represent either:Instead, it becomes an order-dependent prefix of the event buffer.
Furthermore, because events are appended while iterating over containers such as
burningCellsandROSAngleDir, the retained prefix does not appear to correspond to any explicit or documented selection rule.Observed downstream impact
This affects all outputs that consume
MessagesFileNN.csv, including:PropagationTreeNN.pngFireSpreadTreeNN_*.pngbecause these visualizations are built from a potentially truncated event stream.
Questions for the maintainers
Was
MessagesFileNN.csvintended to contain:If the latter is the intended behavior, what is the intended parent/message selection rule?
Without an explicit selection rule, the current implementation appears to produce an order-dependent subset of the recorded events rather than a well-defined propagation tree.