# \[ANN\] CompetingClocks.jl 0.2.0 - Simulation Sampling with Likelihoods

**URL:** <https://discourse.julialang.org/t/ann-competingclocks-jl-0-2-0-simulation-sampling-with-likelihoods/134228>\
**Category:** Package Announcements\
**Created:** [November 29, 2025, 10:00pm UTC](https://discourse.julialang.org/t/ann-competingclocks-jl-0-2-0-simulation-sampling-with-likelihoods/134228 "2025-11-29T22:00:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adolgert](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adolgert/32/20286_2.png) [@adolgert](https://discourse.julialang.org/u/adolgert)\
**Post date:** [November 29, 2025, 10:00pm UTC](https://discourse.julialang.org/t/ann-competingclocks-jl-0-2-0-simulation-sampling-with-likelihoods/134228/1 "2025-11-29T22:00:11Z")

</div>

# Overview

CompetingClocks.jl is a sampling engine, not a simulation framework. It answers: what fires next, when, and how likely is it? Plug it into any simulation—agent-based models, queueing systems, chemical kinetics—without adopting a DSL or state management layer.

# Features

- Added 2 new samplers for a total of 11: Exact Rejection-based Stochastic Simulation Algorithm (RSSA), and Partial-Propensity SSA with Composition–Rejection (PSSA-CR).
- Calculates probability density of a next event or **path-log-likelihood** of a sequence of events for use with statistical tools like Gen.jl and Turing.jl. Can be used as a likelihood calculator without actually sampling.
- API includes **delayed reactions** with support for cancellation of delayed reactions.
- **Importance sampling** can use mixture proposals efficiently.
- Sampler now holds the current time and list of enabled events.
- Extensive statistical testing of every sampler.
- New interface to hierarchical samplers in order to optimize performance.

# Migration Notes

- The v0.1.0 sampler interface remains supported.
- The new interface uses fire!() to mark event completion (which also disables the clock).
