question

Trex avatar image
0 Likes"
Trex asked Joerg Vogel commented

Rack release items

I have allocated items to individual rack, keeping the minimum dwell time to be 0.

I have associated a table pulling them from a rack through specific location. I had two loops as it read individual bay and level , then it should release that item. But its randomly release the items not with logic.

**Custom code*/

int total_bay = rackgetnrofbays(current);

int total_level = rackgetnroflevels(current);

if(time()>0)

{

for(int a=1; a<=total_bay; a++)

{

for(int b=1; b<=2; b++)

{

for(int c=1; c<=gettablerows("Order1_105665"); c++)

{

string Item_Name_Byorder = gettablestr("Order1_105665",c,2);

string Item_Name_Byrack = getname(rackgetitembybaylevel(current,a,b,3));

/*if(Item_Name_Byorder == Item_Name_Byrack) */

if(comparetext(Item_Name_Byorder,Item_Name_Byrack))

{

releaseitem(item,1);

/* releaseitem(rackgetitembybaylevel(current,a,b,1),1); */

}

else

{

holditem(item);

}

}

}

}

}

Can you guys suggest me to solve this query

@ben wilson

FlexSim 17.0.5
rackrack release
· 1
5 |100000

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

Joerg Vogel avatar image Joerg Vogel commented ·

@Trex, is the item you are going to release on a pallet in the rack or is the item directly in the rack?

0 Likes 0 ·

1 Answer

·
Steven Hamoen avatar image
1 Like"
Steven Hamoen answered Joerg Vogel commented

@Trex I see many mistakes here...

1. if you release your items manually, use the option "don't release item" as the dwell time option. If you use 0 you release immediately ( I think @Jörg Vogel also pointed this out in your other posts)

2. rackgetitembybaylavel() the 4rd parameter is 3 meaning that you want the 3rd product in every cell. Is there even a 3rd product? So I guess that that parameter should be 1?

3. On what trigger and object are you writing this code on? Because you are not specifying so we can't judge if this code is ever called and what "current" is pointing to.

4. you write releaseitem(item,1) but item is not defined in this code so you should have an extra line like:

Object item =  rackgetitembybaylevel(current,a,b,3);

before you can call the release item.

On a more general note, if you would attach a model we can have much more information. It also good habit to use the code tags if you put code in your post (see this post).

Oh and this problem screams for process flow to solve it....

· 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.

Trex avatar image Trex commented ·

model-2.fsmThank you @steven.hamoen for your guidance. As per Jorg comment, still I couldn't know to pull through the list.

As you guided, I tried with those logics and was able to pick up all desired parts as per my order list (Global table) .Here I have used a code in entry of each rack to release the item.

  1. But here I was facing an issue of placing these items to the desired output port. I tried with process flow, as I was knew, I used one from the forum. While reaching to the output, flexsim have some error & get crashed.
  2. Transporter is travelling across the racks when it get triggered from the other rack, as I have used A star navigator to define the path.

@Matt Long and @David Dorantes

I will be very much thankful for the support

0 Likes 0 ·
model-2.fsm (219.7 KiB)
Joerg Vogel avatar image Joerg Vogel Trex commented ·

I didn't look into your model.

To 1.

releaseitem(obj item, num output port of the object the item is hold in)

To 2. The issue is the result of a missing path network and not a A* problem. You know how the transporter should travel to the aisles of the racks. Then you build a path network. If your layout is undefined or changes often and your taskexecuters are free to travel in an area you can let the A* module find the path to the destinations. If you face the problem that a transporter travels from the network node which is connected to the rack object directly you have to change the tasksequence in such a manner that the transporter travels offset wether in x and y separately or over relative or absolute coordinates to the item.

X an Y separately is done by a set of tasks of the tasktypes PICKOFFSET and unloading with PLACEOFFSET.

By coordinates the tasktypes are TRAVELTOLOC or TRAVELRELATIVE.

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.