State variable

General Simio discussions. THIS IS *NOT* A GOOD PLACE FOR SUPPORT QUESTIONS.
To limit spam this and all Public Forums have very limited ability to attach files. We recommend that support issues and more technical topics be initiated inside one of the Simio Insider (SI) forums below where you can attach your model and see example solutions. See above Welcome forum to join Simio Insiders.
Post Reply
msalemip
Posts: 24
Joined: Fri May 13, 2016 2:30 pm

State variable

Post by msalemip » Tue May 17, 2016 8:20 pm

Hi

I am defining a state variable. How can I see the value of that state variable at the end of the simulation in the results?

Thanks

rthiesing
Simio Team Member
Posts: 94
Joined: Tue Jan 13, 2009 7:33 am
Location: Louisville, KY
Contact:

Re: State variable

Post by rthiesing » Tue May 17, 2016 10:27 pm

I would recommend reading up on State Statistics (Definitions Window) in the Help because that will likely meet your needs.
Renee Thiesing
Simio LLC

dsturrock
Simio Team Member
Posts: 1453
Joined: Thu Mar 13, 2008 12:35 pm
Location: Sewickley, PA USA
Contact:

Re: State variable

Post by dsturrock » Tue May 17, 2016 11:52 pm

Or for just the final value of a state or any expression, use OutputStatistics.
Dave Sturrock
VP Operations, Simio LLC

msalemip
Posts: 24
Joined: Fri May 13, 2016 2:30 pm

Re: State variable

Post by msalemip » Thu Sep 22, 2016 9:26 pm

My problem is that the set of workers should do a test on the patients and then clean the room and finish the final paper works.
From the simulation, I want to see in what days of the week and what times of the day, the number of workers does not match the demand. (see in what window thought out the week workers are more busy and people experience more waiting time, or workers are less busy).
I am thinking to define some states to save the total time which the worker where busy in a specific window. Or save the wait time of each patient in specific time windows. I want to have access to all the saved values at the end. For example if 1700 patients are generated and 500 of them are served in weekends; I want to see the waiting time of all those 500 patients in the weekends. So I am not looking for a single number. I am looking for some specific state values related to each patient or worker. And dependent on the definition of the state (which time frame it is focused on), I will save it in specific time frames.

I am not sure how I can do that. :roll:
Any help is really appreciated.

dsturrock
Simio Team Member
Posts: 1453
Joined: Thu Mar 13, 2008 12:35 pm
Location: Sewickley, PA USA
Contact:

Re: State variable

Post by dsturrock » Thu Sep 22, 2016 11:22 pm

One option is to look at the HourlyStatistics SimBit. This provides a general approach for collecting any statistic in any time periods.
You can also do something somewhat similar using TallyStatistics that are specified in a Time Indexed Table.

For a single replication with any use of TallyStatistics, you can also Enable Interactive Logging (on Advanced Options) to see the individual tally observations.

The ultimate is to use the Write or ExcelWrite step to record any information at any time. For example each time you want to record the value of an expression or state, you might write out ReplicationNumber, TimeNow, ExpressionValue, (and anything else that might be of value).
Dave Sturrock
VP Operations, Simio LLC

Post Reply