question

Tee Hiett avatar image
0 Likes"
Tee Hiett asked Sam Stubbs commented

How do I change the default animation of patients and staff in FlexSim HC?

How do I go about changing the behavior of patients and staff with regards to animation (posturing and positioning) when they enter/leave locations in my model? I notice the behavior is slightly different depending on the specific type (i.e. 3D shape) of the Patient Processing Location that I choose (e.g. Bed vs Chair vs MRI).

FlexSim HC 5.1.0
animation3d shapepositionpostureshapetype
5 |100000

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

1 Answer

·
Cliff King avatar image
0 Likes"
Cliff King answered Sam Stubbs commented

Tee,

Each of the patient "Waiting" and "Processing" locations in the software are almost identical except for minor differences in their appearance and the animated behavior of patients and staff when they arrive/depart/stay at the location. As you've discovered already, these differences are based on the shape chosen for the location. More specifically, these differences in behavior are based on the value of the patient location object's variable called ShapeType. Each of the four standard Patient Queuing objects have a ShapeType index beginning with an index of 1 for the Waiting Room and ending with 4 for the Waiting Area. Each of the 45 standard Patient Processing objects have a ShapeType index beginning with an index of 2 for the Alt Bed and ending with 46 for the Xray. The reason these shape index numbers begin with 2 is because the first index is reserved for the <none> option you may choose in the drop-down list of options found in the "Shape" field of Quick Properties for Patient Processing locations in your model.

Although every patient location object is assigned a particular ShapeType index by default, you are free to change the shape index of any patient location object in your model to invoke a different animation behavior of patients or staff who interact with the location. The numeric index you assign to the ShapeType variable of a location will cause subtle differences in the posturing and positioning of patients who enter/exit the location, as well as any staff who arrive at the location to either perform a process, or pickup/dropoff a patient.

Unfortunately, there is little or no documentation on the exact behavior of the different shape types available in the software, so you will need to familiarize yourself with the behavior of the standard shapes through observation. Obviously you can expect patients to sit down in chairs, lay down in beds and stand at desks, but it's not that simple because, for instance, there are two types of laying down (flat and with a bent body) and there are two types of standing (feet together and feet apart).

There are also differences in where the patient and/or staff will stand, sit or lay down based on the ShapeType index of the location. The positioning of staff after they've arrived at a specific location will in part be determined by the shape index, and in part by the orientation of the final path node the staff member traversed to arrive at the location.

As you know, you can have more than one path node connected to a location. When multiple nodes are connected to a location, and multiple staff members are sent to a location for a process activity, each staff member will attempt to occupy a separate node when standing at the location. The way in which the staff members will take advantage of multiple nodes connected to a single location happens to be a function of the shape index, the position of the nodes relative to the location, the order in which the nodes where connected to the location in the first place, whether or not a patient currently occupies the location.

As you can guess, this would all be very difficult to document for 50 different object shapes, and would probably not make much sense even if it were documented. However, by knowing the various factors I've identified above that influence the behavior, I'm hoping you will be able to achieve the visual behavior you desire with a little experimentation.

Know let me teach you how to change the shape index of a patient location in your model. There are basically two different ways you can change the value of the ShapeType variable of an object. The first way is to simply begin with the type of object you're interested in duplicating the behavior of. This can be done by either dragging the desired shape from the library when creating a new location, or by selecting the desired shape from the drop-down list of standard shapes for the "Shape" field in Quick Properties for an existing location in your model.

The other way to change the ShapeType variable is by editing an existing location in the Model Tree view. After opening the Tree View, find the node associated with the location and then click on it. After clicking on the location node, you will see a ">" button show up just to the left of the node. Click on this button to expand the location's object data tree. Now find the "variables" node and click the + button to its left. The ShapeType variable will be the second one in the list of variables. Click on the ShapeType node and edit the numeric value associated with the node to change the shape index of the location. After editing the variable, click back on the > button and it will both apply the edits and collapse the object's data tree.

After changing the ShapeType variable, you will probably want to either give the object your own shape by importing an external 3D file of your own, or maybe you prefer to remove the shape altogether and just show a floor for the location. You can import your own shape, or remove the currently assigned shape via the "3D Shape" field found in the Advanced Visuals panel of Quick Properties. To remove an existing shape, simply delete what's shown for the file path in the "3D Shape" field. You will want to click the "Show Floor" checkbox before doing this however, or you will have difficulty with further edits to the location because you won't be able to see the object in the 3D view! To import your own shape for a location, click on the down arrow to the right of the "3D Shape" field and then click the Browse... option at the top of the list of available shapes. By changing or removing the assigned shape using the "3D Shape" field in the Advanced Visual Options you will not need to worry about the original ShapeType index of the object changing on you.

After you've got the shape and ShapeType you want for a given location, you can tweak the size and/or rotation of the object itself, but keep in mind that the final positioning of patients and staff at the location will always be based on the original size and shape (well ShapeType value anyways) of the object, and the patient/staff positions will not magically adapt to the new shape you may have given the object. This means you will need to modify the size/rotation of the object to try and match the ShapeType specific behavior to the new shape you've imported and assigned to the object.

You also have the ability to use your own code to define the animated behavior and positioning of patients and staff in your model. To do this, you will end up using one or more of the following commands: setloc(), setrot(), stopanimation() and startanimation(). Defining your own behavior can be tricky, because of the difficulty in getting the timing right in order to avoid fighting the default behavior of the particular shape type of the location. For this reason, it is usually best to find a standard shape type that does what you want, and then make the software think your object has that type of shape by setting the ShapeType variable as I've already explained.

Incidentally, the two ShapeType indexes I use a lot when I want my patient's to stand upright after entering the location are those of the Podium (index 37) and the Scale (index 41). The Podium index is useful for when I want the patient to stand just outside the object's boundary on the front side of the object and the staff member stand on the opposite side of the object facing the patient. The Scale index is useful when I want the patient to stand inside the object's boundary and if a staff member is escorting them to the location, they will stand behind the patient just outside the object's boundary.

I hope you find this information useful. Please let me know if you would like anything explained further.

Cliff

· 1
5 |100000

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

Tee Hiett avatar image Tee Hiett commented ·

Cliff, This information is very useful, although I am sure I will have questions when I start using it more. I particularly like your final paragraph with the reference to the Podium and the Scale. For example, I can use the Podium index to make sure the patient is standing on both feet at the registration desk and not walking.

Thanks for the help. Tee

0 Likes 0 ·

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.