question

SudheerReddy avatar image
0 Likes"
SudheerReddy asked Felix Möhlmann commented

Optquest to minimize the avgerage staytime in Queue

OptQuest.fsm

Below is the image for reference

I am finding number of processors required to keep Avg Staytime>5 and <10 in Queue1

So I want to min Avg staytime in Queue1

Constraints are Avg Staytime >5 and <10

And number of processors should come out of optquest


1629943688023.png

@Jordan Johnson could you provide feed back to this . I am using optquest for first-time, it will be of great use if any feedback

FlexSim 21.1.3
optquestflexsim 21.1.3optimiztion
1629943688023.png (54.2 KiB)
optquest.fsm (26.6 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.

1 Answer

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

Hello @SudheerReddy,

to use Optquest you first have to add parameters and performance measures.

Parameters are the values that the optimizer will vary between runs to find the best solution. What the best solution is, is decided by the Performance Measures (pm). The goal can be to either maximize or minimize these (or any composition of multiple measures, for example the sum of two pms multiplied by a third). In your case this would be the average staytime of items in the queue which you can reference using the pipette tool.

In the attached model I also added a second pm: The deviation from the mid point of the time window. To achieve this I again reference the average staytime but add this line of code in front of the "return" command in the code editor.

value = Math.fabs(value - 7.5);

Instead of returning the raw value, this pm will show how far away from an average staytime of 7.5s the queue was during the run.

Next, I added a parameter controlling the "Max Content" of the processor to simulate multiple processors.

In the "Optimizer Design" tab I choose to minimize the "StayTimeDeviation" performance measure. Alternatively, you could, as you wrote, minimize the raw staytime and add a contraint to mark results outside of the time window as invalid.

When I now run the optimizer I get to the result, that a max. content of 5 is the only solution that keeps the staytime between 5 and 10 seconds.

Exported results ("Export as CSV"):

1629961084263.png

optquest_fm.fsm

I hope this helps you to get started with OptQuest. If you have further questions or issues feel free to comment or have a look at the manual.
https://docs.flexsim.com/en/21.2/Reference/Tools/ExperimenterOptimizer/


1629961084263.png (15.1 KiB)
optquest-fm.fsm (207.8 KiB)
· 2
5 |100000

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

SudheerReddy avatar image SudheerReddy commented ·

@Felix Möhlmann thanks it was really helpfull.

I am adding a constraint called Max content should be even number. I added below in FlexSim but it is showing as error.

1629962740677.png

0 Likes 0 ·
1629962740677.png (17.5 KiB)
Felix Möhlmann avatar image Felix Möhlmann SudheerReddy commented ·

Yes, the contraints only support <, >, ==, <=, >= as far as I know.

But you can add this to the parameter directly, if you choose "Discrete" type. Then you can define the step size in addition to the minimum and maximum value.

1629964847648.pngAnother alternative would be to use the "Option" type which lets you define exactly, which values the parameter can become.



0 Likes 0 ·
1629964847648.png (9.7 KiB)