simpm.des

Discrete Event Simulation primitives for project-management style models.

This module wraps simpy with opinionated helpers for creating entities, resources, and environments that can be logged and observed while a simulation is running. The docstrings are intentionally verbose so that API documentation generated from them provides ready-to-use guidance and code snippets.

Classes

Entity(env, name[, print_actions, log])

Dictionary-like item that moves through a Environment.

Environment([name])

Simulation environment with observer hooks and logging helpers.

GeneralResource(env, name, capacity, init[, ...])

Common bookkeeping shared by all resource types.

PreemptiveRequest(entity, amount, priority, ...)

Request type used for preemptive resources.

PreemptiveResource(env, name[, ...])

Resource with priority-based preemption (capacity is assumed to be 1).

PriorityRequest(entity, amount, priority)

A class defining a priority request for capturing the resources.

PriorityResource(env, name[, init, ...])

Request(entity, amount)

A class defining a request for capturing the resources.

Resource(env, name[, init, capacity, ...])

Exceptions

Preempted(by, resource, usage_since[, message])

Raised when an interruptible activity is preempted by a resource.