question

Michal K5 avatar image
0 Likes"
Michal K5 asked Michal K5 commented

Simulation stops when i use pull strategy.

I have problem with pull strategy in my model. I want to put items on conveyor when quque's content is below 5. I put a script in "EntryTransfer1" (the beginning of a conveyor). It works properly, but in one moment the whole simulation stops, so i guess that the program can't pull items "eternally". Do u have any idea how can i solve this problem? Thank You in advance.

Here is my example model:

example-pullbyquecontent.fsm

FlexSim 18.1.2
pull strategypull
5 |100000

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

Raja Sekaran avatar image
3 Likes"
Raja Sekaran answered Raja Sekaran commented

Hi @Michal K5

I have updated the model and attached it here (v18.2.2). First, I have push all the items into List. Then using Query in the Pull From List to pull the items based on the queue content.

pullstrategy.fsm

Hope this works.

Thanks


screenshot.jpg (62.3 KiB)
pullstrategy.fsm (44.9 KiB)
· 4
5 |100000

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

Michal K5 avatar image Michal K5 commented ·

Thank You @Raja Sekaran. It was perfectly fine. But the method which u used is for me (beginner) a little bit complicated. Is there any simpler solution, or could you explain to me in 2-3 sentences how do the solutions used by you in the model work?

1 Like 1 ·
Raja Sekaran avatar image Raja Sekaran Michal K5 commented ·

Hi @Michal K5

1. I have created a group called "Group1" and add all the destination queues (Queue2,Queue3,Queue4) into the group.

2. Source >> OnCreation trigger, I have assigned the destination queue as a label called DestQueue to all the items based on the item type. Here I am getting the destination queue from the group based on the item type.

e.g: if the item type for newly created item is 1 then below code will return the value as Queue2 and assign the value to the DestQueue. Likewise if Itemtype 2 means, it will assign Queue3 as a value to DestQueue.

Object involved = item;
string labelname = "DestQueue";
Variant value = Model.find("Tools/Groups/Group1").subnodes[item.Type].value.up.up;
involved.labels.assert(labelname).value = value;

3. Queue1 >> Send To Port, Push all the items into the list called "ItemList1".

When you are creating new list, default expression and label fields are available and also you can add your new fields based on your need. Here I have added new label field called DestQueue for our reference also updated the queueSize expression field as shown below

value.DestQueue.subnodes.length

Here, value is the item which you are pushing into the list. Since you have already assigned destination queue for the all items as a label called "DestQueue", you can access the destination queue content by using the above code.

4. EntryTransfer1 >> Pull Strategy, Using the below query to pull the items From the "ItemList1".

WHERE queueSize < 5

5. ItemList1 >> BackOrders >> Back Order Reevaluation Events, this pane defines the back order reevaluation events, Here I have reevaluate the pull request whenever the items exit from the destination queues (Queue2,Queue3,Queue4).

From User Manual >> Reference >> Tools >> Global Lists >> Back Orders Tab >> Back Orders Reevaluation Events

For example, consider the following query:WHERE queueSize<=5. If the pull request is made at a point when queueSize is greater than 5, then you may want to reevaluate that pull request when queueSize becomes less than 5. FlexSim doesn't automatically know when this condition may change, so you need to define events that will trigger reevaluation.

Hope this is understandable.

Thanks

1 Like 1 ·
screenshot-2.jpg (22.4 KiB)
Michal K5 avatar image Michal K5 Raja Sekaran commented ·

Thank you very, very much @Raja Sekaran U helped me a lot and i understood everything! I tried to use your method in my model and i think i did everything correctly - item list works good. But when I run my model, there is an error. Could you look at my model and point out my mistake? Thank you for your time, it is very important for me.

pullstrategyfailed.fsm

0 Likes 0 ·
Show more comments
Michal K5 avatar image
0 Likes"
Michal K5 answered Michal K5 commented

Thank you @Raja Sekaran Your model works very well. Could I ask you what you changed in this model (except adding processors) that it started to work?

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

Raja Sekaran avatar image Raja Sekaran commented ·

@Michal K5

I did not change anything in the model. I just built it in version 18.2.2 and did not get any issue. So, I think the version might be the issue.

1 Like 1 ·
Michal K5 avatar image Michal K5 Raja Sekaran commented ·

@Raja SekaranThank you again. U helped me a lot.

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.