Hello there,
I am trying to pull the items from the list when the object has less than 2 parts. But my model doesn't seem to work the way i want it to.practice-1.fsm
Thanks in advance
Hello there,
I am trying to pull the items from the list when the object has less than 2 parts. But my model doesn't seem to work the way i want it to.practice-1.fsm
Thanks in advance
Hi @Suhas H2,
Which object needs to have less than 2 parts? Do you mean when your TaskExecuter1 has less than 2 items loaded on it? If so, you need to specify exactly what happens and in what order. For example, if I am TaskExecuter1 and I have 2 items loaded. When I drop off one of my items, should I drop off the second one or should I go get another item first?
What happens when the "object" has less than 2 parts but there are not any items available on the list?
I would recommend using Process Flow logic. You can start with an Event-Triggered Source that listens to the content change of the Task Executer, then create a series of activities, like "Acquire", "Pull from List", "Load", "Travel", etc. that can perform what you're looking for. It needs to be well-defined in advance, though, to get a good result.
Hi @tanner.p,
I would like Queue1 to pull items from the rack when the contents in the Queue1 is less than 2.
I have added this condition in the flow-->Pull strategy like shown below. But the task executer doesnt seem to move after the contents in the Queue1 is less than 2. Also tried to pull the item from the list in the 'On Exit' trigger on When the contents in the Queue1 is less than 2 doesnot this pull strategy get triggered and execute the pull logic?
Object current = ownerobject(c); Variant mybag=content(current); if (content(current) <= 2) { int callbackCase = param(5); #define CALLBACK_CASE 10293 treenode pulled = 0; if (callbackCase != CALLBACK_CASE) { string listName = "ItemList1"; List list = List(listName); string queryStr = ""; Variant partitionId = 0; int removeFromList = 1; int addToBackOrders = 1; pulled = list.pull(queryStr, 1, addToBackOrders ? 1 : 0, current, partitionId, (removeFromList ? 0 : LIST_DO_NOT_REMOVE) | LIST_RETURN_BACK_ORDER_IF_NOT_FULFILL); if (isclasstype(pulled, "ListBackOrder")) eventlisten(pulled, "OnFulfill", c, 0, LIST_ON_FULFILL_VALUE, 0, 0, 0, CALLBACK_CASE, current); else if (objectexists(pulled)) pullitem(current, pulled, 0, BYPASS_ALL); } else { pulled = param(1); current = param(6); pushitem(pulled, current, 0, 0); } } return current.inObjects.length + 1; <br>
I am looking through your model and I can't seem to find where you push to a list. I am assuming the items in the rack will be pushed to a list.
The easiest way to to do this would be to use process flow and have an event triggered source on the queue, that will trigger when it decreases to or through 2. This is an existing option on the event triggered source. You can then pull from the list, assign the list entry to a label, acquire an operator (TaskExecutor1), have it load the object stored in the label, and then have it drop it off at the queue.
Please let me know if this is not the logic you are looking for.
I am pushing the parts into the list when they enter into the racks.
The model works absolutely fine when i take of the condition from the 'Pull startegy' on the 'Queue1'(content(current) <= 2). But i want it to pull parts from the rack only when the 'Queue1' has parts less than 2number. practice-1-update-1.fsm.
/**Custom Code*/ Object current = ownerobject(c); Variant mybag=content(current); if (true) { int callbackCase = param(5); #define CALLBACK_CASE 10293 treenode pulled = 0; if (callbackCase != CALLBACK_CASE) { string listName = "ItemList1"; List list = List(listName); string queryStr = ""; Variant partitionId = 0; int removeFromList = 1; int addToBackOrders = 1; pulled = list.pull(queryStr, 1, addToBackOrders ? 1 : 0, current, partitionId, (removeFromList ? 0 : LIST_DO_NOT_REMOVE) | LIST_RETURN_BACK_ORDER_IF_NOT_FULFILL); if (isclasstype(pulled, "ListBackOrder")) eventlisten(pulled, "OnFulfill", c, 0, LIST_ON_FULFILL_VALUE, 0, 0, 0, CALLBACK_CASE, current); else if (objectexists(pulled)) pullitem(current, pulled, 0, BYPASS_ALL); } else { pulled = param(1); current = param(6); pushitem(pulled, current, 0, 0); } } return current.inObjects.length + 1; <br>
**I dont want to use processflow here because the racks are 10 in number and the queue's are more than 100 in my actual model. Which makes my process flow huge. Instead writing a generic code will serve my need better. Any help or suggestions are welcome.
Process Flow is actually going to be your best option for this. The Queues' Pull Strategy is not listening for the queue's content to drop unless there is a triggering event. So you could hard code this into all of your queues, but then you'd have to create triggers for all of the queues as well.
Instead, you can put all the queues into a group, then use a Wait for Event that constantly listens to each queue to know when the content drops below 2. You can try adding a queue (connect it to a control point and add it to a group) and you'll see that this method is very scalable.
Here's the model. Hopefully this helps.
13 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved