0
votes

I'm trying to send agents (let's say pallets) being created in one single source to various end nodes. I am using a simple seize, moveTo, and release command for all the agents, and having workers complete the task. What would be the best way to do the following:

Source creates 10 pallets 1. The first 5 is sent to rectangular node 1 2. The second 5 is sent to rectangular node 2

Ideally, I would love to do this using an imported database using the parameter destination for the 10 pallets (similar to how tecnomatix uses the attribute "destination"), but I can't seem to make this work - or even know whether this is possible. Thank you so much for any input!

1
why don't you do it with a simple selectOutput... or with dynamic variable in the moveTo block? Have you tried that?... What have you tried that didn't work? - Felipe
Hi Felipe, I ended up using a dynamic variable in the moveTo block, utilizing the collection agent and function findFirst(). Thank you - Max

1 Answers

0
votes

The idea is to add all end nodes (all your destinations) to a collection (in my example, the collection was named "destinations"), set the "Source' block to read names of the destinations for the new pallets from the built-in database (my database includes a column titled "db_destination" that includes a list of various end nodes that I want each of my item to transport to), and find the node corresponding to the destination name of the pallet in the collection using the function findFirst().

Source block

  1. Click - Set Agent parameters from DB
  2. set your Database table
  3. In your Agent section, include agent parameters mapping: destination - db_destination

moveTo block

  1. Destination: Network/GIS node
  2. Node: findFirst(destinations, d -> d.getName().equals(agent.destination))

Thank you!