Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance "bag of clocks", migrate examples to docs and build #55

Merged
merged 14 commits into from
Mar 31, 2024

Conversation

slwu89
Copy link
Collaborator

@slwu89 slwu89 commented Mar 30, 2024

This PR:

  • Enhances the bag of clocks document with a venn diagram showing the various enabling/disabling of clocks when state changes
  • moves constant_birth.jl into docs/
  • makes a new example, sir.jl in docs/
  • deletes the FixedDirect code

I am going to do the PDMP example (#45) in a different PR as it is somewhat complex. Please ignore docs/pdmp.jl for now. Also note the issue #54, for some reason lots of stuff is being dumped into docs/src, I am not sure why.

When merged, this will close #50 and #43

@slwu89 slwu89 requested a review from adolgert March 30, 2024 18:19
@slwu89 slwu89 linked an issue Mar 30, 2024 that may be closed by this pull request
Copy link
Owner

@adolgert adolgert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK! Just a few comments. The main one is whether to represent the SIR state as a vector or three separate counts. That's it. Once you've made your choices, merge it!

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it work if we didn't check in the pngs and the markdown that are created by Literate.jl? That way they aren't part of what we distribute, and they will be made on the fly, just when docs are created.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So do you mean add those to the .gitignore? I wonder if there's any better solution, as then we need to manually add a lot of individual files to the gitignore.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same goes for the markdowns generated. Could we get away with non committing these?


All these sets are visualized in the figure below, reproduced from "Stochastic petri nets: Modelling, stability, simulation" by Peter J. Haas (2002).

![](assets/ClockUpdate.png)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for putting in this section and especially this diagram. Really helpful.

@@ -48,4 +48,4 @@ For a continuous-time simulation, each event happens at a distinct time. Right a

2. A clock may be enabled. For instance, once a person is infected, they can now infect all neighboring people.

3. The rate of a clock may change. We discussed moves on a chessboard earlier. Maybe there's now a breeze so that the right to move right is greater than the rate to move left. The Exponential distributions would change accordingly.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch. Thank you.

docs/src/sir.jl Show resolved Hide resolved
a linear space and the latter works by accumulating survival of a distribution
in a log space.
["Efficient Exact Stochastic Simulation of Chemical Systems with Many Species
and Many Channels"](https://doi.org/10.1021/jp993732q).
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now I feel like I was lazy. I had that paper in front of me.

@slwu89
Copy link
Collaborator Author

slwu89 commented Mar 30, 2024

@adolgert I resolved the SIR state comment. As for the Literate.jl output, I am not sure what is the best solution to avoid committing stuff produced when running make.jl locally to check changes. I guess we could add them manually to the gitignore but that seems brittle, especially those .pngs. After you advise on that as for the best solution, I'm happy to merge this PR.

@adolgert adolgert merged commit 90e48cb into main Mar 31, 2024
7 checks passed
@slwu89 slwu89 deleted the release-issues branch March 31, 2024 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

put examples inside docs directory Delete FixedDirect
2 participants