Skip to content

Implement pluggable fire-spotting models from CA comparison study#30

Draft
Copilot wants to merge 8 commits intospotting-probabilityfrom
copilot/implement-spotting-models
Draft

Implement pluggable fire-spotting models from CA comparison study#30
Copilot wants to merge 8 commits intospotting-probabilityfrom
copilot/implement-spotting-models

Conversation

Copy link

Copilot AI commented Feb 13, 2026

Adds four spotting distance models (Alexandridis, Trucchia, Pereira, Koo) from the 2024 Agricultural and Forest Meteorology comparison study, following the existing ROS model selection architecture.

Implementation

  • Model functions: Four JIT-compiled spotting distance calculators in functions.py, each with different physics (exponential, power-law, log-normal, flight-time based)
  • Factory pattern: get_spotting_fn() selector matching get_p_time_fn() design
  • Propagation chain: Threaded spotting_fn parameter through compute_spotting()single_cell_updates()next_updates_fn()advance_front_until()
  • Configuration: Added spotting_model field to PropagatorConfigurationLegacy with default "alexandridis"
  • Type system: SpottingModel literal type for compile-time validation

Usage

Configuration-based:

{
  "do_spotting": true,
  "spotting_model": "trucchia"
}

Programmatic:

from propagator.core.numba import get_spotting_fn

sim = Propagator(
    dem=dem,
    veg=veg,
    do_spotting=True,
    spotting_fn=get_spotting_fn("koo")
)

Testing

Added 13 tests covering factory behavior, model physics (zero wind, directional effects, stochastic behavior), and edge cases.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • astral.sh
    • Triggering command: /usr/bin/curl curl -LsSf REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Spotting models</issue_title>
<issue_description>Implement and test spotting models from "Fire-spotting modelling in operational wildfire simulators based on Cellular Automata: A comparison study" - link</issue_description>

<agent_instructions>Mimic how selection for different rate of spread formulation is implemented</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits February 13, 2026 14:33
- Add SpottingModel type with four models: alexandridis, trucchia, pereira, koo
- Implement individual spotting distance functions for each model
- Add get_spotting_fn() factory function similar to get_p_time_fn()
- Update configuration to include spotting_model parameter
- Thread spotting_fn through propagation chain
- Update CLI to pass spotting_fn to Propagator

Co-authored-by: Perello-nico <71607852+Perello-nico@users.noreply.github.com>
- Test all four spotting models (alexandridis, trucchia, pereira, koo)
- Validate correct behavior with zero wind
- Verify stochastic nature of models
- Test wind direction and speed effects
- Fix import statements in spotting functions for numba compatibility

Co-authored-by: Perello-nico <71607852+Perello-nico@users.noreply.github.com>
- Add inline documentation in example_spotting_dynamics.py
- Update programmatic guide with spotting model section
- Document all four available models and their usage
- Show both config-based and programmatic model selection

Co-authored-by: Perello-nico <71607852+Perello-nico@users.noreply.github.com>
- Fix import order in configuration.py (pytz before numpy)
- Improve error message in get_spotting_fn for consistency
- Update test to match new error message

Co-authored-by: Perello-nico <71607852+Perello-nico@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement and test spotting models from wildfire study Implement pluggable fire-spotting models from CA comparison study Feb 13, 2026
Copilot AI requested a review from Perello-nico February 13, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants