Multiple Objectives in Optimization: Max Output & Min Stay Time

Multiple Objectives in Optimization: Max Output & Min Stay Time

amy8
Not applicable
51 Views
7 Replies
Message 1 of 8

Multiple Objectives in Optimization: Max Output & Min Stay Time

amy8
Not applicable

[ FlexSim 22.2.0 ]

Dear FlexSim Community,

In my current model, I am using Optimization 5, where the objective is set to maximize output. However, I would like to add another objective—to minimize stay time—so that the optimization process considers both factors simultaneously.

Is it possible to define multiple objectives in the optimization settings? If so, how should I configure the objective column to include minimizing stay time? Are there any additional settings or adjustments I need to make to achieve this?

I appreciate any guidance or insights you can provide. Thank you in advance for your help! jobshop Experimenter 27 SC3.fsm

0 Likes
52 Views
7 Replies
Replies (7)
Message 2 of 8

moehlmann_fe
Observer
Observer

You can just add a second objective to the optimization job. It will try to find optimal scenarios for both and mark scenarios that represent 'good' tradeoffs.

1743578746439.png

https://docs.flexsim.com/en/25.0/GettingData/AdvancedDataGathering/RunningJobs/RunningJobs.html#opt

Putting both types of performance measure into a single objective function would also be possible if you have specific values in mind of how the output and staytime should be weighted respectively.

0 Likes
Message 3 of 8

amy8
Not applicable

@Felix Möhlmann

Many thanks for your advice.

I try to add staytime function that you suggest as below but system display " Error in objective function equation". Did I use the wrong format?

2025-04-02.png

I appreciate any guidance or insights you can provide. Thank you in advance for your help!


0 Likes
Message 4 of 8

moehlmann_fe
Observer
Observer
Do you have a performance measure called "Staytime PFM(ELM100)"? Other than that I can't say what's wrong without seeing the model.
0 Likes
Message 5 of 8

amy8
Not applicable

Thank you very much for your helpful response and clarification.

At the moment, I haven’t included stay time in the parameters, which is why I’m unable to select it as a PFM objective in the optimization settings. May I ask how I can add stay time as a parameter so that it appears and can be used as one of the objective functions?

Additionally, I would like to add the third objective—minimizing the number of product changeovers. Specifically, I’d like to measure and reduce how often a station switches from processing one product type (e.g., Product A) to another (e.g., Product B). Each switch would count as one product change, and my goal is to minimize the total number of these changes.

In total, I’m hoping to set three objectives in Optimization 5: maximize output, minimize stay time, and minimize product changeovers. Would this be possible, and do you have any recommendations on how to implement this setup?

Thank you again for your time and support. I really appreciate your guidance as we continue working on our model. jobshop Experimenter 27 SC3 -最佳化.fsm

0 Likes
Message 6 of 8

moehlmann_fe
Observer
Observer

Staytime is available as a statistic on each fixed resource and you can use the sampling tool to add it as a performance measure. If you want to measure the staytime over multiple objects, use a (Composite) Staytime Chart and sample that for the PFM.

capture1.png

For the number of changeovers you could use the "If Label Value Changes" option for the setup time as a 'hook'. You can leave the time at 0. Choosing the option is an easy way to get code that checks if the type changed though. In that code you can add a line that increments a label on the object or a global variable. A performance measure can then read that label/global variable.

jobshop-experimenter-27-sc3-1.fsm

0 Likes
Message 7 of 8

amy8
Not applicable

Thank you very much for your clear explanation and helpful guidance. It really helped me understand how to set up the performance measures more effectively.

螢幕擷取畫面-2025-04-11-082648.png

Regarding stay time, I’ve already set it up by selecting the Staytime statistic for Queue1 in each station. May I ask if this is the correct approach for measuring stay time as a performance measure?

As for the number of product changeovers, I noticed that the PFMs Changeovers_S1_To_S16 currently have their reference set to "None." Should I assign a specific reference for them to function properly? Also, I’d like to confirm—does the result of Changeovers_S1_To_S16 represent the total number of product changeovers across all stations?

Thank you again for your continued support. I truly appreciate your time and assistance in helping me build and understand this model. jobshop Experimenter 28.fsm

0 Likes
Message 8 of 8

moehlmann_fe
Observer
Observer
If the staytime in the Queue1's is what you want to measure then yes, that is the correct approach.

The changeovers PFM simply reads a global variable, so it doesn't need a reference. The global variable gets incremented each time an item with a different compared to the previous item enters a processor. So yes, it counts all changeovers on the stations from S1 to S16.

0 Likes