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 of simfire <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.utils.config import Config
from simfire.sim.simulation import FireSimulation

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.save_path

# Update agents for display
# (x, y, agent_id)
agent_0 = (5, 78, 0)
agent_1 = (80, 105, 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(60):
    # Do something here to choose the new agent locations
    agent_0 = (new_col, new_row, 0)
    agent_1 = (new_col, new_row, 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.

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.4.35.tar.gz (437.2 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.4.35-py3-none-any.whl (452.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: simfire-1.4.35.tar.gz
  • Upload date:
  • Size: 437.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.9.16 Linux/5.15.0-1037-azure

File hashes

Hashes for simfire-1.4.35.tar.gz
Algorithm Hash digest
SHA256 ab9363e1172625e61f2e3da116c0bf1526b79e0b89074361c7e4acafae92cc72
MD5 91f6782d9b525eb8ab9dd3b2dba9b26c
BLAKE2b-256 edbe88c9a36af3e0f1b2e6c60e4444b539af46c4b95ec710a4f1f69a1f67e653

See more details on using hashes here.

File details

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

File metadata

  • Download URL: simfire-1.4.35-py3-none-any.whl
  • Upload date:
  • Size: 452.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.9.16 Linux/5.15.0-1037-azure

File hashes

Hashes for simfire-1.4.35-py3-none-any.whl
Algorithm Hash digest
SHA256 694a478af5f9739caebe26690a67f51d0c7cfe8ca5dd3d3cbb901750c2cb4334
MD5 67facf830bcd9668f21aea3458b79183
BLAKE2b-256 a243392866f113e5845d5337ba6b67ba77694c2ef6202159bd0e7709e34f572a

See more details on using hashes here.

Release history Release notifications | RSS feed

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page