question

Tee Hiett avatar image
0 Likes"
Tee Hiett asked Matthew Gillespie answered

What is the command to get the simulation start time

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

FlexSim 19.1.0
simulation timestart timeoffset time
· 2
5 |100000

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

Matthew Gillespie avatar image Matthew Gillespie ♦♦ commented ·

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.

0 Likes 0 ·
Tee Hiett avatar image Tee Hiett Matthew Gillespie ♦♦ commented ·

@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 0 ·
excel-1.jpg (54.0 KiB)
model-settings.jpg (28.6 KiB)
quickproperties.jpg (103.6 KiB)

1 Answer

·
Matthew Gillespie avatar image
0 Likes"
Matthew Gillespie answered

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


datetime.png (14.7 KiB)
importschedule.fsm (238.7 KiB)
schedule.xlsx (9.0 KiB)
5 |100000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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