question

Marc R5 avatar image
0 Likes"
Marc R5 asked Felix Möhlmann commented

scenarios given by the optimizer, not matching simulation

Hello,

I have this model and I am trying to use the optimizer but I am facing various problems.

- The optimizer is giving me production time equals to 0, that does not make sense

- The optimizer gives scenarios with the same outcome.

- The optimizer's scenarios, if I replicate them and play them in simulation, gives me a different value than the optimizer.

Please, I don't get what is the issue and stuck for a few days with this.

Thanks

Layout v3.2_14.fsm

FlexSim 22.0.2
optimizer
layout-v32-14.fsm (521.4 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 Felix Möhlmann commented

This model doesn't seem repeatable. When I run it, the message box appears at slightly different end times. If the model isn't repeatable, then you won't get consistent results from the Optimizer.

The end time doesn't seem to vary by much. However, other events in the model do vary, by quite a bit. Because my Windows region settings are different, I got exceptions in parsing the date/time values. These exceptions happened at wildly different times in the model; sometimes they happened at time 120, other times as late as 250. In a repeatable model, these exceptions should happen at exactly the same time, every time. The big swing in these exceptions reveals a severe repeatability problem. You can replicate these exceptions by changing lines 23 and 24 of the "Register to Departures GT" activities:

DateTime departureDate = DateTime(table[r]["DepartureDate"], "_broken_d/%m/%Y %H:%M:%S");
DateTime endDate = DateTime(table[r]["FabricationEndDate"], "_broken_%d/%m/%Y %H:%M:%S");

Then you can easily see the exceptions happening at different times.

If you fix the repeatability issues, you'll likely fix the optimizer issues you are having. This article provides many things to check, to make sure your model is repeatable:

https://docs.flexsim.com/en/22.1/BestPractices/ModelRepeatability/ModelRepeatability.html

· 16
5 |100000

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

Marc R5 avatar image Marc R5 commented ·

Hello Jordan, thanks for your response.

The model use different time for each piece in each processor. The total production time is what I need to minimize, so they need to change to take the min of them.

So to do that, each time the model resets, it changes the order of the arrivals, so the production time must change, as the pieces enters in a different time and each processors time are different for each piece. So, it will give different result each time it resets.

I am not sure if I understand this issue you say that the end time change.

About the issue with parsing datetime, I used "%d/%m/%Y %H:%M:%S" because someone on the forum told me it was the "universal" way, that won't give error in different region settings. Is it "_broken_d/%m/%Y %H:%M:%S" the way to avoid region settings issues?

Thanks.

0 Likes 0 ·
Marc R5 avatar image Marc R5 commented ·

This is where I change the values on reset.

It is done like this to iterate the order within each building and floor, so both of them are mantained in the same order, and within each, there are a lot of panels that will be changed in order to find the best production time according to the balancing between stations.

1650351582196.png

0 Likes 0 ·
1650351582196.png (74.3 KiB)
Felix Möhlmann avatar image Felix Möhlmann Marc R5 commented ·

In your model you are missing the last step of the proposed solution I provided in your previous question: Resetting the table to its original row order after assigning the "order" values based on the sequence parameter.

https://answers.flexsim.com/questions/118451/optimize-iterating-order-within-groups.html

Currently, when you apply the same sequence multiple times in a row the table order will change every time, which is likely why you run into repeatability issues. You can see this when you open the table and hit "Reset" multiple times in a row.

To have the model be repeatable I added a new column to the table in the other post, which determines the "correct" order of the table it is restored to at the end of the code. That way, the same sequence will always result in the same table.

1650358587673.png

1650358615456.gif

(The first reset after activating the last code line results in a "wrong" order still, since the table is not yet sorted by the last column. Afterwards, the table doesn't change on every reset anymore)

0 Likes 0 ·
1650358587673.png (48.9 KiB)
1650358615456.gif (380.3 KiB)
Marc R5 avatar image Marc R5 Felix Möhlmann commented ·
Thank you so much Felix. Sorry I missed that, I got confused...

So to do it dynamically, on the parameter "on set", I would copy paste the original order into a new column each time, so I can then order by it? Am I right?

Thank you so much again.

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.