Advanced Modelling FeaturesBin
What Is a Bin? |
||
There is often the need for some kind of container or storages in the field of simulation. DESMO-J offers the Bin construct to model these containers. A Bin is characterised by its ability to store items provided by a "producer" process. These items are not distinguishable. The storage capacity of a bin is not limited. A "consumer" process can obtain available items from the bin at any time. If there are not enough items in the bin, the requesting process is automatically inserted into an internal waiting queue until a producer delivers additional items. This construct is exceptionally helpful in producer/consumer models, due to its internal process synchronisation abilities. The desmoj.core.advancedModellingFeatures.Bin class (API) provides two important methods:
|
||
http://desmoj.sourceforge.net/tutorial/advanced/bin0.html |