question

Kristoffer Sperre avatar image
1 Like"
Kristoffer Sperre asked Kristoffer Sperre commented

Defining transporter load time per item

Hi,

I’m building a model were I try to replicate parts of the attached model (warehouse picking demo from a previous question). Unfortunately, I’m struggling with implementing pick time per item. When I increase the amount to be picked at a given location the transporter does not use more time at the station. I find this a bit strange as it should take more time to pick 5 items compared to 1.

Does anyone know where in the model the loading time per flow item is decided?

Thanks in advance :)

FlexSim 16.0.1
transporterloadpick
5 |100000

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

Brandon Peterson avatar image
6 Likes"
Brandon Peterson answered Kristoffer Sperre commented

Kristoffer,

The model that you are trying to duplicate does work quite differently than one that uses actual flowitems in the racks. I am unsure of your level of understanding of the model so I will start with a general description of how the model works.

The flowitems in the model represent trips and flow through the model (Source -> InQueue -> OutQueue -> Sink) without going through the racks. The reason that the fork lifts travel to the racks is due to the code that resides in the InQueue's TransportResource and OnMessage triggers. All of the actual travel tasks are created in the TransportResource trigger.

In the TransportResource trigger (Code field next to the Use Transport check box) the code creates a tasksequence for the forklift that determines where it travels and how long it delays for loading. The general flow of the code is as follows:

  1. Travel to the InQueue
  2. Load the Trip flowitem
  3. Send Message to InQueue to execute the Load Message Code
  4. Loop through the Orders associated with the Trip
    1. Travel to the rack that contains the order
    2. Travel the offset to the order location in the rack
    3. Delay for the load time
    4. Send Message to InQueue to execute the Pick Message Code
  5. Travel to the OutQueue
  6. Unload the Trip flowitem
  7. Send Message to InQueue to execute the Unload Message Code

The Order table contains the number of items in the order and the location row to use for the Locations table. The rack object, bay, level, and delaytime (per part) are all defined by the Locations Table. The delaytime in the Locations table is actually a function that gets executed with the amount value from the Orders table passed in as a parameter. The code to look at for all of this is on lines 21-25 of the TransportResource trigger.

Ultimately the answer to your question can be found on lines 25 and 31 of the TransportResource trigger. Line 25 is where the value of the delay (load time) is calculated. Line 31 is where the delay task (load time) is inserted into the tasksequence for each order.

I hope this answers your question,

Brandon

· 5
5 |100000

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

Phil BoBo avatar image Phil BoBo ♦♦ commented ·

The model in that old forum post (and also attached to this question) has a bug in its global tables that is causing them to not open their views correctly when you double-click on them in the Tools window in newer versions of FlexSim. (That model was originally built in FlexSim version 5.)

You can fix the global tables by executing this code in a Script window:

forobjecttreeunder(node("Tools/GlobalTables", model())) {
	sets(assertattribute(a, "guifocusclass", DATATYPE_STRING), gets(guifocus(a)));
}

The model will make more sense if you can see what is in the global tables. This model is driven entirely by the data in the global tables.

The load time is determined by the DelayTime column in the Locations table. The number of items at the location is passed in as parval(1):

3 Likes 3 ·
Kristoffer Sperre avatar image Kristoffer Sperre commented ·

@Brandon Peterson @phil.bobo

Thank you for a very detailed and helpful reply! :)

I have the same "DelayTime" column in global table "Locations", and the same codes in the TransportResource trigger. But even if I change the data in the DelayTime column, or the amount in global table "Orders", the loading time stays the same.

Attached is a sample of my own model.

Is it possible that it's not working because I'm trying to duplicate a model from an older version of FlexSim?

I appreciate all replies. Thank you in advance.

flexsim-forum.fsm

0 Likes 0 ·
flexsim-forum.fsm (44.6 KiB)
Brandon Peterson avatar image Brandon Peterson ♦ Kristoffer Sperre commented ·

Kristoffer,

The nodefunction command requires that the node it is trying to execute be toggled as Flexscript. You can go into the tree and toggle the nodes yourself or you can change the code and the table values slightly. To modify the code and table values do the following steps:

  1. Change your DelayTime table values from 1 to 2
    1. uniform(10,20,0) + (parval(1) * 5.0)
    2. uniform(10,20,0) + (getnodenum(c) * 5.0)
  2. Change line 25 in your TransportResource trigger to the following:
    1. double delaytime = executestring(gettablestr("Locations",locationid,6),gettablecell("Orders",row,4));

This should get you going.

Brandon

@anthony.johnson @phil.bobo

2 Likes 2 ·
Phil BoBo avatar image Phil BoBo ♦♦ Kristoffer Sperre commented ·

In the original model, each of the delaytime cell nodes has been toggled as FlexScript. The nodefunction() call that gets the delay time assumes that the node is toggled as FlexScript and built.

In your model, those cells are just regular strings, not toggled as FlexScript. You can add 2 lines before line 25 in the Use Transport field to explicitly toggle the nodes as FlexScript and build them:

switch_flexscript(gettablecell("Locations",locationid,6),1);
buildnodeflexscript(gettablecell("Locations",locationid,6));
double delaytime = nodefunction(gettablecell("Locations",locationid,6),amount);
2 Likes 2 ·
Kristoffer Sperre avatar image Kristoffer Sperre commented ·

Thank you very much!

The model works perfectly :)

0 Likes 0 ·
Adrian Haws avatar image
0 Likes"
Adrian Haws answered Adrian Haws edited

@Kristoffer Sperre in response to your second question this is what I came up with (see attached model). I sent flowitems from a source to two racks, and set a trigger in OnCreation to Set Itemtype.

I then told the source to send corresponding itemTypes to separate racks (since you wanted the transporter to define load time based on which rack it is).

Finally, I set the load time on the transporter to vary based on the itemType.

Hope this helps!


loadtime4.png (166.3 KiB)
loadtime1.png (26.1 KiB)
loadtime2.png (21.0 KiB)
loadtime3.png (33.9 KiB)
loadtime.fsm (19.2 KiB)
· 2
5 |100000

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

Kristoffer Sperre avatar image Kristoffer Sperre commented ·

Dear @Sam Stubbs and @Adrian Haws, thank you for your replies. I will try to make my question a bit more accurate.

I am trying to replicate a model created by @phil.bobo (from the old forum: https://healthcare.flexsim.com/community/forum/showthread.php?t=664). Everything seems to work, except in my model the loading time for picking an item is 0 seconds, independent of how many items the transporter picks. In the original model, however, the run time of the simulation increases when the amount picked (in global table "Orders") increases.

So the question is where can I specify the loading time when picking from a rack (it could be the same for every rack), when using this model? My thought is it could be specified in "InQueue" --> Flow --> Use transport --> Task sequence example 1 --> code, but I can only make the transporters to take a break after picking an item, and the break time is independent of the amount of items picked.

PS: I guess an important distinction in this model is that it does not really use flowitems.

0 Likes 0 ·
Adrian Haws avatar image Adrian Haws Kristoffer Sperre commented ·

@Kristoffer Sperre A quick tip on tagging names in Answers-when you start typing the name, you can select the option that comes up so that it creates a link.

0 Likes 0 ·
Sam Stubbs avatar image
0 Likes"
Sam Stubbs answered Sam Stubbs commented

You can adjust the load time per item in the Task Executor properties window . The field where it says "Load Time" defines how much time per item it takes to load. I've included a simple example.


loadtime.png (29.9 KiB)
exampleloadtime.fsm (17.6 KiB)
· 2
5 |100000

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

Kristoffer Sperre avatar image Kristoffer Sperre commented ·

Thank you for the quick reply!

When I adjust the load time, it only changes the loading time at the InQueue i.e. the loading time for picking up the pallets, not the loading time at the different locations (racks).

Do you have any suggestions for how to edit the loading time when the transporter are at the different locations?

0 Likes 0 ·
Sam Stubbs avatar image Sam Stubbs ♦ Kristoffer Sperre commented ·

Right next to the Load Time is Unload time, you can use that to simulate the unloading into the racks.

0 Likes 0 ·

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.