question

Remi A2 avatar image
0 Likes"
Remi A2 asked Helen commented

How can i create different sequences with processor ?

Hello, How can I make my processor 1 only do item A till being out of stock no matter what's his order of arrival and then processes product C,then B,then D.I also want processor 2 to do 3B then 2C and ends with 4D. How is this possible ? Thank you .

Test1.fsm

FlexSim 21.2.2
processortask sequence
test1.fsm (40.8 KiB)
5 |100000

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

Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Remi A2 commented

A relatively easy way to do this, is to use a list.

Delete the connections from the floor storage to the processors. Create a new global list (of type ItemList - this only adds some default fields to the list as far as i know).

In the "Send to Port" option of the floor storage, select "Push to Itemlist" and choose the list you just created.

To make querying for the correct item in processor1 easier, I'd suggest to add a new label to the items that can be used to order them by priority. In the attached model I do this in the entry trigger of the floor storage by looking up the correct values in "GlobalTable1".

Also add a "Label" field with this name to the list in its properties.

1634207731287.png

Now, activate the "Pull" option in the input tab of processor1's properties. In the "Pull Strategy", select "Pull from ItemList" and add a query to order the items by the added priority label.

1634207695880.png

That's all for processor1.

Add two labels to processor2 - one array label and one number label. Enter the order in which you want to process the types in the array label ([2,2,2,3,3,4,4,4,4] <- 3B, 2C, 4D). The number label will serve as index to know which entry in the array defines the next item type. Set its value to 1. Activate the "Automatically Reset" option to reset the number label between runs.

1634207945987.png

Before setting up the "Pull Strategy" for processor2, add another field to the list - the pre-defined "meetsPullRequirement" (already done in screenshot above).

Now add the "Pull Strategy" as before and choose to filter by this field (delete the "< 10" bit, that gets added). This means, only items can fulfill the pull requirement can be pulled. (Normally, it is ignored when pulling from a list)

1634208911591.png

Set the pull requirement up, so that the "Label" label on the item has to match the array value.

1634208465844.png

("fmod" returns the remainder of the division "current.cnt/9", so the order will be reapeated when the count value rises above 9)

Finally, add an entry trigger to processor2 to increment the "cnt" label, each time an item enters the processor.

1634208626238.png

test1_fm.fsm


1634207695880.png (9.5 KiB)
1634207731287.png (23.5 KiB)
1634207945987.png (6.6 KiB)
1634208465844.png (7.1 KiB)
1634208626238.png (4.8 KiB)
1634208911591.png (9.9 KiB)
test1-fm.fsm (137.2 KiB)
· 3
5 |100000

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

Remi A2 avatar image Remi A2 commented ·

Thank you, you really did answer my question but I still can't understand the functioning of itemlist and the differents cases in it can you plese explain it to me ?

screen.png


0 Likes 0 ·
screen.png (30.8 KiB)
Felix Möhlmann avatar image Felix Möhlmann Remi A2 commented ·

Any of the defined fields can be used as part of an sql query when pulling things from the list. Mostly to filter for certain criteria or order them, like in your example. All the fields up to (including) "queueSize" are automatically added if you choose to create an "item"-list.

They mostly assume that the item is waiting in a queue (or other storage object).

"Type" is an often used, default label name.

"age" is the timeframe for which the item has been part of the list. (One might want to pull the item with the longest wait time.)

"distance" evaluates the physical distance between the item and the pulling object. (Allows pulling items from storage objects close by if they are transported by a task exectuer.)

"queueSize" is the total number of items in the storage object the item is in. (Enables stock balancing by pulling from the queue with most stock.)

As mentioned above, all of these are just default values and serve no purpose in the attached model. Only "Prio_Processor1" and "meetsPullRequirement" are used.

More information can be found in the documentation on lists:

https://docs.flexsim.com/en/21.2/ConnectingFlows/Lists/WorkingWithLists/

0 Likes 0 ·
Remi A2 avatar image Remi A2 Felix Möhlmann commented ·
Thanks a lot
0 Likes 0 ·
Helen avatar image
0 Likes"
Helen answered Helen commented

Hello @Felix Möhlmann ,


I've tried to follow the steps here and the processor is not picking up the parts. What I've done is the following:

1. I've created the item-list > meetsPullRequirement

2. In the processor I've created two labels; a) PullOrder, b) cnt (to see when to reset the order)

3. Then I've clicked pull in input and defined the pull strategy and pull requirements taking into account that my label name is "Type" instead of "Label" and that my sequences goes up to 4 parts instead of the 9 ones in the example

4. And created a trigger to incrementally count the label cnt.

I must be missing something, but I cannot see what. Can you help me with this?

Thank you.

· 6
5 |100000

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

Felix Möhlmann avatar image Felix Möhlmann commented ·

I don't see any missing step. One possible reason could be that the values in the Pullorder array are formatted as text rather than numbers which, so the values wouldn't be equal to a number label on an item. To make the data is formatted correctly, open the array in a table view and set the data type to "number".

1661763339174.png

To check further, I would need to see your model. Could you upload screenshots of the relevant settings (list, labels, Pull Strategy and Requirement)?

0 Likes 0 ·
1661763339174.png (22.1 KiB)
Helen avatar image Helen Felix Möhlmann commented ·
I've tried it but it doesn't work. I guess the problem is with the conection itself because both connections appear in red, but I cannot see what's the problem. I send the model in the following link (it does not allow to attach to the message).

Thank you!

Myriam

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Helen commented ·

Thank you for the upload.

- The queues are not pushing the items onto the list.

1661766300087.png

- Your "cnt" label starts at 0 (which is actually better than starting at 1), so you have to add an offset to the Pull Requirement.

1661766392139.png

- In the entry trigger, you are trying to increment a label on the item. It should be current.labels["cnt"].

1661766468072.png

1 Like 1 ·
1661766300087.png (5.7 KiB)
1661766392139.png (9.0 KiB)
1661766468072.png (4.7 KiB)
Show more comments

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.