odem-rs-sync 0.2.0

Model-time synchronization facilities of the ODEM-rs simulation framework
Documentation

ODEM-rs Sync

odem-rs-sync provides synchronization primitives and communication structures for agent-job interactions in ODEM-rs simulations.

Features

  • Internal cooperative concurrency by extending simulation contexts with forking.
  • MPMC channels to connect agents.
  • Control expressions allow modeling state-events in addition to the standard time-events provided by the scheduler.
  • A GPSS-inspired facility to model exclusive resources.

Dynamically sized backing stores for the channels require the alloc-feature. Channels themselves can either be created on the heap using a free channel-function like in Rust's standard library which requires alloc as well, or pinned on the stack for the no_std solution. Everything else is no_std.

Installation

This crate is meant as a dependency to the odem-rs entry crate, but it is possible to use it in combination with the simulator core defined in the odem-rs-code crate. To install, add the following line to your Cargo.toml.

[dependencies]
odem-rs-sync = "*"

License

Licensed under MIT. See LICENSE for details.