简体   繁体   中英

anylogic how to use stack chart or time stack for seize contains

I wanna represent the number of resources in Seize via stack chart or time stack. What kinds of input should be added in "Value"?

It might be seize.contains ?

Maybe you have a misrepresentation of the situation. There are no resources in the seize block. The seize block finds free resources to use, but you can have many seize or service modules requesting the same resources from the same resourcepool at the same time.

What you really want to represent I think is the amount of resources that have been seized by the seize block and are currently being used. There is no special function for that. You need to create a new variable for instance called numResources initially 0.

In the on seize action of the seize block you do: numResources++;

and in the release block (when the resource is free again) you do in the on enter action: numResources--;

So in your chart you can use numResources to show what you want.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM