Task 1.1 - Use an Activity Set

Task Overview

FlexSim Healthcare's 3D objects and process flow activities make it easy to build a variety of health care simulation models, such as hospitals, emergency rooms, clinics, etc. In this tutorial task, you'll learn about the basics of building a FlexSim Healthcare (HC) model. You'll learn how to:

  • Switch to the FlexSim Healthcare environment
  • Add a floor plan to a 3D model
  • Add locations and staff to your 3D model
  • Create object groups
  • Build a process flow that will create people inside the 3D model
  • Use an activity set in a process flow for faster logic building

To teach you how to use the FlexSim Healthcare 3D objects and process flows, you'll build a portion of a walk-in health care clinic. In this tutorial task, you'll only build the section of the system that handles new patient arrivals. You'll add the necessary objects and create the basic behavior of a patient that arrives at the clinic and registers at the front desk.

When you're finished with this task, your model will look similar to the following image:

Step 1 Add a Floor Plan

In this step, you'll create a new model and switch to the FlexSim Healthcare environment. Technically, this step is unnecessary because you can access all the same 3D objects and process flow activities without being in this environment. For example, you can access the FlexSim Healthcare 3D objects in the Library under the People group and you can access the FlexSim HC process flow activities in the Library in various People groups near the bottom of the process flow library.

However, when you switch to the FlexSim Healthcare environment, those specific 3D objects and process flow activities will move to the top of their respective libraries, making them easier to access. The overall interface, the main toolbar, and organization of objects in the library also becomes simpler and more streamlined for building health care models.

After switching to the Healthcare environment, you will add a floor plan of the clinic that you will simulate in this tutorial. This floor plan was included with FlexSim when you installed the software. When you're finished adding the floor plan, your model should look similar to the following image:

To switch to the FlexSim Healthcare environment and add a floor plan:

  1. Create a new model using the default settings.
  2. In the top right corner of the main window (above Quick Properties), click the Change Environment button to open a menu. Select Healthcare to switch to the FlexSim Healthcare environment.
  3. On the main toolbar, click the Floor Plans button button to open a menu. Select Add a Floor Plan to add a new floor plan and open its Model Background Properties window.
  4. In the Background tab, next to the File name box click the Browse... button to open your computer's file directory.
  5. Navigate to your computer's Documents folder, then to the FlexSim 2019 Projects folder. Double-click the ER_small.dwg file to select it.
  6. You'll use the default settings for the drawing's spatials.
  7. In the Layers tab, click the green-colored box next to the Wall Layer and select the color white to make the walls more visible.
  8. You'll use the default settings in the Snap Points tab.

Check to ensure your 3D model looks similar to the image in the beginning of this step.

Step 2 Add Locations to Your 3D Model

The FlexSim Healthcare 3D Library has a set of objects that are specifically designed for building health care models. In this step, you'll learn how to add FlexSim Healthcare locations and multi-locations to a 3D model.

If you're familiar with FlexSim in general, locations are similar to fixed resources for flow items in the standard FlexSim environment. Patients will move to these locations and interact with them based on the type of object they are. Usually the interaction will involve changing something about the patient's visuals or animations while they arrive at, use, or exit the location. For example, when patients interact with a chair, it will animate them sitting in a chair.

You'll also add a multi-location to your 3D model in this step. A multi-location is a location that contains a group of related locations. When a patient attempts to acquire the multi-location, any of the individual locations in this group could be acquired. In this model, you'll add a chairs multi-location to represent chairs in a waiting room area. Each individual chair can potentially be acquired by the patients, but you don't need to add each chair to the model; you can simply add the group of chairs. In this step, you'll also learn how to edit a multi-location to add additional chairs to the group.

At this point, you'll just build the registration area of the model, which will include an entrance and exit for patients, a registration desk where they will sign in when they arrive, a waiting area, and a chair where the patients will have their vitals checked. When you're finished, your 3D model will look similar to the following image:

To add these locations to your model:

  1. In the left pane, click the Library tab to open the Library.
  2. Under the Healthcare group of objects, click the Location object to open a menu of location objects. Drag a Registration object into the 3D model. (Use the image at the beginning of this section as a guide for the placement of objects.)
  3. In the Library under the Healthcare group, click the Prop object to open a menu of prop objects. Drag a Glass door (under the Doors group) into the 3D model.
  4. In the 3D model, click the GlassDoor1 object to select it. In Quick Properties, rename the object as Entrance1.
  5. In the Library under the Healthcare group, click the MultiLocation object to open a menu of multi-location objects. Drag the Chairs object into the model.
  6. In the 3D model, click the Chairs1 multi-location to select it. In Quick Properties, rename the object as WaitingArea1.
  7. In Quick Properties under the MultiLocation group, check the Edit Mode checkbox.
  8. In the Locations box, increase the number to 15.
  9. Notice that there are now 15 chairs in the WaitingArea1 multi-location.
  10. Move and rotate the newly added chairs so that they look like a larger waiting room area. (Right-click the blue sizer arrow to rotate the chairs or use Quick Properties to change their Z-rotation to -90 or 0.)
  11. When finished, clear the Edit Mode checkbox in Quick Properties.
  12. In the Library under the Healthcare group, drag a Waiting Line into the model.
  13. Click the end of the WaitingLine1 and drag it to rotate it 90 degrees and resize it if needed to fit your model.
  14. Double-click WaitingLine1 to open its properties window.
  15. On the WaitingLine tab in the Stanchions group, clear the Draw Stanchions check box.
  16. Click the OK button to save the changes and close the properties window.
  17. In the Library under the Healthcare group, click the Location object to open a menu of location objects. Drag a Triage into the model.
  18. Click Triage1 to select it. In Quick Properties, rename it as VitalsChair1.

Check to make sure your 3D model looks similar to the image shown at the beginning of this step.

Step 3 Create 3D Object Groups

In this step, you'll learn how to add staff objects to your 3D model. You'll then learn how to create staff and location object groups. You'll also explore how groups work with FlexSim Healthcare 3D objects in general by exploring groups in the Toolbox. See Creating 3D Object Groups for more information about groups.

By default, all locations are automatically added to one of the main object groups: the Locations group. In a similar vein, all staff are added to the Staff group. However, you also have the ability to create additional groups or sub-groups to better organize your model. As you'll see in a later step, these groups are important to building the logic for FlexSim Healthcare objects.

In this step, you'll add a staff member that will act as a clerk. You'll create a sub-group of the Staff group called Clerks that will contain this new staff member. Then you'll add two additional staff members to the 3D model and add them to a sub-group called RNs. You'll also add the VitalsChair to a group called VitalsCheckAreas.

With these groups set up, you'll be able to add additional staff members or locations to these groups without having to change your logic, as you'll see in later steps.

When you're finished, your 3D model will look similar to the following image:

To add a staff member and create object groups:

  1. In the Library under the Healthcare group, click the Staff object to open a menu of staff objects. Drag a Clerk into the model. (Use the image at the beginning of this guide on the placement of objects.)
  2. In the Library, click the Staff object to open a menu. Drag an RN (Female) and an RN (Male) into the model.
  3. In the left pane, click the Toolbox tab to open the Toolbox. Expand the Groups folder, then expand the People folder, and then expand the Staff folder.
  4. Double-click the Staff group to open its properties window. Notice this automatically includes Clerk1, RN1, and RN2 as members. Close the group window.
  5. In the 3D model, right-click Clerk1 to open a menu. Point to Staff Groups, then select Add to New Group to open a group properties window.
  6. In the name box, delete the current text and rename the group Clerks.
  7. Confirm that Clerk1 is listed as a member and that Staff is listed as the parent group. Close the group window.
  8. In the 3D model, press the Ctrl button and click RN1 to select it. While still pressing the Ctrl key, click RN2 to select it as well. Right-click RN1 open a menu. Point to Staff Groups, then select Add to New Group to open a group properties window.
  9. In the name box, delete the current text and rename the group RNs.
  10. Confirm that RN1 and RN2 are both listed as a member and that Staff is listed as the parent group. Close the group window.
  11. Press and hold down the Shift key while clicking a blank area in the 3D model with your mouse to de-select the RNs.
  12. In the Toolbox, confirm that the Staff folder now includes the Clerks group and the RNs group. Double-click the Staff group to open its properties window. Confirm that this group now includes the Clerks group and the RNs group as sub-groups. Close the group window.
  13. In the Toolbox, expand the Locations folder, and then double-click the Locations group to open its properties window. Notice this automatically includes all the locations that have been added to the 3D model as members. Close the group window.
  14. In the 3D model, right-click the VitalsChair1 to open a menu. Point to Location Groups, then select Add to New Group to open a group properties window.
  15. In the name box, delete the current text and rename the group VitalsStations. Close the group window.
  16. In the 3D model, right-click WaitingArea1 to open a menu. Point to Location Groups, then select Add to New Group to open a group properties window.
  17. In the name box, delete the current text and rename the group WaitingAreas. Close the group window.
  18. In the Toolbox, confirm that the Locations folder now includes the VitalsCheckAreas group. Double-click the Locations group to open its properties window. Notice this group now includes the VitalsCheckAreas group and the WaitingAreas groups as sub-groups. Close the group window.

Consider saving your simulation model at this point.

Step 4 Add Activities to Process Flows

In this step, you'll learn how to set up process flows. The Process Flow tool allows you to build a flowchart of your model's logic. Inside that flowchart, you'll add activities that contain small chunks of pre-programmed logic or instructions. When a simulation model runs, small green circles called tokens move through the process flow activities, performing each activity's instructions.

In this step, you'll create two process flows. One will be a patient process flow named PatientTrack that you'll use to control how the patient interacts with the 3D model after it has been created. The second will be a general process flow named PatientArrivals that will control how frequently patients will be created inside the 3D model.

Inside the PatientTrack process flow, you'll add an activity set called Wait in Line then Process. FlexSim Healthcare models have several activity sets you can use to build your simulation model's logic. Activity sets are groups of process flow activities that have been pre-programmed to accomplish some of the most common logical tasks in FlexSim Healthcare models.

The activity set you'll add in this step contains activities that will instruct a patient to walk to the registration desk and begin the registration process. If the receptionist is busy helping another patient, the current patient will wait in line.

When you're finished, your process flows should look similar to the following image:

For now, you'll merely add and connect these activities to the two process flows. You'll edit the properties to add logic in a later step.

To add and connect these activities:

  1. On the main toolbar, click the Patient Flows button to open a menu. Select Add a Patient Process Flow to create a new process flow. You'll notice two process flows will open in a separate window.
  2. Click the Arrivals tab to open it. In Quick Properties in the Process Flow Name box, change the name of this process flow to PatientArrivals.
  3. Notice that there is a stacked block of three activities in this process flow. Rename some of the activities as follows:
  4. Activity New Name
    Source Patient Arrival Schedule
    Sink Patient Was Created
  5. Click the Patient Flow tab to open it. In Quick Properties in the Process Flow Name box, change the name of this process flow to PatientTrack.
  6. Notice that this process flow already has a Schedule Source activity. Rename this activity as Patient Arrives.
  7. In the Library under the HC Activity Sets group, drag a Wait in Line then Process activity set into the PatientTrack process flow.
  8. Rename the container as Patient Registration.
  9. In the Library under the HC Sub Flows group, add a Walk activity to the process flow, inserting it immediately after the other Walk activity.
  10. For clarity, rename the shared assets and activities in this container as follows:
  11. Activity or Shared Asset New Name
    Location Registration
    Staff Clerk
    Wait In Line Wait in Registration Line
    Acquire Location Acquire Registration
    Acquire Staff Acquire Clerk
    Walk (first one) Walk to Registration
    Walk (second one) Walk to Patient
    Process Register Patient
    Release Staff Release Clerk
    Release Location Release Registration
  12. Create a connector from the Patient Arrives activity to the first Wait in Registration Line activity in the Patient Registration container.

Check to ensure that your two new process flows look similar to the image at the beginning of this step.

Step 5 Edit the Activity Properties

In this step, you'll edit the properties for the activities in the process flow. One important concept to keep in mind is that in this tutorial you'll use a process flow instance for each patient that is created by the PatientArrivals process flow. That means that each patient will run its own individual copy of the PatientTrack process flow based on the template you'll build for the patient in this step. See Process Flow Instances for more information about how process flow instances work.

In practical terms, this means that any time you see the keyword patient in the properties for an activity, it will refer to the current patient that is running this instance of this process flow. The token that runs through that instance will be tied to that patient.

In this step, you'll also see how the staff groups you set up earlier in the tutorial will be used in this model's logic. When a staff member is required to help a patient, you can assign any member of the group to help the patient (as opposed to assigning a specific staff member). When needed, the process flow will select the first available member of this group to work on a task.

Using object groups will help your model scale well as it becomes more complex. It makes it so that you can add extra chairs, clerks, nurses, etc. as needed without having to change the model's logic. When you add new objects to the 3D model, all you will have to do is add the new members to the group and FlexSim Healthcare will take care of the rest of the logic. These object groups also make it possible to easily study the impact of adding additional staff or location resources to your model to find the most efficient use of resources.

The following is an overview of how each activity in the PatientArrivals process flow will function:

Activity or Shared Asset Explanation
Patient Arrival Schedule This activity will create a token when the simulation starts and release that token to the next downstream activity. You'll only start with one patient for now to test the simulation model. You'll modify the patient arrival schedule in a later tutorial task.
Create Patient This activity will create a new person and place it inside the Entrance in the 3D model. This person will represent a patient moving through the system. When this person is created, it will create an instance of that patient that will run its own copy of the PatientTrack process flow.
Patient Was Created This activity will remove the tokens from the PatientArrivals process flow once the patients have been created. You'll use the default settings.

And the following is an overview of how each activity in the PatientTrack process flow will function:

Activity or Shared Asset Explanation
Patient Arrives This activity will create a token as soon as a new patient is created by the PatientArrival process flow. This token will be associated with the patient that was created in the 3D model.
Registration This shared asset will link to the Registration1 location in the 3D model.
Clerk This shared asset will link to the Clerks group that you created in an earlier step.
Wait in Registration Line This activity will send the current patient to WaitingLine1. This activity is pre-programmed to work correctly as part of the Wait in Line then Process activity set, so you'll use its default settings. Since you didn't change the default name of this waiting line, this activity will automatically send patients to it. If you had changed the name of the waiting line, you would have to specify the waiting line to which you wanted to send patients.
Acquire Registration This activity will attempt to acquire the Registration1 location. If another patient is using the Registration1 location, the token will remain at this activity and the patient will wait in line until the Registration1 location is free. If the Registration1 location is acquired, the token will move to the Acquire Clerk activity instead. This activity is pre-programmed to work correctly as part of the Wait in Line then Process activity set, so you'll use its default settings.
Acquire Clerk This activity will acquire a member of the Clerks group. If all members of the Clerks group are busy working on other tasks, the token will wait at this activity until a clerk is free.
Walk to Registration Once the Registration1 location and a clerk have both been acquired, this activity will tell the patient to walk to the Registration1 location.
Walk to Patient This activity will send the clerk to the patient's location at the registration desk. You'll link it to the Clerk shared asset so that it will use the same clerk that was acquired in the previous activity.
Register Patient This activity will represent the amount of time it takes to register the patient. You'll set that time to 15 seconds for now.
Release Clerk Once the registration process is complete, this activity will release the clerk that was acquired earlier in the process flow. The clerk will then be free to work on other tasks or to be acquired by other patients.
Release Registration This activity will release the Registration1 location so that it is free for other patients to acquire.

To edit these properties:

  1. In the PatientArrivals process flow, click the Create Patient activity to select it. In Quick Properties next to the Destination box, click the Sampler button to enter sampling mode.
  2. In the 3D model, click Entrance1 to open a menu. Select Entrance1 to sample it.
  3. Confirm that the Patient Flow box indicates that it is linked to the PatientTrack process flow.
  4. Click the PatientTrack tab to make this process flow active.
  5. Click the Registration shared asset to select it. In Quick Properties next to the Location box, click the Sampler button to enter sampling mode.
  6. In the 3D model, click Registration1 to sample it.
  7. Click the Clerk shared asset to select it. In Quick Properties, click the arrow next to the Staff box to open a menu. Point to Staff Groups, then select Clerks.
  8. Click the Walk to Patient activity to select it. In Quick Properties next to the Person box, click the Sampler button to enter sampling mode.
  9. Click the Clerk shared asset in the process flow (not the 3D model) to sample it.
  10. Click the Register Patient activity to select it. In Quick Properties in the Process Time box, delete the current text and type 15.00.

Consider saving your simulation model at this point.

Step 6 Test Your Model

In this step, you'll run your simulation model. In general, it's a good idea to regularly test your model logic after you've built a small section of it. When you run the model, you'll notice errors or things that didn't work as expected. See Running a Simulation Model for more information.

To run the model, press the Reset button on the simulation control bar, which is below the main toolbar. (Pressing Reset clears the simulation model and returns it to its starting values.) Press Run to start the simulation and Stop to pause it.

As you watch the 3D model, the patient arrives through the door, walks to the waiting line and then to the registration desk. The clerk then walks to the patient at the registration desk. After a short delay, the clerk completes the registration and walks away from the patient:

Notice that the actions in the 3D model correlate with what is happening in the PatientTrack process flow. As the tokens move through the process flow, they correlate with the patient's and staff member's actions in the 3D model. The process flow activities take care of all the actions and logic for the patient as it interacts with different types of locations and staff members.

Be aware that the patient will remain at the registration desk for now because it has not yet been instructed to move to another location. You'll add those instructions in the next tutorial task.

Conclusion

At this point, you've created the first phase of your health care clinic simulation model. You've added a few FlexSim Healthcare 3D objects to your model and you've seen how to build the model's logic using the process flow tool and the people activity sets. In the next tutorial, you'll continue building out the rest of the patient track for the health care clinic and you'll learn how to set up custom logic in your process flow. Continue on to Tutorial Task 1.2 - Create Custom Logic.