Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Attention: The newest changes should be on top -->

### Added

- ENH: Reproducible Monte Carlo seeding, and an append that continues the same study [#1187](https://github.com/RocketPy-Team/RocketPy/pull/1187) [#1053](https://github.com/RocketPy-Team/RocketPy/issues/1053) [#1075](https://github.com/RocketPy-Team/RocketPy/issues/1075)
- ENH: Support fixed-time parachute deployment triggers [#1133](https://github.com/RocketPy-Team/RocketPy/pull/1133) [#437](https://github.com/RocketPy-Team/RocketPy/issues/437)
- DOC: Add SIL parachute ejection integration example [#1131](https://github.com/RocketPy-Team/RocketPy/pull/1131) [#524](https://github.com/RocketPy-Team/RocketPy/issues/524)
- ENH: List NOAA atmosphere datasets and fetch latest [#1136](https://github.com/RocketPy-Team/RocketPy/pull/1136) [#660](https://github.com/RocketPy-Team/RocketPy/issues/660)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,9 @@
"Finally, let's simulate our flights. \n",
"We can run the simulations using the method `MonteCarlo.simulate()`.\n",
"\n",
"Set `append=False` to overwrite the previous results, or `append=True` to add the new results to the previous ones.\n"
"Set `append=False` to overwrite the previous results, or `append=True` to add the new results to the previous ones.\n",
"\n",
"An append carries on the study already in the file. Every input row records the seed root it was drawn from, so the seed does not have to be given again, and one that disagrees with the rows is refused rather than mixed in. A log written before this behaviour existed carries no root, so an append onto one is refused too: run the study again to write a log that can be continued.\n"
]
},
{
Expand Down
17 changes: 17 additions & 0 deletions docs/user/stochastic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,23 @@ draws under a fixed seed. The rocket's own inputs, such as ``mass`` and
one model. Sharing one between two components leaves each of them seeding it
from their own child, and the last one to be reset decides what both draw.

.. note::
A whole run is fixed by ``MonteCarlo.simulate(random_seed=...)`` rather than
by seeding these models yourself. Each simulation takes its seed from its own
index, so simulation 7 draws the same inputs whether the run was serial or
split over any number of workers, and whether it was reached first or last.
Every input row records the root it came from, so appending carries that
study on whether or not the seed is given again, and a different one is
refused rather than mixed in. Without a seed a run draws fresh entropy and
reproduces nothing.

An index fixes the draw, not the object it is drawn around. Where the note
above says a value follows its deterministic object, moving that object
between runs still moves what is sampled, however the seed was set. A
``CustomSampler`` that draws from the process-global ``numpy.random``
rather than from the generator it is handed sits outside all of this, as
:ref:`custom_sampler` warns.

Conclusion
----------

Expand Down
Loading
Loading