Simulation run time and stopping clouses

384 views
Skip to first unread message

herna...@gmail.com

unread,
Nov 6, 2016, 12:32:13 PM11/6/16
to Jaamsim Users Discussion Group
Hi! Im having trouble using JaamSim 2016-21.

How can i set a stop running condition so that the RunTime in my .rep file doesn't end up being always 526600 min?

The model i have to simulate requires specifically to:
-Stop generating entities after a certain period of time has passed.
-Only after everyone has left the system the simulation has to stop. All the clients in the system must end their activities and then leave.

I've solved the first problem with an expression threshold at the EntityGenerator:
-If SimTime is bigger than a value, set Open to false.

The second problem was solved with a PauseCondition that evaluates an expression that says:
-when the number of entities processed by the EntityGenerator equals the number of entities processed by the EntitySink the simulation pauses.

It works fine under only one run, but here's the thing...When i set multiple runs it doesn't. The SimRunDuration is always 526000 min in the reports and this messes up some statistics...

I don't now how to attach a .cfg file.
Hope i would be clear, thanks in advance.


By the way, it a great software. Congratulations!

Message has been deleted

herna...@gmail.com

unread,
Nov 6, 2016, 12:36:31 PM11/6/16
to Jaamsim Users Discussion Group, herna...@gmail.com
Forgot to mention that the second condition is:

-When the number of entities processed by the EntityGenerator equals the number of entities processed by the EntitySink the simulation pauses
AND
-When the first condition is met too.

Harry King

unread,
Nov 6, 2016, 2:45:33 PM11/6/16
to Jaamsim Users Discussion Group, herna...@gmail.com
Hernanunpa,

-Stop generating entities after a certain period of time has passed.
-Only after everyone has left the system the simulation has to stop. All the clients in the system must end their activities and then leave.

I've solved the first problem with an expression threshold at the EntityGenerator:
-If SimTime is bigger than a value, set Open to false.


HK - Use a TimeSeries and a TimeSeriesThreshold for this purpose. An ExpressionThreshold only checks its expression when an event occurs, and SimTime reaching a specified value does not automatically create an event.
 

The second problem was solved with a PauseCondition that evaluates an expression that says:
-when the number of entities processed by the EntityGenerator equals the number of entities processed by the EntitySink the simulation pauses.

It works fine under only one run, but here's the thing...When i set multiple runs it doesn't. The SimRunDuration is always 526000 min in the reports and this messes up some statistics...

I don't now how to attach a .cfg file.


HK - If you become a member of the forum, you will be able to attache a file to your post. I'll need to see your inputs to solve this problem.

Harry

Message has been deleted

Hernan da Silva

unread,
Nov 6, 2016, 3:00:02 PM11/6/16
to Jaamsim Users Discussion Group, herna...@gmail.com
Thanks for responding so quick Harry.
I've sent a request get into the forum.
Meanwhile, here's my cfg file.
https://docs.google.com/document/d/1CP5yLAhb-Xq0pPwap3-_tJFjMa1F75R1h3WQ1JQSFnc/edit?usp=sharing

Thanks!

Hernan da Silva

unread,
Nov 6, 2016, 4:03:31 PM11/6/16
to Jaamsim Users Discussion Group, herna...@gmail.com
Here's the cfg file.

Thanks!
Eje3.cfg

Harry King

unread,
Nov 6, 2016, 8:04:33 PM11/6/16
to Jaamsim Users Discussion Group, herna...@gmail.com
Hernan,

This turns out to be a bug in the Multiple Runs logic. It will be fixed in the next release, about one week from now. Unfortunately, I can't think of a workaround you could use it the meantime.

Thanks for bringing it to my attention.

Harry

Hernan da Silva

unread,
Nov 7, 2016, 8:39:19 AM11/7/16
to Jaamsim Users Discussion Group, herna...@gmail.com
Ok, no problem Harry. Thanks for your time!

Harry King

unread,
Nov 26, 2016, 7:23:42 PM11/26/16
to Jaamsim Users Discussion Group, herna...@gmail.com
Hernan,

The bug involving Multiple Runs and the PauseCondition and ExitAtPauseCondition keywords has been fixed in release 2016-22.

Harry
Reply all
Reply to author
Forward
0 new messages