question

Ryusuke T avatar image
1 Like"
Ryusuke T asked Jordan Johnson commented

Permutation not found in FlexSim 2021

I was doing OptQuest with permutations in FlexSim 2020.


However, I noticed that FlexSim 2021 does not have permutation items.

In FlexSim 2021, I know that the setting information has been moved from the "Optimizer Design" tab to the "Model Parameter Table". However, I couldn't find it there either.


How can I do OptQuest with permutations in FlexSim 2021?

FlexSim 21.0.4
model parameters tableflexsim 21.0.4permutation
1622006055715.png (14.4 KiB)
1622006096247.png (25.9 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

·
Jordan Johnson avatar image
1 Like"
Jordan Johnson answered Jordan Johnson commented

You can use the Sequence variable. Instead of adding N permutation variables, you specify that the sequence length is N. OptQuest will see a single sequence variable as N permuation variables in a permuation group.

· 6
5 |100000

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

Ryusuke T avatar image Ryusuke T commented ·

@Jordan Johnson

Thank you for your reply. I have tried using sequence variable. But it didn't work.

I will attach the model created in 2020 and the model created in 2021.


I will explain the model.

Three types of objects are created in queue 1. The object is assigned the label "Type", but this information refers to the value in "Global Table 2".


The setup time of Processor1 is changed according to the Type information of the object set up immediately before. Refer to "Global Table 1" for setup time information.

For example, if the type of the object set up last time is "3" and the type of the object set up this time is "1", the setup time will be "5". The first time will be ignored.

This is a scenario in which the OptQuest is used to rearrange the values in "Global Table 2" to find the combination that minimizes the setup time.

Am I doing something wrong with the FlexSIm 2021?

Permutation_2020.fsm

Permutation_2021.fsm

0 Likes 0 ·
20210602-1.png (2.7 KiB)
permutation-2021.fsm (145.3 KiB)
permutation-2021.fsm (145.3 KiB)
Jordan Johnson avatar image Jordan Johnson ♦♦ Ryusuke T commented ·

Here is a modified version of the model you sent:

permutation-2021_1.fsm

First, you don't need GlobalTable2 anymore. That table's purpose was to define the sequence of rows to use in GlobalTable1. Instead, you just need a single parameter. A sequence parameter holds all the values of the sequence, so you only need one. I set the Sequence Length to Table("GlobalTable1").numRows, so that the number of values in the sequence will match the number of rows in the table.

I renamed the first parameter "Sequence" and then I used it in the model with code like this:

Model.parameters.Sequence[3] // get the 3rd sequence value

A sequence parameter's value is an array, so you can get any of the values of that array, anywhere in your model.

Then I set up an experiment to demonstrate how you change the whole sequence for a single parameter value.

Let me know if that makes sense.

0 Likes 0 ·
Ryusuke T avatar image Ryusuke T Jordan Johnson ♦♦ commented ·

@Jordan Johnson

Thank you for your reply. This solution is all I wanted to know!

This content was very helpful.


I'm really thankful to you!

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.