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

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.30.tar.gz (436.5 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.30-py3-none-any.whl (452.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: simfire-1.4.30.tar.gz
  • Upload date:
  • Size: 436.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.9.16 Linux/5.15.0-1033-azure

File hashes

Hashes for simfire-1.4.30.tar.gz
Algorithm Hash digest
SHA256 d5e805fde8f6ecfa60519781227da12d10708f9d96d16177d6394cfc5edace2a
MD5 a8062f66344b4daddbe15d3ff697d838
BLAKE2b-256 3d8f007cbbf2f4e8bb6d17f2d0c292bf654615c5b2c096b53241fa20755f50e3

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for simfire-1.4.30-py3-none-any.whl
Algorithm Hash digest
SHA256 beb1aedbdb6483db60122130e34d10dfbae44caf48237f5c4c64be59279b16c4
MD5 828514ce25596777e84a4aa1ebc0a73d
BLAKE2b-256 e04547f11ed2321b98f49dca928d87e46cce4701601cfe9f93f51bdcd4965991

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