question

Ajay M avatar image
0 Likes"
Ajay M asked Ajay M edited

How data in Global Table can be added to Advanced AGV templete to load & unload

Hello all,

Now I am using the default Advanced AGV template for my work (one in the below pic)

1673249356522.png

As part of my work I created a two coloumns of pickup and drop off locations in my global table

1673249620080.png

Now I would like to add the above global table data of pickup locations in load process (in below pic) and droffoff locations in the unload process (in below pic )

1673249569783.png

When i assigned this global table in unload process AGV is not recognising the desinations

Please, can anyone suggest me how to solve this issue

FlexSim 22.2.2
agv process flowglobal tablesload and unloadpickup pointdropoff
1673249356522.png (82.4 KiB)
1673249569783.png (144.6 KiB)
1673249620080.png (7.9 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 Ajay M edited

The AGV Process Flow Templates use control point connections to refer to pickup and dropoff points (as well as other types), as is explained in the tutorial.

If you want to automate the process of adding those connections than you can use the commands below the model reset trigger to adjust the connections based on the data in the table.

/* Add a connection; connectionType should be the row of the wanted connection the "Control Point Connections" list in the AGV properties (for example 5 for pickup) */
function_s(fromPoint, "addConnection", connectionType, toPoint)

// Remove a connection; only works automatically if there is only one connection present
contextdragconnection(fromPoint, toPoint, "Q");
· 13
5 |100000

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

Ajay M avatar image Ajay M commented ·

@Felix Möhlmann Thankyou very much for your answer. Could you guide me where I should add this code?

Should I have to add it into the Globallists/Dropoffpoints ? if so in to which expression lable I should attach the code?


0 Likes 0 ·
Jeanette F avatar image Jeanette F ♦♦ Ajay M commented ·

Hello @Ajay M,

From reading @Felix Möhlmann answer, I believe he intended you to put the code in a model reset trigger.

1673365329955.png

0 Likes 0 ·
1673365329955.png (44.3 KiB)
Ajay M avatar image Ajay M Jeanette F ♦♦ commented ·

Thankyou very much @Jeanette F for your reply. I added the above code into Model reset trigger but it was showing an error in the below pic. Could you please help me?

1673423246429.png

0 Likes 0 ·
1673423246429.png (28.3 KiB)
Felix Möhlmann avatar image Felix Möhlmann Ajay M commented ·

Since you approached FlexSim Germany by E-Mail I got to see your model and now have (I think) a better understanding of what you want to achieve.

In terms of the AGV Process Flow template, Pickup and Dropoff Points are surrogate positions that allow an AGV to load/unload at multiple different control points per location. My original answer assumed that your question was aimed at this.

If I understood your model correctly, your goal is to just determine the destination of the item, depending on where it was loaded from, correct?

To do that, I would not change the Process Flow at all. It assumes that the target destination of the item is present as a label called "destination" on the item. So what you can do is write that label onto the item in the "On Exit" trigger of the queues, by searching for the row that contains the current queue in the "PickUpPoint" column and writing the corresponding "DropOffPoint" value to the label.

// Find destination from table
Table PP1 = Table("PP1");
int row = PP1.getRowByKey(current.name, 6);
item.destination = Model.find(PP1[row][7]);


There are also some more issues in your model:

- Every control at which an AGV might end up at after a task should have a "NextWorkPoint" connection, so the AGV continues to travel after the task is done. Otherwise it would get stuck.

- The Process Flow only looks at the first connection of any type. So a control having more than one "NextWorkPoint" connections will not have any effect. The Process Flow template is build on the assumption that those connections form a loop, with outlying points being incorporated through work forwarding.

- You also have to make sure that only a single AGV can enter dead end paths at a time, otherwise the AGVs might cause a deadlock situation. You can use a control area for this.


I'll attach a modified version of your model, I hope that is Ok. Items are only created at P2 and are transported between the queues Q2, Q4 and Q8. Other rows in the PP1 table contain queue names that are not actually present in the model (Q5, Q7), so I left those out for now.

The relevant queues have the On Exit trigger set and the AGV Process Flow was replaced by a new, unaltered one.

Discussion2_1.fsm

0 Likes 0 ·
discussion2-1.fsm (146.3 KiB)
Ajay M avatar image Ajay M Felix Möhlmann commented ·

Respected @Felix Möhlmann

Your response is really fantastic! Yes, my objective is to determine an item's destination depending on where it was loaded.

Your logic almost answered my problem, but I have one more question for you.

I created two flow items in the above model and allocated them to different processors.

If you look at this model, Processor P1 processes two different flow items at the same time, and Q1 receives both flow items.

1673432115495.png

And these both flow items have different destinations where they should reach

Here in this model discussion2-1_2flowitems.fsm

Flowitem 1 loaded from Q1 and its Destination is D1 and

Flow item 2 loaded from Q1 and its Destination is Q5

I modified your logic in 'On Exit' trigger of Q1 to achieve the above scenario, instead AGV is delivering both the items to Q5

Could you please help me in solving the above scenario?




0 Likes 0 ·
1673432115495.png (34.7 KiB)
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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