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§
- Simple
Resource - A simple resource that is allocated based on a first come first served policy.
- Simple
Store - a class that implement waiting on both request and release