Skip to content

Commit

Permalink
Merge branch '182-fix-gitlab-links-in-github-docs' into 'main'
Browse files Browse the repository at this point in the history
Resolve "Fix gitlab links in github docs"

Closes #182

See merge request fireline/simulators/simfire!134
  • Loading branch information
doyled-it committed Dec 7, 2023
2 parents 312aa50 + b9e2ca1 commit 6abe344
Show file tree
Hide file tree
Showing 8 changed files with 101 additions and 26 deletions.
8 changes: 5 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
# -- Project information -----------------------------------------------------

project = "SimFire"
copyright = f"{date.today().year}, fiReLine"
copyright = f"{date.today().year}, The MITRE Corporation"
author = (
"Marissa Dotter, Michael Doyle, Dhanuj Gandikota, Chris Kempis, Lauren Schambach, "
"Alex Tapley, Michael Threet, Tim Welsh"
"Marissa Dotter, Michael Doyle, Aidan Fennelly, Dhanuj Gandikota, Chris Kempis, "
"Lauren Schambach, Alex Tapley, Michael Threet, Tim Welsh"
)

# The full version, including alpha/beta/rc tags
Expand All @@ -42,6 +42,8 @@
"autoapi.extension",
"myst_parser",
"sphinx.ext.intersphinx",
"sphinx_copybutton",
"sphinxext.opengraph",
]

intersphinx_mapping = {
Expand Down
69 changes: 54 additions & 15 deletions docs/source/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

The configuration for SimFire is all done through a [YAML](https://yaml.org/) file. All of the configurable settings will be explained in the sections below.

This file can have any name, as a path is required to load the configuration file, but the hierarchy of the file must match the hierarchy found in the example [`config.yml`](https://gitlab.mitre.org/fireline/simfire/-/blob/main/config.yml). This example configuration can be seen in its entirety at the [bottom of this page](#example-config-file).
This file can have any name, as a path is required to load the configuration file, but the hierarchy of the file must match the hierarchy found in the example [`operational_config.yml`](https://github.com/mitrefireline/simfire/blob/main/configs/operational_config.yml). This example configuration can be seen in its entirety at the [bottom of this page](#example-config-file).

```{note}
This example in the docs may be out of date, so it is better to rely on the configs found in the [configs](https://github.com/mitrefireline/simfire/tree/main/configs) directory of the repository.
```

## Settings

Expand Down Expand Up @@ -82,7 +86,7 @@ The format to save the data of the simulation. Can by type: "npy", "h5".

#### ros_attenuation
(`bool`)<br>
Whether or not to attenuate rate of spread based on the type of line being used. These attenuation values can be seen in [`enums.py`](https://gitlab.mitre.org/fireline/simfire/-/blob/main/simfire/enums.py#L48). These values will be subtracted from the rate of spread for a given pixel based on the control line type. If this value is set to `false`, all lines will completely stop a fire and the rate of spread for any pixel with a control line will be set to zero.
Whether or not to attenuate rate of spread based on the type of line being used. These attenuation values can be seen in [`enums.py`](https://github.com/mitrefireline/simfire/blob/main/simfire/enums.py). These values will be subtracted from the rate of spread for a given pixel based on the control line type. If this value is set to `false`, all lines will completely stop a fire and the rate of spread for any pixel with a control line will be set to zero.

---

Expand Down Expand Up @@ -356,11 +360,17 @@ Whether or not to render with post agent and fire in place.

## Example Config File

Go [here](https://gitlab.mitre.org/fireline/simfire/-/blob/main/configs) for more examples.
Go [here](https://github.com/mitrefireline/simfire/tree/main/configs) for more examples.

```{note}
If this config doesn't work, look to the most up-to-date version in the link above.
```

```yaml
# For a description of config parameters, go to
# https://fireline.pages.mitre.org/simfire/config.html
area:
screen_size: [225, 225]
screen_size: [225, 450] # h, w
pixel_scale: 50

display:
Expand All @@ -371,20 +381,24 @@ display:

simulation:
update_rate: 1
runtime: 24h
runtime: 15h
headless: false
draw_spread_graph: false
record: true
save_data: true
data_type: "npy"
sf_home: "~/.simfire"

mitigation:
ros_attenuation: true
ros_attenuation: false

operational:
seed:
latitude: 39.67
longitude: 119.8
height: 4000
width: 4000
resolution: 30
latitude: 38.422 # top left corner
longitude: -118.266 # top left corner
height: 2000 # in meters
width: 2000 # in meters
resolution: 30 # in meters
year: 2020

terrain:
Expand All @@ -411,24 +425,49 @@ terrain:
function: chaparral
chaparral:
seed: 1113
burn_probability:
type: operational
functional:
function: perlin
perlin:
octaves: 3
persistence: 0.7
lacunarity: 2.0
seed: 827
range_min: 100.0
range_max: 300.0
gaussian:
amplitude: 500
mu_x: 50
mu_y: 50
sigma_x: 50
sigma_y: 50


fire:
fire_initial_position: (16, 16)
max_fire_duration: 4
fire_initial_position:
type: static
static:
position: (25, 25)
random:
seed: 1234
max_fire_duration: 5
diagonal_spread: true

environment:
moisture: 0.03
moisture: 0.001

wind:
function: perlin
cfd:
time_to_train: 1000
result_accuracy: 1
iterations: 1
scale: 1
timestep_dt: 1.0
diffusion: 0.0
viscosity: 0.0000001
speed: 19
speed: 19.0
direction: north
simple:
speed: 7
Expand Down
2 changes: 1 addition & 1 deletion docs/source/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ API documentation is autogenerated by [Sphinx AutoAPI](https://sphinx-autoapi.re
If you'd like to add to this documentation, you can create markdown or `.rst` files in the `docs/source` directory, and **add them to the `index.rst`** under the `toctree`:

```rst
fiReLine SimFire Fire Simulator
Fireline SimFire Fire Simulator
===============================
Running The Simulation
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fiReLine SimFire Fire Simulator
Fireline SimFire Fire Simulator
===============================

Running The Simulation
Expand Down
2 changes: 1 addition & 1 deletion docs/source/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

SimFire uses [PyGame](https://www.pygame.org/wiki/about) to display and simulate different fire spread models, including the Rothermel Surface fire spread model described in [this](https://www.fs.usda.gov/rm/pubs_series/rmrs/gtr/rmrs_gtr371.pdf) paper.

[GitLab Page](https://github.com/mitrefireline/simfire)
[GitHub Page](https://github.com/mitrefireline/simfire)

## Running the Simulation

Expand Down
36 changes: 34 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ readme = "README.md"
include = ["simfire/utils/textures/terrain.jpg", "simfire/utils/assets/fireline_logo.png"]

keywords = ["python", "reinforcement learning", "simulation", "fire"]
documentation = "https://fireline.pages.mitre.org/simfire/"
repository = "https://gitlab.mitre.org/fireline/simfire"
documentation = "https://mitrefireline.github.io/simfire/"
repository = "https://github.com/mitrefireline/simfire"

[tool.poetry.dependencies]
python = "~3.9"
Expand Down Expand Up @@ -42,6 +42,8 @@ sphinx-autoapi = "^1.8.4"
sphinx-rtd-theme = "^1.0.0"
myst-parser = "^0.18.0"
furo = "^2022.6.4.1"
sphinxext-opengraph = "^0.9.0"
sphinx-copybutton = "^0.5.2"

[tool.poetry.group.dev.dependencies]
black = "^22.3.0"
Expand Down
2 changes: 1 addition & 1 deletion simfire/sim/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Simulation(ABC):
Base class with several built in methods for interacting with different simulators.
Current simulators using this API:
- `SimFire <https://gitlab.mitre.org/fireline/simfire>`_
- `SimFire <https://github.com/mitrefireline/simfire>`_
"""

def __init__(self, config: Config) -> None:
Expand Down

0 comments on commit 6abe344

Please sign in to comment.