SimScript
A Discrete Event Simulation library in TypeScript.
SimScript uses JavaScript's
async/await
features to make simulations easy to write and understand.
SimScript simulations are built using these classes:
-
Simulation:
Simulations create resources (queues) and entities which execute an async script
method that describes the actions each entity should perform.
-
Queues:
Queues represent resources that can be seized and released by entities.
Queues keep track of their utilization and may constrain the flow of entities through
the simulation.
-
Entities:
Entities represent active elements that execute scripts. Scripts are JavaScript methods that
contain instructions for entities. Typical actions are entering and leaving queues,
going through delays, and sending or waiting for signals.
-
Animations:
Animations use HTML or SVG elements to render entities waiting in queues or in transit
between queues.
Animations are useful for presentations and also for debugging simulations.