Closed slwu89 closed 5 months ago
Thanks @slwu89! I understand that Fleck.jl is more a library than a framework - feel free to put in something in the intro as you see fit.
no problem @sdwfrost! Let me know what you think of the revised text.
Thanks @slwu89! Having the extended distributions really helps.
This PR will address #110. @sdwfrost I added a script in the
tutorials/jump_process_fleck
folder that demonstrates how to use Fleck to simulate arbitrary waiting times; I included Dirac and your Gamma(4,1) in the example but as you can see, it is extremely easy to use whatever you'd like!A few notes about Fleck, it is designed for users to build further simulation models upon; it really is just responsible for handling the sampler for the next time and clock. It has a panopoly of sampling algorithms available (first reaction, direct methods, rejection, etc). For this script I used a next reaction method which should be competitive across many distribution types. Because Fleck is more of a tool to build simulation model frameworks rather than a full modeling suite, we need to make a struct to store the state and handle some updating logic.
The gist of Fleck is that you give a sampler a key type that it will use to uniquely identify clocks (i.e. in
CombinedNextReaction{Tuple{Symbol,Int}}
the tuple type is the clock key). You can enable a clock withenable!
passing the sampler, the key, the distribution, the enabling time, the current world time, and an rng. You can disable a clock withenable!
passing the sampler, the key, and the disabling time. You can ask the sampler for the next clock firing time and the key of the corresponding clock withnext
.Please note that we are in the midst of working on a dev push to get some more features in prior to putting Fleck on the general repo, so I may need to update this in a few months. I'm making this a draft PR since I'm not sure how you'd want to explain what Fleck is in the jmd file.