question

Yunhao L avatar image
0 Likes"
Yunhao L asked Jeanette F commented

Make operator pick item from conveyor

Hello,

I am new to flexsim and I am still trying to figure out things.

My model has a conveyor and different items (let say X and Y).

Imagine at the end of the conveyor are the following elements: X X Y X X. As currently is, my operator is picking up the first element to arrive to the end of the conveyor. Is there any way to make the operator to select which item to pick? Would be nice if the operator could be decide that using an parameter since my idea is to do an RL connector.

FlexSim 22.1.1
conveyorsoperatorsreinforcement learning
· 1
5 |100000

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

Kavika F avatar image Kavika F ♦ commented ·

Hi @Yunhao L, was Felix Möhlmann's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

·
Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Jeanette F commented

I'd suggest to use a list for this. First, increase the size of the exit transfer on the conveyor so can 'hold' more than one item.

1655105778101.png

Then create a global list and set the exit transfer to push items to that list in the 'Send To Port' option.

1655105823099.png

By adding 'fields' to the list you can then use a query when pulling from the list to filter and/or sort the items on the list. In the attached example, each item is assigned a 'prio' label between 0 and 10. Items with a higher priority are pulled first.

1655105988276.png

I use a process flow to control the operator. But you can also use the 'Pull Strategy' input option of fixed resources to pull from the list directly. (Note though, that a queue will pull items up to its maximum capacity when available. So it would pull all items as soon as they enter the exit transfer region, as long as it has capacity)

PullFromConveyor.fsm

More information as well as a tutorial about lists can be found in the online manual.

https://docs.flexsim.com/en/22.1/ConnectingFlows/Lists/KeyConceptsLists/KeyConceptsLists.html

https://docs.flexsim.com/en/22.1/Tutorials/ProcessFlow/Tutorial1UsingSharedAssets/UsingSharedAssetsOverview/UsingSharedAssetsOverview.html


1655105778101.png (52.8 KiB)
1655105823099.png (5.0 KiB)
1655105988276.png (20.2 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.

Yunhao L avatar image Yunhao L commented ·

Is it possible to make the operator to pull by an item type given by an action parameter?

Something like this would it be possible?

For example, doing this gives an exception of invalid SQL query

WHERE Type=Model.parameters.SelectItemType ORDER BY ageInQueue DESC

1657466466825.png

0 Likes 0 ·
1657466466825.png (26.9 KiB)
Felix Möhlmann avatar image Felix Möhlmann Yunhao L commented ·

You can, but you have to enclose the FlexScript expression (Model.parameters.SelectItemType) in curly braces {}.

Alternatetively, you could first write that parameter value to a label on the token and use that label in the query (puller.labelName).

Or you could create a dynamic expression field for the list that checks if the entry matches the parameter. The expression would either evaluate to 0 (false) or 1 (true).

1657467416364.png

1657467476948.png

0 Likes 0 ·
1657467416364.png (9.6 KiB)
1657467476948.png (15.8 KiB)
Yunhao L avatar image Yunhao L Felix Möhlmann commented ·

Thank you very much! That was exactly what I was looking for.

There's a new question that came into my mind. If the query WHERE Type = {Model.parameters.SelectedItemType} ORDER BY ageInQueue DESC results in empty, is there any way to introduce an "else" query?

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