question

Kevin avatar image
0 Likes"
Kevin asked Jeanette F commented

The Model works unproperly if I do not "look at" it.

I encountered a confusing problem. Suppose I do not open the main workspace of Flexsim and let the model run underground automatedly. In that case, the model's event list will become wired, which means it only contains the Inter-Arrival Source events and all tokens get stuck in the Inter-Arrival Source Activity. And the tokens become more and more but they are not sent to the next activity. And other process flows do not create proper tokens either. The model throws this exception: "time: 1.000000 exception: Exception caught in Executive::processeventinlist()."or "time: 2.000000 exception: Exception caught in Executive::processeventinlist()."

1676096608611.png1676096670404.png

But If I open the workspace and watch the model running, it will be ok and run well. And the same exception is thrown but the model is not influenced. And I noticed that the exception time will become 0.00 such as"time: 0.000000 exception: Exception caught in Executive::processeventinlist()." So what's the difference between running background and running visibly?

The reason why I ask this question is that if I change the visible parameters in the reinforcement learning code the learning process will not continue well. It will get stuck in this procedure.

1676096689940.png

1676096525996.png

In this way, training my reinforcement learning model only can be proceeded in a visible environment, which makes it very slow.

I guess the reason may be the 3D and animation parts. So I removed those activities that contain "change 3D shapes activity" but it did not work.

And the model is based on the KIVA system model provided by Flexsim's Youtube channel.


Thanks!

FlexSim 22.2.2
reinforcement learningvisualizationprocesseventinlist
1676096525996.png (6.4 KiB)
1676096608611.png (134.0 KiB)
1676096670404.png (34.3 KiB)
1676096689940.png (3.1 KiB)
· 4
5 |100000

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

Kevin avatar image Kevin commented ·

I believe you know the logic of reinforcement learning training is resetting the model and the model will run automatedly. Can you explain it to me detailedly? Why can "reset" lead to "run"? Maybe this answer can be found through this part of logic.

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Kevin commented ·
Often the symptom you describe of different behavior when being viewed is caused by onDraw code doing things in the model to make it work which aren't happening when it's running in the background. Are you able to first check your model is repeatable using experiments and running interactively before applying reinforcement learning? To do this you can check the results and if different examine the event list log of two runs of the same replication. If you establish it is stable and repeatable then you could post the model and we could take a look.
0 Likes 0 ·
Ben Wilson avatar image Ben Wilson ♦♦ Jason Lightfoot ♦♦ commented ·
0 Likes 0 ·
Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Kevin,

We haven't heard back from you. Were you able to solve your problem? If so, please add and accept an answer to let others know the solution. Or please respond to the previous comment so that we can continue to help you.

If we don't hear back in the next 3 business days, we'll assume you were able to solve your problem and we'll close this case in our tracker. You can always comment back at any time to reopen your question, or you can contact your local FlexSim distributor for phone or email help.

0 Likes 0 ·

0 Answers