ATTENTION

This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices.


flexsim.com

Go Back   FlexSim Community Forum > FlexSim Healthcare (HC) > FlexSim HC: Q&A
Downloads

FlexSim HC: Q&A Questions about FlexSim Healthcare

  #1  
Old 09-16-2013
Pongjetanapong Pongjetanapong is offline
Flexsim User
 
Join Date: Jul 2013
Posts: 19
Downloads: 5
Uploads: 0
Thanks: 8
Thanked 2 Times in 2 Posts
Rep Power: 85
Pongjetanapong is on a distinguished road
Smile Shift schedule import from excel

Hi,

Flexsim's defualt is a weekly fixed schedule and I'm trying to model a dynamic shift schedule imported from excel.

Has anyone tried or has an example model where they import and read shift schedule from excel?

What type of data should be specified in the excel data to determine operational time? and how would Flexsim read it from the global table?

I'd really appreciate your help. Thank you!
  #2  
Old 09-24-2013
Cliff King's Avatar
Cliff King Cliff King is offline
Vice President Technical Services
 
Join Date: Jul 2007
Location: Utah
Posts: 272
Downloads: 158
Uploads: 14
Thanks: 102
Thanked 304 Times in 110 Posts
Rep Power: 412
Cliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud ofCliff King has much to be proud of
Default Importing and exporting data between Excel sheets and FlexSim HC tables

If you want to try different scheduling scenarios in an experiment, then you should create all shift schedules you want to try ahead of time, and then use experiment variables to make shift schedule assignments to your staff across the various scenarios of the experiment as shown here:

Name:  ExperimentShifts.jpg
Views: 261
Size:  56.9 KB

However, it sounds like you're wanting to either change the definition of a shift schedule, or make a new shift schedule assignment during the course of a single model run. I'm guessing that both of these options are possible, but tricky! The tricky part is the timing associated with when you make the change. Whether you make the change when the staff are "up" (available) or "down" (unavailable) makes a difference. If the staff are in the "down" state, they are currently being controlled by a task sequence generated by the "Down Function" of the shift schedule they are currently a member of.

To change shift schedule assignments on the fly, you will be using the following two commands:

memberremove(DrMartin, "AM_Shift", 1);
memberadd(DrMartin, "PM_Shift", 1);

These two commands would first remove Dr. Martin from the AM_Shift schedule and then assign him to the PM_Shift schedule.

As for updating a given shift schedule on the fly, I've never tried it, but I suppose it may be possible. Once again, the trick is to do it at a time where it is safe to make the change. This will require some experimenting to figure out.

Let me point you in the right direction for importing or exporting tables between FlexSim HC and Excel. You need to be aware of the import/export tool found in the menu Tools>Excel>Table Import/Export. Here is an example showing two import/export tasks I named "AM_Shift" and "PM_Shift". These names happen to match the name of the two Shift Schedules I have in my model, and they match the sheet names in an Excel workbook I have saved.

Name:  Exporter.jpg
Views: 254
Size:  60.9 KB

It's important that the name of the task match the name of a sheet in an Excel workbook that you wish to either import from or export to. As for what table in the model, the data will be imported to or exported from, the "Table Type" and "Table" fields you see on the window in the above image. Keep in mind that you will be using one sheet per table you want to import/export; however, your workbook may contain multiple sheets of course.

The best way to ensure you have the data formatted correctly in your Excel workbook, is to first export the table from your model to the workbook. This will give you the template you need to create a proper formatted sheet to import back into the model after making changes to it. The import/export tool can be used to import/export data to several different types of tables (e.g. Shift Schedules, Global Tables, Arrival Schedules, Hourly Arrivals, etc.), and each table requires a different format.

As an example, here is what the "AM_Shift" schedule looks like in my model, and further down is a screenshot showing what it looks like properly formatted in an Excel workbook on a sheet I also named "AM_Shift".

Name:  FlexSimSchedule.jpg
Views: 231
Size:  385.6 KB

Name:  ExcelSchedule.jpg
Views: 221
Size:  410.9 KB

Typically, you would start the import or export tasks by clicking either the "Start Import" or "Start Export" button you see on the import/export tool shown up above. However, it is possible to start the import/export tasks with one of the following commands:

ImportTables();
ExportTables();

If you don't want to be prompted to browse for an Excel workbook, then you must enter a valid path to an existing workbook on your computer as shown in the example below:

ImportTables("D:/Users/cliff.king/Documents/FlexSimHC4/MyWorkbook.xls");

You might want to try executing these commands in the "Down Trigger" or "Resume Trigger" fields of your shift schedules, or maybe you'll need to execute them a little before or after the time of an actual shift change by executing them in a User Event (see Tools>User Events) at a specific time.

Good luck, and let me know how it goes. If you would like to work with me off-line to solve a specific model problem, I'd be happy to do so, just send me a direct email.

Cliff
The Following User Says Thank You to Cliff King For This Useful Post:
Pongjetanapong (09-25-2013)
  #3  
Old 09-25-2013
Pongjetanapong Pongjetanapong is offline
Flexsim User
 
Join Date: Jul 2013
Posts: 19
Downloads: 5
Uploads: 0
Thanks: 8
Thanked 2 Times in 2 Posts
Rep Power: 85
Pongjetanapong is on a distinguished road
Default

Hi Cliff

Thank you so much for the clarification, I'll try to experiment on this and let you know how it goes

Ploy


Thread Thread Starter Forum Replies Last Post
Importing Timetables/Shift Patterns into Flexsim from Excel Daniel Braund Q&A 2 08-19-2011 03:00 AM
Where is Import and Export fields in Ship Schedule Tap? syseo Container Terminal (CT) Library 1 02-03-2011 11:17 AM
Excel Data Import Sung Kim Q&A 2 07-16-2010 10:41 AM
how to import excel in source? qin tian Q&A 6 01-11-2010 10:58 PM
Import of data in schedule of a source Matthias Hofmann Q&A 3 10-07-2008 09:30 AM


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.