question

shanice.c avatar image
0 Likes"
shanice.c asked Felix Möhlmann answered

Getting Processor and Queue status data and write to GlobalTable continuously

In my example, I would like to build an Equipment table, a Queue table, an AGV table, these tables are updated through process flow token continuously. The reason I build these tables is because I hope AGVs could get the whole system conditions by querying these tables, then determine a task to execute. Following are my problems.

Firstly, I use an example model without AGV as an example. Since unknown reason, there exists model limit, I have attached 2 files under this paragraph, two custom code structures are same, but one model is for Queue, another is for Processor. I have problem with getting the time of one Processor/Queue receive a new flow item, as well as the time of one Processor/Queue send a flow item out. In the beginning I use getentrytime(), but found this command seems to be used for flow item rather than used for Processor or Queue. In my EQTable, I'd also like to know the time that Processor complete a processing. I still can't find proper command to refer entrytime, exittime, completion time of Processor and Queue. Since there are a large quantity of Queues and Equipment in our plant, we prefer getting these values in code. Previously, we use Trigger on entry, on exit to get these data we need , but it took us a long time to set these parameters, also exists some typos or mistakes, so we'd like to get all data we need in code if possible.

Example Table_EQ.fsm

Example Table_Queue.fsm


Secondly, I hope to use the same custom code above, but use in a model with AGV network. I found that the Queue and Processor status are different from what they seem to be. The AGV load a box to Queue1, and the input quantity from properties window is 1, but in the status field shows the Queue status is empty, so that the data I try to write into table is incorrect. Similar problem occur in Processors, AGV send a box to Processor1, but the Processor2, Processor3, Processor3 properties status are all processing. I couldn't understand why this would happen.

AGV Table.fsm


Thirdly, although there's already built-in AGV process flow in flexSim. Since the logic AGV looking for tasks is quite different from our company case. So our team hopes that we could try to custom our AGV process flow, which is built based on our dispatching logic. And by using Queue Table and Equipment Table and AGV Table mentioned above as a database. Is this a feasible way to build a AGV model? To build this logic from scratch, is there any structure we can refer to?

Thank you very much!

FlexSim 21.1.4
flexsim 21.1.4status
agv-table.fsm (131.6 KiB)
example-table-eq.fsm (118.4 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

I'm not aware of a command to get the entry/exit time of an item after the fact. But the amount of objects in the model is not really a reason to not use triggers, as you can simply define them on one of the objects and then copy them to all other objects in the group.

To do this, open the "Edit Selected Objects" window under "View" in the top bar. By default it will appear as a second tab next to "Properties" on the right. Mark all objects from the group by box selecting, ctrl clicking or directly from the group interface. (You unmark the objects by holding "shift" and clicking on an empty space in the model).

select-group.pngThen, click on the object on which you defined the triggers to select it (yellow border). Under "Copy From Highlighted" select all triggers and click on the "Copy" button. Now all marked objects will have the same triggers as the selected object.

copy-triggers.png

Alternatively, you could use an instanced process flow, where you wait for entry/finish/exit events and update the table immediately afterwards.

For your agv model. The shown states are wrong because you accidentally assign them in your custom code. In the if-statements you used "=" instead of "==".

If you haven't already done so, I would recommend to read through the manual about task logic in general and AGV paths in particular.
https://docs.flexsim.com/en/21.1/WorkingWithTasks/AGVNetworks/KeyConceptsAGVNetworks/

In general, you can use AGV paths with the same logic you would use for task executers otherwise (Travel, Load, Unload activities etc.)


select-group.png (165.1 KiB)
copy-triggers.png (150.6 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.