question

Lorenzo_pio G avatar image
0 Likes"
Lorenzo_pio G asked Jeanette F commented

Application of reinforcement learning on a robot

1665234839424.png

Hi! That's my model. I wanto to apply Reinforcement Learning to the robot called Robot1. The idea is that the robot, based on the number of boxes on the pallet placed on combiner1, should choose on which combiner to deposit the box. Each pallet collects 10 boxes before passing the load to the left queue. Robot1 should help Robot2 load the boxes on the pallet present on combiner1 until the number of boxes on the pallet becomes more than 6. As soon as this happens, Robot1 must start carrying the boxes on the combiner called "Impacchettamento" First I want to identify as a variable the instantaneous number of boxes on the pallet present on combiner1. Next I want to identify as an integer the combiner that robot1 is using. I need these variables to identify the observations and actions of the RL.

Bakery1.fsm

FlexSim 22.1.3
robotreinforcement learningcombiners
1665234839424.png (225.8 KiB)
bakery1.fsm (422.9 KiB)
· 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.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Lorenzo_pio G, was Felix Möhlmann's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Lorenzo_pio G commented

You should start by building a control logic that allows the two robots to act independently from one another, instead of just having them execute transport tasks generated by the queue. For example, you can have the queue push the items to a list and the use a process flow, in which tokens (that represent the robots) pull those items off the list. They can then decide where to unload them depending on whether there are pallets present on either combiner and how full those are.

This tutorial deals with task dispatching using lists.

The following expression would check if there is pallet on combiner1 and whether it holds more than 6 items.

Model.find("Combiner1").subnodes.length > 0 && Model.find("Combiner1").first.subnodes.length > 6
· 46
5 |100000

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

Lorenzo_pio G avatar image Lorenzo_pio G commented ·

So do you recommend that I use Process Flow? Isn't there an alternative?

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Lorenzo_pio G commented ·
Yes, I would recommend Process Flow. In theory you can do anything by writing custom code into the trigger functions and other options of the 3d objects. But Process Flow gives you most of the code you'll need in pre-defined activities and the visual nature makes it much easier to follow the logic you are building and debug any problems.
0 Likes 0 ·
Lorenzo_pio G avatar image Lorenzo_pio G Felix Möhlmann commented ·

If I eliminate a robot should I still use process flow?

0 Likes 0 ·
Show more comments