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.

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.