BurnP3 / BurnP3Plus

A SyncroSim package to explore fire risk and susceptibility across a landscape.
https://burnp3.github.io/BurnP3Plus/
MIT License
7 stars 4 forks source link

[Burn-P3+ Bug]: Resampling performing additional fires by iteration (some suggestions) #17

Open BadgerOnABike opened 1 year ago

BadgerOnABike commented 1 year ago

Contact Details

@badgeronabike

What happened?

Related to: https://github.com/BurnP3/BurnP3PlusPrometheus/issues/7

Resampling is a rather strange beast. Currently it is resampling by iteration and rounding up to ensure it gets enough fires, this makes sense but can result in a lot of additional fires. So far as I can tell we don't have a pruning structure to maintain the initial number of fires as we had defined which could lead to challenges interpreting if the modeller doesn't realize this. Additionally its a lot of additional overhead on large simulations.

A few suggestions:

With relation to BP3+Prometheus 7, the method we are currently using seems to result in lots of extra fires and the system seems to get confused as to how many it should be checking.

End of the day it'd be good to hand back the number of fires the system the user had initially requested.

What component are you seeing the problem on?

R

Relevant log output

No response

Approvals Process

cstock69 commented 1 year ago

Suggestion for a solution. Instead of adding an extra fire per iteration, add a single "extra" iteration at the end of the list.

  1. lets pretend we have set up a scenario with 1000 iterations, with 10 fires per iteration = 10,000 total fires.
  2. Each fire has an attribute in the ignition table for its iteration number and its fire number within the iteration (i.e. Iteration 7, fire 9)
  3. Add Iteration 1001, and give that iteration 1000 fires (the extra 10% we were talking about before)
  4. Run all fires
  5. When compiling results and putting all the fires in an iteration together, check to see that every iteration and fire number was returned
  6. Pretend in this case that Iteration 15, Fire 6 failed to reach desired size.
  7. Go to Iteration 1001, grab the first fire in that list that achieved desired min size, and reassign its Iteration number to 15, and call it fire 6.
  8. Go through all iterations like this, searching for missing iteration-fire number combinations, and use Iteration 1001 to fill the necessary blanks
  9. After all blanks are filled, delete all remaining fires in Iteration 1001.