Skip to main content

Crate aika

Crate aika 

Source
Expand description

§Aika

A Rust-native coordination layer for multi-agent systems supporting single-threaded and multi-threaded execution. Built on discrete event simulation principles from the 1980s-90s.

§Architecture

  • st - Single-threaded discrete event simulator.
  • mt - Multi-threaded discrete event simulators. Currently a hybrid synchronization model is under construction.
  • objects - Internal simulation objects, like Event or Msg.
  • actors - Actor traits and context.

Modules§

actors
Agent traits and execution contexts for both single-threaded and multi-threaded simulations. Provides Agent trait for single-threaded clusters and ThreadedAgent for multi-threaded planets, along with their respective context structures that manage state and inter-agent communication.
env
mt
Multi-threaded simulation execution with support for optimistic and conservative synchronization. Currently implements hybrid synchronization based on Clustered Time Warp architecture for parallel discrete event simulation across multiple threads.
objects
Core data structures for simulation including messages, events, and scheduling primitives. Contains Msg for inter-actor communication, Event for actor scheduling, AntiMsg for optimistic rollback, and local event/mail systems for efficient time-based scheduling.
prelude
st
Single-threaded simulation world supporting multiple actors with message passing capabilities. Provides a LonePlanet struct that manages actor execution, event scheduling, and local message delivery in a deterministic single-threaded environment with configurable time bounds.

Macros§

stager
world

Enums§

AikaError
Error enum for provide feedback on simulation errors