You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/index.md
+5-7Lines changed: 5 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,23 +37,21 @@ or to calculate the likelihood of a sample path for statistical estimation.
37
37
38
38
## Usage
39
39
40
-
The library provides you with samplers. Each sampler has the same interface. Here, a distribution is a [Distributions.ContinuousUnivariateDistribution](https://juliastats.org/Distributions.jl/stable/univariate/#Continuous-Distributions), `RNG` is a [random number generator](https://docs.julialang.org/en/v1/stdlib/Random/#Generators-(creation-and-seeding)), the `key` is some identifier (maybe an integer) for the event, and an enabling time is a zero-time for the given distribution.
40
+
The library provides you with samplers. Each sampler has the same interface. Here, a distribution is a [Distributions.ContinuousUnivariateDistribution](https://juliastats.org/Distributions.jl/stable/univariate/#Continuous-Distributions), `RNG` is a [random number generator](https://docs.julialang.org/en/v1/stdlib/Random/#Generators-(creation-and-seeding)), the `key` is some identifier (maybe an integer, tuple, or pair) for the event, and an enabling time is a zero-time for the given distribution.
41
41
42
42
*`enable!(sampler, key, distribution, enabling_time)` - to start the clock on when an event will fire next.
43
43
44
44
*`disable!(sampler, key)` - to turn off an event so it can't fire.
45
45
46
-
*`next(sampler)` - to ask this library who could fire next.
46
+
*`next(sampler)` - to ask this library who could fire next, and it return a (time, key).
47
47
48
48
*`fire!(sampler, key, time)` - choose which event happens at what time.
49
49
50
-
Different samplers are specialized for sampling more quickly and accurately for different applications. For instance, some applications have very few events enabled at once, while some have many. Some applications use only exponentially-distributed events, while some have a mix of distribution types. Because continuous-time discrete event systems can fire many events, the literature has focused on reducing the number of CPU instructions required to sample each event, and this library reflects that focus.
51
-
52
50
## When NOT to use Competing Clocks
53
51
54
-
***Pure exponential distributions?** JumpProcesses.jl is a complete framework for this.
55
-
***Need ODE coupling?** Again, it's easier to stay within SciML and JumpProcesses.jl.
56
-
***Want high-level frameworks?** Try Agents.jl.
52
+
***Pure exponential distributions and chemical systems?** JumpProcesses.jl is a complete framework for this.
53
+
***Need ODE coupling?** Again, it's easier to stay within SciML and JumpProcesses.jl. CompetingClocks.jl supports ODEs as Dirac distributions.
54
+
***Want high-level frameworks?** Try [Agents.jl](https://juliadynamics.github.io/Agents.jl/stable/) or [ConcurrentSim.jl](https://juliadynamics.github.io/ConcurrentSim.jl/stable/).
Copy file name to clipboardExpand all lines: docs/src/low_level_interface.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,10 @@
2
2
# Low-level Sampler Interface
3
3
4
4
The main interface to the package is the [`SamplingContext`](@ref).
5
-
Within that class are the samplers themselves. This describes their interface.
5
+
The `SamplingContext` contains sampling algorithms and other helper classes. This describes the interface to underlying sampling algorithms, which differ slightly:
6
+
7
+
* They don't hold a random number generator internally so it is passed as an argument.
8
+
* All input times are absolute, so the enabling time of a distribution is given in absolute time.
0 commit comments