Routing and filling different EntityContainer types

396 views
Skip to first unread message

chris....@gmail.com

unread,
Dec 8, 2014, 3:54:38 PM12/8/14
to jaamsi...@googlegroups.com
Currently I'm trying to utilize different containers that are designed to hold different numbers of entities. They will hold entities that are being removed from the same queues. This is causing some issues with routing and filling the containers so I'm hoping that I'm either misusing the Branch and AddTo objects or that there is a workaround that I'm just not thinking of.

A couple questions about how I might address the specific challenges I'm running into:

A) Branch Object
Is there a way that Branch can direct to different NextComponent paths based on the prototype/entity type?

In other words, two different containers will follow the same path until they need to branch in different directions based on their types. For example, defined type 'EntityContainer_TypeABC' will go to Branch Choice 1 and defined type 'EntityContainer_TypeDEF' will go to Branch Choice 2 based on their different defined types. Since Branch requires a single prototype to be defined in 'TestEntity', it appears to be impossible to compare a defined variable from each of these two different types so I am hoping there is a way to instead branch based on the type.

B) AddTo Object
Is there a way for multiple AddTo objects to remove entities from the same queue without eventually causing a crash condition in which one of the AddTo objects removes from an empty queue?

Thanks in advance for any advice!

Chris

Harry King

unread,
Dec 9, 2014, 10:08:44 PM12/9/14
to jaamsi...@googlegroups.com, chris....@gmail.com
Chris,

Using the same queue for two Seize, Server, or AddTo blocks will not work correctly in the present version of JaamSim. There is no mechanism for the various objects to coordinate their removal of entities.

A) The Branch object cannot direct entities based on their type because there isn't any function for expressions to make this identification. Instead, provide the entities with an attribute that can be used to make the decision. Ideally, the two types of objects should differ in only their inputs, but the above method will work okay for different entity types as long as both have the same attribute.

B) Each AddTo object needs to have its own queue of entities. Sharing the same queue will cause trouble.

Can you describe how you want your model to work? Perhaps, we can help you with the design.

Harry

Harry King

unread,
Jan 8, 2015, 8:42:19 PM1/8/15
to jaamsi...@googlegroups.com, chris....@gmail.com
Chris,

Queues can now be shared between Servers, Seize blocks, etc. See the post with the release notes for 2015-01 for more details.

Harry
Reply all
Reply to author
Forward
0 new messages