Module resources

Module resources 

Source
Expand description

Resource trait and some implementations.

In many simulated systems, finite resources have to be taken into account. The Resource trait can be used to model such entities.

When a resource is added to a simulation with the create_resource method an ID is returned. The simulation process can request the resource yielding the Request effect with the ID.

The Resource trait allow the implementation of custom resource types. A SimpleResource struct provides a basic but useful implementation of the Resource trait.

Structs§

SimpleResource
A simple resource that is allocated based on a first come first served policy.
SimpleStore
a class that implement waiting on both request and release

Traits§

Resource
The resource trait implemented by every Resource of the simulation
Store
A type of resource where processes can push into or pull from