question

Borja Lorenzo avatar image
0 Likes"
Borja Lorenzo asked Borja Lorenzo commented

Random Ordering of Production Plan as an Experimenter Scenario

Hello,

I have a production plan in the Global Table "Plan_Produccion" with the orders to be placed and a Calculated Table where I get the total production time "TiempoTotalProduccion".

I need to get the best order of the orders from the production plan to get the lowest "TiempoTotalProduccion".

The idea would be to use the Experimenter to test different combinations in the ordering of the orders in the "Plan_Produccion". With different orderings of the orders, the proposed KPI of TiempoTotalProduccion (which will be defined as a Performance Measure) will vary its value. I know that this optimization would be the subject of study for OptiQuest, but before getting there, I would like to propose an intermediate option. The idea is to make this ordering automatic, and the number of combinations can be introduced as a Parameter (resulting in an error when the number of combinations is greater than the maximum possible number of combinations (number of rows raised to the number of rows)). With this, we would not obtain the optimal combination, but we could choose the best of the proposed combinations.


Could this random ordering of the production plan depend on a parameter, and could each combination be defined as a different scenario in the Experimenter?

I attach the file.

Thank you very much in advance.


Simplificación Statistic Collector from List 250114.fsm

FlexSim 24.1.1
experimenterparametersperformance measuresglobaltableordering
· 1
5 |100000

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

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Borja Lorenzo, 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 comment back to reopen your question.

0 Likes 0 ·

1 Answer

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

The first change you would need to make is to create a duplicate of the production table that serves as a base and stays unchanged at all times. Through the On Set code of a parameter or the model reset trigger you would then generate the production table used in the model run by copying over row by row in varying sequences.

You can use the "Sequence" parameter type for this. By selecting to run a "Range-Based" job in the experimenter a scenario for each possible permuation will be created automatically.

1736861078977.png


1736861078977.png (35.5 KiB)
· 5
5 |100000

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

Borja Lorenzo avatar image Borja Lorenzo commented ·

Hello

Thank you for your quick response.
In the definition of the Seq. length parameter, I have defined it with a code that looks at the number of rows in the Global Table (Plan_Produccion). Do I have to define the On Set code using FlexScript, or is there an option to do it through a guided assistant?

1736863019296.png

0 Likes 0 ·
1736863019296.png (129.4 KiB)
Felix Möhlmann avatar image Felix Möhlmann Borja Lorenzo commented ·

Sorting the rows into the actual production table needs to be done through self-written code.

1 Like 1 ·
Borja Lorenzo avatar image Borja Lorenzo Felix Möhlmann commented ·

Hello

I could tested Felix's propousal.

I have created the custom code at trigger on Set from Parameter 1 (Sequence type), that makes a copy of the "Plan_Produccion" table, copying rows whose index must be given by the element of parameter 1 (sequencer). I understand that in each execution, the Experimenter uses a different parameter, and from there arises the variation of the "Plan_Produccion_Copia" table.

In the custom code, I referred to the array of parameter 1 (sequencer) as newValue: param(2). I have changed my Process Flow to be linked to the copy table ("Plan_Produccion_Copia"), which I interpreted changes its order based on the different parameter applied by the Experimenter.

I'm not sure if I have understood the approach correctly or if I am interpreting the data correctly. I would appreciate your help with this.

Thank you very much.

Attached is the reference model.

Simplificación Statistic Collector from List 250124.fsm

0 Likes 0 ·
Show more comments