A resource models a static object in the system, that events or entitys can use. When a resource is created the current and initial amount are set to am. When report is used, the given histogram is filled with samples of the occupation of the resource. Samples are taken each time release or acquire is invoked. The histogram should be of type WEIGHTED. Furthermore, the histogram is printed each 'interval' time units. If 'interval' is equal to 0 (the default), the histogram is printed only at the end of the simulation. Reset can be used to reset the current amount to the initial. With the method release an amount am of the resource is set free, with acquire an amount am is claimed. Before acquiring an amount am, available should be used to check if this is legal. Full returns TRUE if the resource is full (i.e. as if had just been created) and FALSE otherwise. Empty returns TRUE if the amount left is equal to zero. Left returns the amount left, that can be acquired. Used returns the amount, that already has been acquired. Occupied returns the occupation of the resource in procents. A resource can be written to standard output with the overloaded operator<< function. The initial and current amount and the occupation are printed.


slide: DESCRIPTION