Branch Separate Entity and Resource Utilisation

322 views
Skip to first unread message

Hassam Balouch

unread,
Apr 11, 2022, 10:56:08 PM4/11/22
to Jaamsim Users Discussion Group
Hi, 

I have recently discovered Jaamsim for simulation, it's an amazing open-source software.

My first question is "How to separate 3 kinds of entities into 3 different working stations using branch"
I found the answer  for two entity separation 'substring(this.obj.Name,1,17) == "EntityGenerator1" ? 1:2 '
 
Previously  I worked on the arena, is it possible in jaamsim to generate a detailed report such as the number in number out, and the processing rate of every server.

My last question is how to get results of  "Resource Utilization "

Thanks in advance

Harry King

unread,
Apr 13, 2022, 10:47:09 AM4/13/22
to Jaamsim Users Discussion Group
Hassam,

Using the an entity's name in this way does work, but it is ugly and slow. It would be much better to add an attribute to each prototype entity (e.g. 'type') and assign it value as 1, 2, or 3. The input to the Choice keyword for your Branch object would then be this.obj.type.

If, for some reason, it is more convenient to assign a name instead of a number to each entity type, say "a", "b", and "c", then the Choice input would be:
'this.obj.type == "a" ? 1 : (this.obj.type == "b" ? 2 : 3)'

Harry

Harry King

unread,
Apr 13, 2022, 10:53:35 AM4/13/22
to Jaamsim Users Discussion Group
Hassam,

Regarding your other questions:
  • To get a detailed report, set the PrintReport input to TRUE for the Simulation object
  • The utilization of a Resource can be calculated by the expression '[Resource1].UnitsInUseAverage / [Resource1].Capacity'
Harry

Hassam Balouch

unread,
Apr 14, 2022, 3:30:05 AM4/14/22
to Jaamsim Users Discussion Group
Thank you

Hassam Balouch

unread,
May 6, 2022, 2:24:37 AM5/6/22
to Jaamsim Users Discussion Group
Hi Harry, 

I want to know if a entity is passed through pack and add to then how branch can seperate them, 

12.png
three different parts have come into the factory then they are packed and go through add to then how a branch can separate each part?

thanks

Harry King

unread,
May 17, 2022, 1:21:26 PM5/17/22
to Jaamsim Users Discussion Group
Hassam,

Use the Unpack or RemoveFrom object to extract entities from an EntityContainer. For a complex model, it is best to create and destroy EntityContainers explicitly and to use the AddTo and RemoveFrom objects to pack and unpack them.

Harry

Reply all
Reply to author
Forward
0 new messages