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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file simfire-1.4.39.tar.gz.
File metadata
- Download URL: simfire-1.4.39.tar.gz
- Upload date:
- Size: 437.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.9.17 Linux/5.15.0-1042-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73828eaefd03aea83324d73c87e529fb609f4af9f10f9e29a3475127e63d5dc2
|
|
| MD5 |
71ed70b8940165ea78e774a293706f88
|
|
| BLAKE2b-256 |
51551a8d876a7e3712039abb553983fca1ab2f8ad8c66874a88d22ef97c016cc
|
File details
Details for the file simfire-1.4.39-py3-none-any.whl.
File metadata
- Download URL: simfire-1.4.39-py3-none-any.whl
- Upload date:
- Size: 453.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.9.17 Linux/5.15.0-1042-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b220dc5ec64ec200a8636a036cb065e1b8f6b40956e4c4152dc0041dd921459b
|
|
| MD5 |
b7fa279da6de2ba46382efd5d4d530ce
|
|
| BLAKE2b-256 |
01460977a67cb315948b5542a85c81b8239cc32311ae15dd44e22dd95564c885
|