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.
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.
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!