question

t-hige avatar image
0 Likes"
t-hige asked t-hige commented

Crash caused by resetmodel in On Run Stop event

Hello all.

FlexSim crashes when I call the resetmodel function on the On Run Stop event.

It seems that an exception is generated in the switch shader, so I have updated the graphics driver and Windows Update, but there is no change.

I have tried this on other PCs and the same phenomenon occurs.

Is it impossible to call the resetmodel function from the On Run Stop event?

If this is not a bug, is there an alternative way to reset the model in the On Run Stop event?

resetmodel.fsm

FlexSim 24.0.4
simulations
resetmodel.fsm (27.5 KiB)
· 3
5 |100000

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

t-hige avatar image t-hige commented ·

It does not crash when run in steps, but crashes when run with cleared breakpoints.

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann commented ·
My guess would be that as part of the reset process the model is stopped, resulting in an infinite loop.

Is there a particular reason why you want to use this logic structure instead of just resetting the model directly?

0 Likes 0 ·
t-hige avatar image t-hige Felix Möhlmann commented ·

I would like to have it reset and run automatically when it is stopped.

0 Likes 0 ·

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered t-hige commented

Resetting and running the model again is not really possible inside FlexSim itself because any pending actions (like starting the model again) will be lost on reset. There are two options:

- Use the experimenter to run multiple replications of the same model and/or scenarios that have different parameter values set.

https://docs.flexsim.com/en/24.2/GettingData/AdvancedDataGathering/KeyConceptsExperiments/KeyConceptsExperiments.html

https://docs.flexsim.com/en/24.2/GettingData/AdvancedDataGathering/RunningJobs/RunningJobs.html

- Control FlexSim externally to start and stop runs.

https://answers.flexsim.com/questions/122645/how-to-stop-and-resume-a-flexsim-model-externally.html

https://answers.flexsim.com/questions/149147/controlling-flexsim-externally.html

· 7
5 |100000

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

t-hige avatar image t-hige commented ·

Thank you for your reply.

However, I want to reset and run it from the beginning, not restart. Is this also impossible?

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann t-hige commented ·
I don't see a difference between the two (?)
0 Likes 0 ·
t-hige avatar image t-hige Felix Möhlmann commented ·

Sorry. I made a mistake.

I mean,isn't what you're saying "resume"?

I want to "reset and run from the beginning".

0 Likes 0 ·
Show more comments