Skip to content

Commit

Permalink
Documentation/sbachmei/mic 5097 5221 concepts (#471)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevebachmeier committed Aug 28, 2024
1 parent 2badecb commit adc675c
Show file tree
Hide file tree
Showing 9 changed files with 452 additions and 34 deletions.
5 changes: 3 additions & 2 deletions docs/source/concepts/lifecycle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ during a simulation.
* - | :ref:`Main Loop <lifecycle_main_loop>`
- | The core logic (as encoded in the simulation components) is executed.
* - | :ref:`Simulation End <lifecycle_simulation_end>`
- | The population state is finalized and results are tabulated.
- | The population state is finalized and results are tabulated and written
| to disk.
The simulation itself maintains a formal representation of its internal
execution state using the tools in the :mod:`~vivarium.framework.lifecycle`
Expand Down Expand Up @@ -197,4 +198,4 @@ simulation end. It is split into two states. During the first, the
signal that the event loop has finished and the
:ref:`state table <population_concept>` is final. At this point, final
simulation outputs are safe to compute. The second state is *report* in
which the simulation will accumulate all final outputs and return them.
which the simulation will accumulate all final outputs and write them to disk.
48 changes: 41 additions & 7 deletions docs/source/concepts/model_specification/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@
The Model Specification
=======================

.. contents::
:depth: 2
:local:
:backlinks: none

.. toctree::
:hidden:

yaml_basics

A :term:`model specification <Model Specification>` is a complete representation
of a :mod:`vivarium` simulation formatted as a yaml file.

Expand All @@ -19,10 +29,11 @@ Each of these blocks is delineated by a top-level key in the yaml file:
You can find a short intro to yaml basics
:ref:`here <model_specification_yaml_concept>`.

.. contents::
:depth: 2
:local:
:backlinks: none
The Plugins Block
-----------------

.. todo::
describe plugins

The Components Block
--------------------
Expand Down Expand Up @@ -85,7 +96,30 @@ call on either of the above yaml components block examples would be a list
containing three instantiated objects: a population object, a mortality object,
and a diarrhea disease model.

.. toctree::
:hidden:
The Configuration Block
-----------------------

yaml_basics
The configuration block of the model specification file contains any information
necessary to configure the simulation to run, including (among other things)
key columns to be used for common random number generation, the simulation
start and end times, step size, and the population size.

.. code-block:: yaml
configuration:
randomness:
key_columns: ['entrance_time', 'age']
time:
start:
year: 2022
month: 1
day: 1
end:
year: 2026
month: 12
day: 31
step_size: 0.5 # Days
population:
population_size: 100_000
age_start: 0
age_end: 5
Loading

0 comments on commit adc675c

Please # to comment.