Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 2.0.1 instead.
Reason given by maintainers: The fire spread calculation for all versions <2.0.0 is incorrect.

SimFire Fire Simulator

Introduction

SimFire uses PyGame to display and simulate different fire spread models, including the Rothermel Surface fire spread model described in this paper.

For more comprehensive documentation, go to our docs page.

Running the Simulation


Left: Fire simulated near Julian, CA. Right: Fire simulated near Reno, NV.
Both fires have winds from the east at 20mph

Install simfire by following the installation instructions. Then run the run_game.py script:

python run_game.py

Running as a Python Module

from simfire.sim.simulation import FireSimulation
from simfire.utils.config import Config

config = Config("configs/operational_config.yml")
sim = FireSimulation(config)

# Run a 1 hour simulation
sim.run("1h")

# Run the same simulation for 30 more minutes
sim.run("30m")

# Render the next 2 hours of simulation
sim.rendering = True
sim.run("2h")

# Now save a GIF and fire spread graph from the last 2 hours of simulation
sim.save_gif()
sim.save_spread_graph()
# Saved to the location specified in the config: simulation.sf_home

# Update agents for display
# (x, y, agent_id)
agent_0 = (5, 5, 0)
agent_1 = (5, 5, 1)

agents = [agent_0, agent_1]

# Create the agents on the display
sim.update_agent_positions(agents)

# Loop through to move agents
for i in range(5):
    agent_0 = (5 + i, 5 + i, 0)
    agent_1 = (5 + i, 5 + i, 1)
    # Update the agent positions on the simulation
    sim.update_agent_positions([agent_0, agent_1])
    # Run for 1 update step
    sim.run(1)

# Turn off rendering so the display disappears and the simulation continues to run in the
# background
sim.rendering = False

Installing the Package

pip install simfire

Contributing

For contributing, see the Contribution Page in our docs.

Citation

To cite this software, use the “Cite this repository” link built into GitHub on the right.

Copyright

Copyright ©2023 The MITRE Corporation. ALL RIGHTS RESERVED. Approved for Public Release; Distribution Unlimited. Public Release Case Number 22-3261.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simfire-1.5.9.tar.gz (434.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simfire-1.5.9-py3-none-any.whl (449.3 kB view details)

Uploaded Python 3

File details

Details for the file simfire-1.5.9.tar.gz.

File metadata

  • Download URL: simfire-1.5.9.tar.gz
  • Upload date:
  • Size: 434.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.9.19 Linux/6.5.0-1018-azure

File hashes

Hashes for simfire-1.5.9.tar.gz
Algorithm Hash digest
SHA256 cbd4dc5960e0a668c6ff4c3dd449a0bab9fb80317de3bbd357cfda129a0cf2c5
MD5 1ffc5fc96251e6aa32e50e75ae72001d
BLAKE2b-256 1c7d5909cdcc6a117b46cd0ff01f10a21ad330ffe1a29451597440a4b0caef35

See more details on using hashes here.

File details

Details for the file simfire-1.5.9-py3-none-any.whl.

File metadata

  • Download URL: simfire-1.5.9-py3-none-any.whl
  • Upload date:
  • Size: 449.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.9.19 Linux/6.5.0-1018-azure

File hashes

Hashes for simfire-1.5.9-py3-none-any.whl
Algorithm Hash digest
SHA256 6dad9e943f6a333d3b23c906d5ce34d6fb7658145862ee7e76a0b773b4893ca7
MD5 fa27de81acc0ac9b700a326cdd8b0b35
BLAKE2b-256 86725d968a833cc4af4104bda41c4da25d6a917dc379e6ce61a503badc097f9c

See more details on using hashes here.

Release history Release notifications | RSS feed

2.0.1

2 files

2.0.0

2 files

This release

1.5.9 This release

2 files

1.5.8

2 files

1.5.7

2 files

1.5.6

2 files

1.5.5

2 files

1.5.4

2 files

1.5.3

2 files

1.5.2

2 files

1.5.1

2 files

1.5.0

2 files

1.4.40

2 files

1.4.39

2 files

1.4.38

2 files

1.4.37

2 files

1.4.36

2 files

1.4.35

2 files

1.4.34

2 files

1.4.33

2 files

1.4.32

2 files

1.4.31

2 files

1.4.30

2 files

1.4.29

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page