question

mark zhen avatar image
0 Likes"
mark zhen asked Jeanette F commented

I want to use pf to complete the optimization rules.

I want to use pf to complete the optimization rules. For example, after the machine is processed, I need to use the values in the globle table to change the order of my grabs. 2 3 4 Then select the smallest part according to my change time, which is similar to the result of reinforcement learning) How should my decision be set

https://drive.google.com/file/d/1OgoXJpRNiKlWfBxtwBFpmXtXoqf3ZV53/view?usp=sharing

1660467480056.png?

FlexSim 22.0.0
proces flowdecide
1660467480056.png (17.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.

Jacob W2 avatar image Jacob W2 ♦ commented ·
Hi @mark zhen,

I have a couple of questions regarding what you are trying to do in your model.

First, I am trying to understand how you are using your table. What do the different rows and columns represent?

Second, are you trying to pick items by type with the processor? If so, does the pick order remain the same? (example: 1,2,3,4 and once 4 is picked the next item will by type 1).


0 Likes 0 ·
mark zhen avatar image mark zhen Jacob W2 ♦ commented ·

My table is a logic for changing time. For example, it takes 10s of delay time for me to change item 3 to 4, and I need to use pf to make a judgment. For example, I am currently doing item3 goods, (currently there are item1, item3, item4 three kinds of goods)

Then according to my logic, I need to find 3 with a replacement time of 0 first. When all item3 is processed, I need to determine the minimum delay time to select the next processed item (according to my logic, the next item is item4)

0 Likes 0 ·
Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @mark zhen , 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
0 Likes"
Felix Möhlmann answered Felix Möhlmann commented

You can use the same logic from the Reinforcement Learning Tutorial to control which item is pulled by the processor. To simplify it a little bit, the parameters can be exchanged for labels on the processor (NextPullType) and the queue (TypeCounts).

The TypeCounts array is continuously updated as items enter and leave the queue in the OnEntry and OnExit trigger. In the process flow you would then implement logic that decides the next item that should be pulled based on the quantity of types in the queue.

A simple method would be to iterate over all types in the queue (for-loop), check the changeover time for each and return the type with the smallest time.

An improved approach (as seen in the linked model) could also take into account how many items of a type are available. Spending 30s to change to another type but then being able to process 10 of those in a row is likely going to be better than having setup time of 10s but needing to change again after only 1-2 items.

1660641192639.png

https://drive.google.com/file/d/1s7ycc87TRGO41-pWRxYKYZgQ81jQP4as/view?usp=sharing


1660641192639.png (206.0 KiB)
· 7
5 |100000

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

mark zhen avatar image mark zhen commented ·

Your answer is perfect! But I want to ask if I want to use functional objects in process flow is it possible? Or is that very difficult

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann mark zhen commented ·

You can use process flow activities (if that is what you mean, the translation "functional objects" is a bit unclear), but essentially you would just be using the same (or very similar) code distributed over multiple "Assign Labels" activities. A Sub Flow can provide the same functionality as the for-loop.

1660642375530.png

https://drive.google.com/file/d/1OcNFlwDOrPjBn1qR6rWDft8u4piQAkiv/view?usp=sharing

0 Likes 0 ·
1660642375530.png (12.4 KiB)
mark zhen avatar image mark zhen Felix Möhlmann commented ·

不好意思很感謝你的理解!!但就上面的模型來看我想要讓他照著行程表來跑,他會出現問題我該如何更改??

1660642869129.png

0 Likes 0 ·
1660642869129.png (53.1 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.