New to JaamSim, Looking for Time in System

1,258 views
Skip to first unread message

jber...@gmail.com

unread,
Sep 29, 2017, 12:29:14 PM9/29/17
to Jaamsim Users Discussion Group
Hi,

I've created a JaamSim simulation that's similar to the example in the User Manual. I've run my simulation and while looking at the .rep file (the report that's generated from the simulation), I do not see a value that would be related to the Average Time an entity was in the System.

Is there a way to collect specific statistics that may not be on the standard report that will provide me with the "average time in system" but not change the simulation? Like an "observation-only" type object?

Further, if it's possible to edit the standard report to include the calculation for this (Time in System = Time in Queue + Expected time being served)?

I'm trying to use JaamSim in place of Simio for a class I'm taking and I'm pretty sure this can be done with some work - I'm happy to learn more.

Best,
-J

jber...@gmail.com

unread,
Sep 29, 2017, 2:52:07 PM9/29/17
to Jaamsim Users Discussion Group
i.e. perhaps there's an addition that I can make to the configuration file that will capture this information?

Harry King

unread,
Sep 30, 2017, 10:38:23 PM9/30/17
to Jaamsim Users Discussion Group
J,

A SimEntity created and destroyed by your model has an output named StateTimes that contains the total time the entity has spent in each state. The default state is "None", so if you have not assigned the entity's state in your model, the total time in system is just StateTimes("None").

To record data on these times, add a Statistics object to your model, just before the EntitySink. Set its UnitType input to TimeUnit, and set its SampleValue input to 'this.obj.StateTimes("None")'. The Statistics object has outputs for minimum, maximum, and average values along with standard deviation, etc. If you want to create a histogram, use an EntityLogger object to record a log file containing the times and import it to Excel.

Note that you can use the RunOutputList keyword for Simulation to create a custom output report that contains only the outputs of interest. The custom output report is recorded in tabular form with one row for each replication of your model.

Harry

jber...@gmail.com

unread,
Oct 1, 2017, 11:23:46 AM10/1/17
to Jaamsim Users Discussion Group

Hi Harry,

Thank you so much. The Statistics object worked perfectly. The 'this.obj.StateTimes("None")' was the part I was missing.

I have had great success with the custom report via RunOutputList and importing the data into R for analysis. My primary concern going forward would be the need to build a custom report for a complex simulation using this keyword method.

I downloaded eclipse, followed the instructions to get JaamSim to run from within it. I had planned on messing with how the .rep is generated to make a more long-term reporting solution - has anyone been able to do that successfully? Basically, I'm trying to set it up such that I get a specific set of Little's Law type results as standard output.

Harry King

unread,
Oct 1, 2017, 2:48:02 PM10/1/17
to Jaamsim Users Discussion Group
J,

I am not aware of anyone who has created a custom output report. It would be possible to do so, but I think it would be far easier to use the existing RunOutputList feature. With a long list of outputs to print, it is best to prepare the inputs to the RunOutputList and UnitTypeList keywords in a suitable text editor (Notepad++) and copy and paste the values to the Input Editor (using Ctrl-V). Or, you can edit the .cfg input file directly -- it is human readable by design.

Harry

simon...@gmail.com

unread,
Nov 21, 2018, 12:47:47 AM11/21/18
to Jaamsim Users Discussion Group

Hi - I have number of EntityContainers that are moving around a circuit (and never disposed) with SimEntities being added to and removed from the containers and sent to an EntitySink. At each leg of the circuit, I have assigned the appropriate state to the containers.

I have added the Statistics object as described in this thread and get the data as expected for each StateTime, but the data does not appear in the report file.

From your description, I think StateTimes are persisted when the entity is destroyed (which I'm not doing with my containers).

Is there a way to get this data in the report without sending the containers to a sink?

Harry King

unread,
Nov 21, 2018, 1:35:48 PM11/21/18
to Jaamsim Users Discussion Group
Simon,
 

I have added the Statistics object as described in this thread and get the data as expected for each StateTime, but the data does not appear in the report file.


HK - The outputs for the Statistics object will appear in the main report. Outputs for the individual EntityContainers will NOT appear if they were created by an EntityGenerator. Only the permanent entities appear in the report.
 

From your description, I think StateTimes are persisted when the entity is destroyed (which I'm not doing with my containers).


HK - No, it doesn't make any difference if the entities are destroyed or not.
 
If this information doesn't help you to solve the problem, I suggest that you post your model so that I can look into it further.

BTW, it is best to create a custom output report using the RunOutputList feature instead of finding the information you want in the main report.

Harry

ragha...@gmail.com

unread,
Apr 11, 2019, 1:37:36 PM4/11/19
to Jaamsim Users Discussion Group
Follow up question - Is it in any way possible to get raw data from transient entities such as EntityContainers and Entities into a file?

Use case:
To retrieve time spent by an Entity between 2 permanent Objects in a table and run analysis independent of JaamSim reports.

Please let me know I can do so in any capacity - Thank you for your assistance :)

Harry King

unread,
Apr 11, 2019, 2:13:36 PM4/11/19
to Jaamsim Users Discussion Group
Use the EntityLogger object to record information in an external file.

Harry
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
Message has been deleted
0 new messages