What is the command to get the simulation start time

What is the command to get the simulation start time

tee_hiett
Not applicable
111 Views
3 Replies
Message 1 of 4

What is the command to get the simulation start time

tee_hiett
Not applicable

[ FlexSim 19.1.0 ]

I would like to use the start simulation time to adjust the Offset Time for the arrivals to start in the Schedule Source Activity. What is the command which will give me the simulation time?

Thanks

Tee

0 Likes
Accepted solutions (1)
112 Views
3 Replies
Replies (3)
Message 2 of 4

Matthew_Gillespie
Autodesk
Autodesk

I'm not understanding what you're trying to do. The start simulation time is always 0.

You can use

Model.time 

to get the current simulation time.



Matthew Gillespie
FlexSim Software Developer

0 Likes
Message 3 of 4

tee_hiett
Not applicable

@Matthew Gillespie, My concept of simulation start time comes from FlexSimHC Verson 5.3.10 command getsimstarttime(). I should have used Model Start Time as shown in the attached ModelSettings JPEG file

Maybe if it would help if I briefly explain the process I trying to use and get your suggestions for making it work. The process begins with building the scheduled arrival of patients in an Excel workbook as shown in the Excel 1 JPEG file. The column Sch_Time contains the scheduled arrival times for each patient. In the Time column, I converted the scheduled time to the number of minutes into the simulation if the simulation process started at the time of the arrival of the first patient.

After importing these data into the FlexSim model, I have just the Source Activity with the offset time of 90 minutes which means that the simulation will start at 90 minutes later the first patient will arrive at 8:30 AM. This is shown in the QuickProperties JPEG file.Of course, this means that if the user wants to open the clinic at 6 AM instead of 7 AM the Offset Time will have to be 150 minutes For the first patient to arrive at 8:30 AM.

I would rather that the user not have to remember to change the Offset Time when changing the Model Start Time. I was thinking that with access to the Model Start Time, I could have a simple program compute the Offset Time based on that value of Offset Time.

Does this approach seem reasonable and doable? Is there a better way to do this?

Thanks for the help.

Tee

excel-1.jpg model-settings.jpg quickproperties.jpg

0 Likes
Message 4 of 4

Matthew_Gillespie
Autodesk
Autodesk
Accepted solution

I would use a DateTime Source activity set to the "Use Model Start Date/Time" Time Mode. That way you can just define times for arrivals and the patients will show up at that time in the model regardless of what the model's start time is. (Note that arrivals before the start time will be ignored). See the attached model and excel file.

importschedule.fsm

schedule.xlsx

19860-datetime.png



Matthew Gillespie
FlexSim Software Developer

0 Likes