Conditional Sorting

Conditional Sorting

navid_m
Not applicable
52 Views
15 Replies
Message 1 of 16

Conditional Sorting

navid_m
Not applicable

[ FlexSim 21.0.10 ]

I have a source, Loop Conveyor and a robot that picks boxes from the conveyor and places them in the queue.

The source uses a table to load packages on the conveyor. a table like below:


Unix TimeStampOrder NumberTotal_Packages_In_Order
16620544001003
1662054404
1014
1662054420
1003
1662054430
1022
1662054450
1003


Each line is basically one package to source into the loop conveyor. The total Pack per order is known. for Example in the above table, the total packs in order#100 are 3. I want the robot to pick up all items belonging to an order that is complete and place them in the Queue. Eventually, I want to have multiple queues but since I am new, struggling with how to manage the first step. I appreciate your help in this sorting problem.

0 Likes
Accepted solutions (1)
53 Views
15 Replies
Replies (15)
Message 2 of 16

jason_lightfootVL7B4
Autodesk
Autodesk
Accepted solution

Have you done some of the tutorials? When you've done enough, try to implement this:

1662070558545.png

(I built the model and added the combiner before I saw you were a student, so try it and let us know if you get stuck having tried to find the answer in the help or by looking up other posts here on the forum. The screenshot might give you enough hints on how to build it)

0 Likes
Message 3 of 16

navid_m
Not applicable

Thanks, for the answer. let me clarify. I am not a student and finished my master's in Electrical & Computer Engineering a few years ago, I am working for more than 7 years in Canada and have over 17 years of experience in the industry and am happy to share my details so you can share the model if it is made.

We are going to work with a consultancy to build an actual robot simulation for this project but to understand the best size for conveyor and robot speed, I wanted to use Flexsim.

I have done some tutorials but since I am not an industrial engineer and it is my first time working with discrete simulation it is hard for me. I like to learn it and use it for other projects but I think with samples it is much easier to learn

0 Likes
Message 4 of 16

Jeanette_Fullmer
Community Manager
Community Manager

Hello @Navid M,

Here is the model that Jason built. sortwhenordercompletefsm.pdf

Change the file type back to .fsm

0 Likes
Message 5 of 16

navid_m
Not applicable
Thanks a lot!
0 Likes
Message 6 of 16

navid_m
Not applicable
would you please guide me to training modules that help me to make this type of model on my own? Is there any paid service for simulation as too?
0 Likes
Message 7 of 16

Ben_WilsonADSK
Community Manager
Community Manager

Hi @Navid M ,


The tutorials for your version of FlexSim (21.0) are found here:

Introduction to Tutorials (flexsim.com)

You can contact your local FlexSim rep to find information about training courses or consulting services.


0 Likes
Message 8 of 16

jason_lightfootVL7B4
Autodesk
Autodesk

Sorry for the confusion - we should look at changing your profile.

Here's a second model to show that the same logic works with multiple cells without any changes other than copying the cell and making a connection or two.

1662157206462.png


SortWhenOrderComplete2.fsm.pdf

0 Likes
Message 9 of 16

Jeanette_Fullmer
Community Manager
Community Manager
@Jason Lightfoot,

I already notified Ben to change it

Message 10 of 16

jason_lightfootVL7B4
Autodesk
Autodesk

I'll just list briefly the elements used in this model for reference:

Objects with 3D locations:

Source:

  • Arrival Schedule with extra labels
  • OnCreation Trigger to change the color based on order number
  • Member of SourceExit Process (Instanced Process Flow but could be General PF)

Conveyors - just standard connections with:

DecisionPoints:

  • Label pointing to the robot
  • On Arrival Trigger to check if the item is the same order as the robot is now processing (looks at the robot label) and if so send the item to that exit.
  • Output connection to the next exit Transfer (by the robot)

ExitTransfer:

  • Set to useTransport and centerport connection to the robot.

Robot:

  • label pointing to the combiner
  • Member of Robot Process Flow (Instanced Process Flow)

Combiner

  • Connection to pallet source on input 1, conveyor exit transfer on port 2.

SourceExitProcess Flow:

Source

  • Creates a token when the item exits the source
  • Labels the token with a pointer to the item

AssignLabels (Label token Order and Qty)

  • Copies the item labels Qty and Order to the token as qty and orderNum (lists can use sql and Order is a sql keyword so best to be avoided)

Batch

  • waits for the correct number of tokens (qty label)
  • groups by the Order label on the item
  • creates an array items containing pointers to all the items
  • releases one token once all items are have exited the source

PushToList

  • pushes the token to Global List CirculatingOrders

Robot Process Flow

Source

  • just creates a single token for the robot at the start.

Wait for Pallet/Tote

  • OnContentChange - waits for a pallet to arrive

Pull Order

  • Waits for the source process's token to be pushed to the Circulating Orders List and then takes it off the list and assigns it to a label called orderToken.
  • The query clause SELECT items copies the items label from the source token to the robot token when it is pulled.

Assign Labels

  • set the robot's orderNum label to that of the pulled order (for the decision point to check against)

CombinerTarget

  • There's no simple GUI option for this so is custom code to tell the combiner how many items it needs to arrive on input 2 to complete the order
int qty=token.orderToken.qty;
current.combiner.setProperty("ComponentsList",[[qty,0]]);
getvarnode(current.combiner, "targetcomponentsum").value=qty;


RunSubFlow :Wait for All

  • This creates a token in the Start activity for each item in the order. The activity doesn't complete each items token has reached the Finish activity.
  • Labels each token with the correct item from the items array label

Wait For Unload:

  • Holds the item token until the robot's unload event fires and matches the item label on the token.


That's it - the only other element is the CirculatingOrders global list that you add in the Toolbox, for which no configuration is needed.


0 Likes
Message 11 of 16

navid_m
Not applicable

Hi Jason,

Thanks for updating the model with two robots, there are a few things about this and I am not sure if that can be done on this model.

1- Can a robot pick while an item is moving? This would more realistic

2- Can we have multiple packs beside each other? In reality, I want the operator to source the packs and be able to place as many as packs possible on the conveyor. ( Maybe I can attach two smaller width conveyors together and trick the system, just a thought)

3- In the current design, if let says 5 orders are complete at the conveyor and robots are picking packs of orders 1 & 2 and then packs of the rest of the orders multiple times which is not an efficient way of sorting. The best design would be for each robot to fill multiple totes at the same time and eventually find out the optimized number for totes that would maximize throughput which is a factor of conveyor & robot speed and source packs distribution.

And Thank you for updating my profile.

Thanks,

Navid

0 Likes
Message 12 of 16

jason_lightfootVL7B4
Autodesk
Autodesk

SortWhenOrderComplete3.fsm.pdf

Here's point 1 - by extending the exit transfer and unselecting 'stop at end' and choosing the robot speeds something more realistic can be made.

2. Yes, you need to adjust the accumulation parameters so that the items don't seperate by the item length and then you need to offset the y coordinate.

3. Yes we can just check if the Type is in an array on the robot instead of a single value.

0 Likes
Message 13 of 16

navid_m
Not applicable

On #2 I will follow your advice, on #3 I think I did not explain well and had typos. I meant a Robot is picking one order at a time while it can be smarter and pick packs of multiple orders into multiple totes.


0 Likes
Message 14 of 16

jason_lightfootVL7B4
Autodesk
Autodesk

#3 I think you explained well enough. Currently that model is using a combiner, which will not handle multiple totes. One solution would be to use multiple combiners but probably better in the long term will be to use a queue or basicFR that can hold multiple totes and use a process flow to coordinate the packing/release. So instead of having one token for the robot - we would generate a token for each tote that is in position and update an array on the robot when the tote is assigned an order.

0 Likes
Message 15 of 16

navid_m
Not applicable
not sure if this works or not, but we can divert the full order to small conveyor branches (let's say 2 branches) only diverting when there is not any other order there. So these two branches are beside the robot and whenever something comes to either of these branches then the robot picks them up and places them into the tote. Easy for me to explain but hard for me to implement yet 🙂
0 Likes
Message 16 of 16

jason_lightfootVL7B4
Autodesk
Autodesk
In the storation loop's decision points you just choose to send to a decision point, photoeye or exit transfer on the branch conveyor. Add a label pointing to that 'element' so that you can refer to it generically in the decision point's onArrival logic.
0 Likes