question

Alonso avatar image
0 Likes"
Alonso asked Alonso commented

full queues for packaged item

@Felix Möhlmann How would you start with full queues in Queue4, that is, they would be items inside the totes (packaged). A second doubt when the queues are all full the AGV is stopped for a while however at the Central point, which would prevent a second or third AGV from making the route, how would I do to put the AGV off the route waiting to be requested again, I created a CP however, it always returns to the CP which awaits loading, preventing the movement of other AGVs. If you can give me an idea on how I can do this I would appreciate it. I am Sharing to model, thanks.

In this case, the AGV must wait at CP 7 in blue and Queues 4 and 7 start full

Model_AyT.fsm


I tried to change the Queues to start with 50% capacity for packaged items, but the counter does not understand that the Queue is not initially empty.


If anyone can help me I would be grateful, this is a model that I have already been working on but I need to make these changes to optimize the simulation.


Thanks




FlexSim 24.2.0
proces flowqueues
model-ayt.fsm (122.3 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.

Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Alonso edited

Either adjust the reset value of the "ActualQuantity" to what you plan to place in the queue as initial content. Or increment the label while creating/moving the initial inventory.

model-ayt_1.fsm

If you want multiple AGVs to not block each other, you would change the logic to send them to a CP on a side path, so they don't block the main path. Then the logic would determine what the AGV will load, pull all those items and only when all items were pulled (meaning they are available to be picked up), would the AGV start to travel.


model-ayt-1.fsm (125.6 KiB)
· 3
5 |100000

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

Felix Möhlmann avatar image Felix Möhlmann commented ·

Here's the adjusted model.

modelagv7_1.fsm

0 Likes 0 ·
modelagv7-1.fsm (130.8 KiB)
Alonso avatar image Alonso commented ·

@Felix Möhlmann I couldn't find this viewing option, so there isn't a direct option for loading time? I don't quite understand if this is in the script.

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Alonso commented ·

Capacity, usage and recharge rate are set in the AGV network properties (where you also set the speed and acceleration).

To read or change the current battery level use the "batteryLevel" property of the AGV class.

AGV agv = AGV(token.AGV);
agv.batteryLevel = 60;    // Sets battery level to 60%
0 Likes 0 ·
Alonso avatar image
0 Likes"
Alonso answered Alonso commented

@Felix Möhlmann I don't know how to access this option as shown in the photo. Also, I don't know, access the code snippet (Custom Code activity). Is there any way I can use just one process flow to simulate the battery at least once. Imagine that the AGV takes a different route once. I know how to make him go to a CP and stay there for a while, but I don't know how to make him break a cycle and do a different activity.

1737121197940.png


1737121197940.png (46.5 KiB)
· 4
5 |100000

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

Felix Möhlmann avatar image Felix Möhlmann commented ·

That is what the example showcases though, no? At the end of a cycle the token enters a Decide activity. Based on some condition the token is then send to one of multiple outgoing connectors so the AGV will do something different.

The screenshot you copied just shows the code you'd need to set the battery level to 60%. It's not a pre-defined option anywhere. One option to use the code is thus a "Code Snippet" which is a pickoption in the Custom Code activity that just let's you write your own code in the GUI instead of creating pre-determined code.

1737124848982.png

1737124876366.png


1 Like 1 ·
1737124848982.png (19.9 KiB)
1737124876366.png (13.8 KiB)
Alonso avatar image Alonso Felix Möhlmann commented ·

@Felix Möhlmann From what I understand it is necessary to create a custom code, in my model it seems that it skips all the battery below threshold parts and goes straight to the finish TS since the green circle does not go through the other boxes such as travel acquire..

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Alonso commented ·

I don't know if or what changes you made to the model I uploaded. In it, as I said before, the AGV will charge when the battery drops below 20% charge (as set in the Decide activity). This happens around 500s into the model run for the first time (if I remember correctly and this is the model where I increased the battery usage rate).

0 Likes 0 ·
Show more comments
Alonso avatar image
0 Likes"
Alonso answered Felix Möhlmann commented

@Felix Möhlmann Good morning, The battery issue is still very confusing for me, I didn't find the "batteryLevel" property of the AGV class. as you show in the photo. If the purpose is to only make the AGV charge 120 seconds when the charge is equal to or less than 20. Furthermore, after the "reset item label" until the "Finish TS" it seems that the sequence is not recognized, there is something to activate the AGV ? I have doubts? If you can help even though the tutorial is not clear what the scripts are, I would appreciate it if you could help

· 1
5 |100000

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

Felix Möhlmann avatar image Felix Möhlmann commented ·

In the example I provided the token first moves through a Decide activity. It check whether the battery level is below 20%.

1737119205859.png

If that is the case the token moves on through the first connector, acquires a charging CP from the respective group, travels there and starts charging.

The ".startRecharge()" function starts the charge process and returns the time it will take for the battery to reach 100%. Hence in the example I use it to determine for how long the AGV 'delays' on the charge CP.

1737119332817.png

If you only wanted to charge for 120s, then call "startRecharge()" in a code snippet (Custom Code activity) beforehand and just delay for 120s.

0 Likes 0 ·
1737119205859.png (24.8 KiB)
1737119332817.png (23.1 KiB)