A typical simulation program, employing the sim library, creates and runs an application derived from the session class. The session::main function then contains the creation of a simulation object, which makes it possible to use the simulation primitives. It creates the participating events and entities, which are derived from the corresponding abstract classes and which are given functionality in their function operators. Furthermore the required resources and queues are created. The resources represent passive objects used by events while queues are used by events waiting on a resource to become free. Histogram and analysis objects can be created to gather and analyze results. Before running the simulation, it should be set up by scheduling some events or entities depending on the type of simulation.