question

Willie Chung avatar image
0 Likes"
Willie Chung asked Felix Möhlmann edited

Get all machine's Utilization in dashboard

I replicate the same number of machines based on the row count of the Global Table, but in the dashboard, I cannot obtain the Utilization that includes all replicated machines. How can I achieve this? Thank you for your response


File:Question.fsm

FlexSim 23.0.0
copygroupmember
question.fsm (68.9 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Felix Möhlmann edited

The Statistics Collector of the state chart initializes its rows on model reset. So it only tracks objects that were present at the time.

Either install the chart components and initialize the rows at some time > 0 instead.

Or move the code that copies the objects into the On Model Reset trigger (Toolbox -> Modeling Logic).

Or, use the parameter table to vary the number of objects in the group. In has a pre-made option for this that you can select when using the sampling tool on a group.

1708596749826.png


1708596749826.png (11.9 KiB)
· 12
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Willie Chung avatar image Willie Chung commented ·

@Felix Möhlmann I move the code into the On Model Reset trigger and it can run. But the machine did not copy it on the interface, and the following error appeared.


1708599737318.pngFile: Question.fsm

0 Likes 0 ·
1708599737318.png (19.3 KiB)
question.fsm (75.6 KiB)
Felix Möhlmann avatar image Felix Möhlmann Willie Chung commented ·
Moving the code involves more than just copying it. You have to replace references that are not valid anymore (like "token") with new expressions to supply the same data.

As far as I could tell, "token.Machine" was just the numbers from 1 to 5. So you could simply run the code in a for-loop, as many times as there are rows in the table and use the loop variable in place of "token.Machine".

0 Likes 0 ·
Willie Chung avatar image Willie Chung Felix Möhlmann commented ·

@Felix Möhlmann Sorry, I am currently still learning the coding part and not quite sure which references are no longer valid. Could you provide simple examples for me to reference, if possible? Thank you.

0 Likes 0 ·
Show more comments
Willie Chung avatar image Willie Chung commented ·

@Felix Möhlmann I modified the code to increase the number of queues copied, and the numbering will also adjust (Queue1, Queue2...). However, how can I make sure that all Queues can create objects and Operator can move to each Quene?1709044113638.png

File:Model Logic to copy machine.fsm

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Willie Chung commented ·

You could use a list that contains all queues. Then each token pulls a random queue (while leaving it on the list) and the rest of the Process Flow works off of the reference gained by doing so.

Or you design the logic as an Object Process Flow with the plane being the instance object. Copies of the plane would then also become instance objects.

0 Likes 0 ·
Willie Chung avatar image Willie Chung Felix Möhlmann commented ·

@Felix Möhlmann It can create an object in each queue, but when the next cycle begins, the objects overlap in the middle. I cannot find what is causing this.1709091413582.png

File:model-logic-to-copy-machine_autosave.fsm

0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.