$
features
event-log
api.ce
import completengine as ce

# Initialize engine with 8 worker threads
engine = ce.Engine(workers=8)

# Define an actor
class Counter(ce.Actor):
    def on_message(self, msg):
        self.state['count'] += 1
        self.send(msg.reply_to, self.state)

# Spawn 1000 concurrent actors
actors = [engine.spawn(Counter) for _ in range(1000)]

# Run simulation
engine.run()
metrics
COMPLETENGINE(1)            User Commands            COMPLETENGINE(1)
NAME
    completengine - concurrent event simulation engine
SYNOPSIS
    completengine [--workers N] [--simulate] [--output FILE]
DESCRIPTION
    completengine is a high-performance concurrent event simulation
    engine designed for modeling complex systems with millions of
    interacting actors. It provides a message-passing concurrency
    model with guaranteed message ordering and configurable
    determinism levels.
OPTIONS
    --workers N
        Set the number of worker threads (default: CPU count)
    --simulate
        Run in simulation mode with deterministic scheduling
    --output FILE
        Write event log to FILE (default: stdout)
SEE ALSO
    completengine-actors(3), completengine-scheduler(7)