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
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
Installing from Artifactory
To do this, you must be on the MITRE network and have access to artifacts.mitre.org.
First, you should change or create a pip.conf file in your $HOME/.pip/ directory (taken from this confluence page):
[global]
index-url = https://artifacts.mitre.org/artifactory/api/pypi/python/simple
timeout = 60
# some users have reported needing the following on Windows
trusted-host = artifacts.mitre.org
[search]
index = https://artifacts.mitre.org/artifactory/api/pypi/python
When save your pip.conf file with this configuration, just run the following command to install simfire:
pip install simfire
And for a specific version:
pip install simfire==<version>
Installing from GitLab PyPi Registry
To use the package simfire without cloning the repo, you must create a GitLab Personal Access Token and be added to the fiReLine GitLab group and/or the fiReLine/simfire project. You'll want to make sure that the personal access token scope is set to read_api. Once this has been created, you should copy the token and keep it in a secure location.
Then, you can install the simfire package with the following command, making sure to replace <your_personal_token> with the token you just copied.
pip install simfire --extra-index-url https://__token__:<your_personal_token>@gitlab.mitre.org/api/v4/projects/34582/packages/pypi/simple
For information on how to use the package, for now, use run_game.py as a jumping-off point. And to configure simulation, go to the Configuring the Simulation page.
Modifying .bashrc for Easy GitLab PyPi Registry Install
If you'd like, you can modify your .bashrc (or .zshrc, depending on your terminal) file to more easily install the package without the long URL.
Add the following to your .bashrc, making sure to substitute your own GITLAB_READ_API_TOKEN from the section above:
# GitLab Registry Access
export GITLAB_READ_API_TOKEN=<your read api token>
pip_install_simfire () {
version=$1
if [ -n "$version" ]; then
install_statement="pip install simfire==${version} --extra-index-url https://__token__:${GITLAB_READ_API_TOKEN}@gitlab.mitre.org/api/v4/projects/34582/packages/pypi/simple"
else
install_statement="pip install simfire --extra-index-url https://__token__:${GITLAB_READ_API_TOKEN}@gitlab.mitre.org/api/v4/projects/34582/packages/pypi/simple"
fi
eval "${install_statement}"
}
Now you can install simfire by calling the following from your terminal
pip_install_simfire
And you can supply a version by adding a version number
pip_install_simfire <version number>
By default, it will get the most recent version. Right now, whatever is in main will always be version 0.0.0. The other versions can be seen in the Releases Section of the GitLab or on the Package Registry Page.
Contributing
For contributing, see the Contribution Page in our docs.
Metadata
Release files for simfire 1.4.29
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| simfire-1.4.29.tar.gz | 437.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| simfire-1.4.29-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 889.8 kB
Release files / simfire-1.4.29.tar.gz
| Download URL | simfire-1.4.29.tar.gz |
|---|---|
| Size | 437.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
609e89e03b83f99ca6ef6f3d468b67c34bd5995ca6ea4a5e68825ddcca6733c2
|
|
BLAKE2b-256 checksum How to use checksums |
84fda20871d92e4b1993c19705163b39132fc9a7cb7a12dfea6016e771a14d8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.0 CPython/3.9.16 Linux/5.15.0-1033-azure
|
Release files / simfire-1.4.29-py3-none-any.whl
| Download URL | simfire-1.4.29-py3-none-any.whl |
|---|---|
| Size | 452.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
038605394eb071e78ef27c9f2fa2e0ca98a4e83f672b4f6219f3b362612917bd
|
|
BLAKE2b-256 checksum How to use checksums |
0e1781b2265903859ab29ac2213ed65376d5e02cd66dc024a4f8b815e2929f07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.0 CPython/3.9.16 Linux/5.15.0-1033-azure
|