Advanced Modelling Features

Res

What Is a Res?

   
 

The desmoj.core.advancedModellingFeautures.Res construct (API) is intended for the simulation of capacity restrained resources within a model. A widely known example for the use of such resources is the "dining philosophers" problem.

DESMO-J's Res objects model pools of non-distinguishable, non-consumable items (resources). A process can request a number of resources via the provide(int n) method and return them via the takeBack(int n) method. If insufficient capacity is available to fill a request, the requesting process is passivated and queued automatically. It will only be re-activated when its request can be filled.

The Res construct



   
  http://desmoj.sourceforge.net/tutorial/advanced/res0.html