Table with components to rack with a script (Simulating Picking process in warehouse)

Table with components to rack with a script (Simulating Picking process in warehouse)

chaushevk
Explorer Explorer
148 Views
6 Replies
Message 1 of 7

Table with components to rack with a script (Simulating Picking process in warehouse)

chaushevk
Explorer
Explorer

Hello guys, 
I'm really new into Flexsim, but was wondering how can i do that. 
I set up a logic in "Storage System" where aisle is the Rack, level and the slots per bay. our logic here is for example: 01-01-45 - this is Rack 1, level 1, 45 cell (there are 3 cells in every bay? don't know how to show it here)

chaushevk_0-1752145768383.png

And this: 

chaushevk_1-1752145873262.png

But then i want to fill this rack up with components that i have already have exported in a table. example:

chaushevk_2-1752145941092.png

(of course it is more complicated in reality, but i'm just testing)
Added a script block (and the same script in process flow), but can't seem to find the reason why i can't assign locations to the components. Any ideas? 
Thanks in advance!

0 Likes
Accepted solutions (3)
149 Views
6 Replies
Replies (6)
Message 2 of 7

moehlmann_fe
Enthusiast
Enthusiast
Accepted solution

The table name doesn't match what the code expects and the Aisle ID is not set on the rack (needs to be "01", not just "1").

 

Message 3 of 7

chaushevk
Explorer
Explorer

It matches with the uploaded one, but in flexsim it's "Globaltable1", do i change it there as well? I didn't new. I changed it

 

chaushevk_1-1752212706383.png

chaushevk_2-1752213420686.png

and i added 01 to "Aisle", is this the correct place? 

chaushevk_3-1752213454986.png

After these changed, something happened, but not really. 

chaushevk_4-1752213565914.png

You can see one of the components is visible (next to the rack on the floor), but it's not on the rack and the operator doesn't register it to take it. 

chaushevk_5-1752213627162.png

and i see all the components here in "Main" tree, but not on the Rack. Do i need another table to have every location to match every rack Aisle/bay/number? Or somehing in the code makes it go on the ground? (i put 2 operators to just pick from the queue and the rack to test if it even register them)

0 Likes
Message 4 of 7

chaushevk
Explorer
Explorer

Oh, i saw you sent a fixed one too, but can you place explain what exactly did you do, so it works like that on reset and everything is on the rack? 🙂 And do i need both the BasicFR1 and the processflow code, or i can remove the box maybe

0 Likes
Message 5 of 7

moehlmann_fe
Enthusiast
Enthusiast
Accepted solution

I added the "moveobject()" command to the code to actually move the items into the rack after they are assigned a slot (only in the BasicFR trigger). Assigning a slot on defines where the item should be placed when transported to the storage object the assigned object is in. It does not cause the item to move.

moehlmann_fe_0-1752219275256.png

 

No you don't need both codes. Personally I would go with executing the code in Process Flow when the model starts rather than creating the items on reset.

Message 6 of 7

chaushevk
Explorer
Explorer

Ok, thanks. When i remove the block and copy your code in the processflow "customcode" block, it doesn't actually trigger. I'm really bad at this coding stuff and i'm trying to get help from ChatGpt, but no success so far. And this project is something i need to do. With it working, then it would be easy to change the components in the table and it should still work, right? Like putting for example 35 racks with more level and 45 bays or whatever. Nothing is is specified in the code, so i guess it's not a problem? Thanks a lot for the help too.. apparently can't do it myself

0 Likes
Message 7 of 7

moehlmann_fe
Enthusiast
Enthusiast
Accepted solution

The Start and Finish activities are meant for a different purpose (as start and end point of sub flows). They don't create tokens on their own. You need to place a Source activity that creates a token. The code is executed when a token enters the Custom Code activity. By default the Schedule Source is configured to create a single token at the start of the model run. Maybe take a look at the Process Flow documentation if you are unfamiliar with it.

moehlmann_fe_0-1752225313216.png

https://docs.flexsim.com/en/24.1/ModelLogic/ProcessFlowBasics/OverviewProcessFlowInterface/OverviewP...