Dynamic Scheduling

All topics specific to modeling questions in Enterprise Dynamics
Post Reply
Katinka
Posts: 23
Joined: Thursday 14 June, 2012 - 08:42

Dynamic Scheduling

Post by Katinka »

Hello,

I'm modeling a warehouse in which they apply dynamic scheduling and I'm not sure how to model this in ED.

The warehouse consists of multiple storage racks (modelled by Warehouse Atoms), which all have their own 'private' bufferlocation (also modelled by Warehouse Atoms). There is two-way traffic: Advanced Transporters transport products from the storage rack to the buffer locations and the other way around.
Whenever an Advanced Transporter has completed a task, it calculates the scores for all products still to be transported and chooses the product with the lowest score to transport next.
Scores are calculated by means of the following formula:

+ (difference in x-location between product and transporter) * 10
+ (difference in z-location between product and transporter) * 5
+ 500 if aisle-change is necessary
- product priority

All (characteristics of) products to be transported from the storage rack to the buffer locations are known and available at the beginning of the day.
Products to be transported from the buffer locations to the storage racks arrive during the day and are only available one at a time, since the private buffer locations consist of only 1 position.

I'm thinking about putting the calculation of all scores in 'The trigger on exit' of the Advanced Transporters and then perhaps let the Destinator sort those scores? I'm not sure if this is possible and how I can associate these scores with products to be picked (also because the product to be picked can either be located at the buffer location or the storage rack).

Thank you in advance,

Katinka
marlies
Posts: 301
Joined: Monday 17 January, 2011 - 09:28

Re: Dynamic Scheduling

Post by marlies »

Hi Katinka,

I made a small example model for you. Be prepared for some 4Dscript...!!

Sorting tasks can be done by using the SortBy strategy in the dispatcher. But this will be executed only once and isn't updated when a transporter moves to another aisle.

The example model is using a table where I store all the products that are waiting to be picked at any location. When the transporter delivered something, it will check this table to find the next product to be picked.

An important thing to know is that I deselected the option Autoload in the tab Load of the transporter. Instead of the autoload functionality I made use of the function AdvancedTransporter_PickAtom.

I made the selection rule simple: just products in the same aisle have priority over products in other aisles. You will have to add the other selection criteria based on location in the rack and product priority.

Hope that this gives you ideas how to proceed with your model!

Feel free to post again if something in the logic isn't clear. Regards and success!

Marlies
Attachments
Warehouse_PickStrategy2.mod
(84.62 KiB) Downloaded 331 times
marlies
Posts: 301
Joined: Monday 17 January, 2011 - 09:28

Re: Dynamic Scheduling

Post by marlies »

Hi Katinka,

If you are going to proceed with the provided strategy I strongly recommand to use the atom Function Editor (Tools Category) to store pieces of code that needs to be executed in multiple triggers in your own 4DScript functions. An example model for this atom is available in the work directory of ED.

Regards, Marlies
Katinka
Posts: 23
Joined: Thursday 14 June, 2012 - 08:42

Re: Dynamic Scheduling

Post by Katinka »

Hi Marlies,

Thanks for your answer! It is a really nice start of my model :)
I also recognized things I thought about myself, like adding a label 'flow' (I used 'direction') to indicate which kind of product it is and where it should go.

I have a few questions about the code:
- Why is the following part necessary in the Source_inbound Atom?
If(
output(c) = 0,
Label([Aisle], i) := 1,


- If (Label([CurRow], refWaitingOrders) > nRows( Label([CurRow], refWaitingOrders)),
nRows( refWaitingOrders) := nRows( refWaitingOrders) + 1000
Is it true that +1 instead of +1000 would do the job as well?

Regards, Katinka
marlies
Posts: 301
Joined: Monday 17 January, 2011 - 09:28

Re: Dynamic Scheduling

Post by marlies »

Hi Katinka,

Good questions!

1. To start the whole process I directly send the 1st inbound product to the 1st inbound queue (that's what the aisle 1 is meant for). In the 1st inbound queue, I trigger this product to be picked: trigger on entry, if(output=0,..etc). Once the transporter has picked one item, it will trigger the next pickings itself in the exittrigger of the transporter. But, I can imagine you will choose another strategy / check. You just need to make sure that you trigger the pickings at the right moments.

2. It is indeed true that +1 will do the job as well. I did the +1000 for technical reasons. If you resize a table very often (using +1) it might happen that your model will become slow in the end. It takes more computer memory to increase 1 by 1 than incidently increasing with a big amount of rows.

Success!

Marlies
Katinka
Posts: 23
Joined: Thursday 14 June, 2012 - 08:42

Re: Dynamic Scheduling

Post by Katinka »

When I altered the Exit Trigger statement of the Advanced Transporter, things became ugly when the transporter needed to switch aisles. In my case, instead of picking a product, it picked the Table Atom itself. Although it looked funny, it resulted into serious errors. I found out that it may be fixed by using (in the Exit Trigger statement of the Advanced Transporter):

Code: Select all

IndexMin(
     Label([CurRow], refWaitingOrders) - 1, 
     {some rule to choose the next product}
     )
instead of

Code: Select all

IndexMin(
     Label([CurRow], refWaitingOrders), 
     {some rule to choose the next product}
     )
since the second piece of code also compares/uses an 'empty' row from the table (containing all zeros).

I thought it might be useful to write it here, in case someone reads this topic and wants to use (a part of) the model.
Post Reply