Need to fix my agv

Need to fix my agv

jorgeobis
Contributor Contributor
628 Views
17 Replies
Message 1 of 18

Need to fix my agv

jorgeobis
Contributor
Contributor

Hey I hope you are doing well.

 

I need to fix my agv model, it doesn't work like I want.

 

You can see it's a milk-run model. where the preparation of the boxes start when train puts empty boxes on the warehouse. but train doesn't do what I want. For moments, he takes boxes, for moments no, when they have full boxes and deliver it on the stations and can get empty boxes, it doesn't do that.

 

Can you tell me some help?

 

Thank you!

0 Likes
Accepted solutions (1)
629 Views
17 Replies
Replies (17)
Message 2 of 18

FelixMoehlmann
Collaborator
Collaborator

I see two things that you should change/fix:

- The Process Flow Variable "UnloadToEmpty" is set to 1. Whenever the AGV unloads an item this causes it to stay in "unload mode" until it has no more loaded items. During that time it will not load any items.

- The "NextLookForWork" loop in your model is actually two distinct paths for most of the area. The CP at Queue1 doesn't have an incoming connection, meaning the AGV will only ever bring items there while in "unload mode". If it doesn't travel to Queue1 but Queue2 (because it couldn't fully load for example) it won't unload any items on the run because the "NextLookForWork" loop starting from Queue2 only visits CPs where items would be loaded.

moehlmann_fe_0-1755153305867.png

 

If you want the AGV to be able to unload/load in the same run, you should have a single loop with connections only between consecutive CPs and set the "UnloadToEmtpy" variable to 0.

Message 3 of 18

jorgeobis
Contributor
Contributor

Thank you so much!!

 

I implemented what you told me and it helped me so much.

 

I got a new question about the model. Here we have a scenario where the warehouse start preparing the boxes when the train deliver the empty boxes to the warehouse.

 

I put in the boxes a fixed schedule, but sometimes the source make more boxes than boxes which arrive the warehouse (sometimes train deliver 1-1-2-2-3 empty boxes and warehouse makes 2-2-2-2-3) (Warehouse always make the maximum boxes every source can). I want, for every source, only prepare the boxes needed ( train deliver 1 from S1, 1 from S2, 2 from S3, 2 from S4 and 3 from S5) then warehouse prepare 1-1-2-2-3 only. How can I programme this?

 

Thank you!!

0 Likes
Message 4 of 18

FelixMoehlmann
Collaborator
Collaborator

@jorgeobis 

I posted an answer to your new question which seems to be the same as this follow up. Hope that helps.

https://forums.autodesk.com/t5/flexsim-forum/milk-run-kanban/m-p/13770906#M97651

Message 5 of 18

jorgeobis
Contributor
Contributor

Yes, I just saw it.

The difference between one and the other is the moment in which the preparation of the elements begins.

In scenario 3 (this thread) the preparation begins when the train leaves the empty boxes in the warehouse, while in scenario 4 the preparation begins every time it picks up an empty box from the stations (e-kanban) --> When train picks up an empty box from S1, the preparation of 1 box to S1 start...

You answered me for scenario 4 (e-kanban) but for scenario 3 would it be the same methodology?

0 Likes
Message 6 of 18

FelixMoehlmann
Collaborator
Collaborator

Yes, you can use the same method. You'd only need to change what queues the Event-Triggered Source listens to (the queues in the "TriggerQueues" group) and adjust the expression that gets a reference to the processor from the queue (only one "inObjects[1]" instead of four).

0 Likes
Message 7 of 18

jorgeobis
Contributor
Contributor

How can I configure my agv, to always make 30 minutes cycle time.

 

I mean, in some cycles the agv will take more boxes or less so it will take more or less, but that time will always be less than 30. I want it to make a stop before starting the next cycle until it reaches that time of 30 minutes, that is. The agv leaves and time begins to count, because until the next departure, I want it to make a stop earlier and leave every 30 minutes. Some cycles, for example, will arrive at the stop when 17 minutes have passed, and will wait 13 minutes. In others, it will arrive when 20 minutes have passed, since it will wait 10 minutes. In other words, in some cycles, it will make more stops, so it will arrive later at the end of the route, but at that end I want it to wait the corresponding time until it reaches 30 minutes, so it will always make 30-minute cycles.

0 Likes
Message 8 of 18

jorgeobis
Contributor
Contributor

Heyy I got a question.

 

As you can see in my model now, I share photo.

 

in every control point there are two inputs, in one of those the batch is 80 units and in other 1 unit. What I want is that my agv only load units when he can load 80+1. I mean sometimes, he loads 80 from 1 queue and in the next cycle he load 1 from the other queue, I want that my agv just load 80 units from 1 queue and 1 item from the other, always take 80+1 and then deliver that 80+1.

 

Thank you!!

jorgeobis_0-1756984508757.png

 

0 Likes
Message 9 of 18

FelixMoehlmann
Collaborator
Collaborator

A solution that doesn't require any custom logic could be to pack the 80 items into the 1 with a combiner and only send that entire pack. Place a separator at the destination that unpacks the items again.

 

The 30min cycle time can be achieved by modifying the AGV Process Flow a tiny bit. See activities marked orange in the attached model. Of course you would need to adjust which CP is used in the Decide activities.

0 Likes
Message 10 of 18

jorgeobis
Contributor
Contributor

Heyyy Thank you!!

 

Talking about the cycle time, I implemented but it doesn't go well.

 

I share my model if you can check it, the first cycle starts at second 3800, next then have to start at second 5600,7400,9200...

 

As you can see in the mode he doesn't do the cycle right, please tell me how to fix it!!

 

Thank you!!

0 Likes
Message 11 of 18

jorgeobis
Contributor
Contributor

to be exact the first cycle starts at second 3840, so the next cycles has to start at seconds: 5640,7440,9240,11040...

 

Thank you!!

0 Likes
Message 12 of 18

FelixMoehlmann
Collaborator
Collaborator

You didn't put any condition into the Decide activity. I changed the AGV flow so the AGV is immediately 'active' (doesn't wait for any item to appear on the work list). And I edited the delay activity so that the initial delay is 3840s and further delays wait until 30 minutes have passed since the last time. (If a round-trip takes longer than 30 minutes the AGV will continue immediately and the current time will be the new reference for the 30 minute cycle)

0 Likes
Message 13 of 18

jorgeobis
Contributor
Contributor

What I see now, is that my agv starts at second 3840 as before, but now doesn't take and deliver the boxes as before and doesn't make the stop the make cycles of 30 minutes.

 

For example take the empty box of station 1 but now the agv doesn't deliver it to the empty queue as before.

0 Likes
Message 14 of 18

jorgeobis
Contributor
Contributor

This is my model, Ok in the absence of configuring the stop of the agv to only make cycles of 30 minutes, I have to implement here in this model

0 Likes
Message 15 of 18

FelixMoehlmann
Collaborator
Collaborator

Remove the second row from the schedule source in the AGV flow. A second token will break the logic.

I made a mistake with the code that determines the delay. It should instead be the following:

double lastResumeTime = token.labels.assert("LastResumeTime", 2040).value;
double delayTime = Math.max(lastResumeTime + minutes(30) - Model.time, 0);

token.LastResumeTime = Model.time + delayTime;

return delayTime;
0 Likes
Message 16 of 18

jorgeobis
Contributor
Contributor

What do you mean to the second row from the schedule source in the agv flow?

0 Likes
Message 17 of 18

jorgeobis
Contributor
Contributor

jorgeobis_0-1757072546205.png

I implemented the code but it doesn't work, it will be because of the second row you mean but I'm not getting it where to remove it.

 

Please tell me, thank you

0 Likes
Message 18 of 18

FelixMoehlmann
Collaborator
Collaborator
Accepted solution

In the "On Simulation Start" source (top left of the AGV flow). I assume you added it when trying to implement the cycle time.

moehlmann_fe_0-1757076100225.png

 

0 Likes