Setting speeds and virtual distances.

Setting speeds and virtual distances.

sean_a
Not applicable
147 Views
8 Replies
Message 1 of 9

Setting speeds and virtual distances.

sean_a
Not applicable

[ FlexSim HC 5.1.0 ]

I am looking at modeling the amublance moving patients between hospitals and woud like to look at the distances the ambulance travels depending on what route it takes.

I have two network nodes that have a virtual distance of 2000. I am assuming that this represents 2000m. When I look in the tree I see that the ambulance has a variable listed as "maxspeed" with a value of 60. Does this mean the ambulance moves at a speed of 60 meters/min?

When I increased that speed to 1000 meters/min (60km/hour), the ambulance still moves at the same rate.

Does the ambulance match the patients speed and how would I change it for a given network span so that It simulates the ambulance driving down a road?

0 Likes
Accepted solutions (1)
148 Views
8 Replies
Replies (8)
Message 2 of 9

Matthew_Gillespie
Autodesk
Autodesk
Accepted solution

So in a Transport Patient activity the staff member will limit her speed to match the speed of the transport and/or the patient. So basically you need to set the speed of all three (staff, ambulance, and patient). You could do this in the activity start trigger of the Transport Patient activity.



Matthew Gillespie
FlexSim Software Developer

0 Likes
Message 3 of 9

sean_a
Not applicable

Thanks Matthew.

If I increased their speed to a ridiculous amount but put speed limits along all sections of my network nodes, would this have the same effect as using a trigger?

Sean

0 Likes
Message 4 of 9

Matthew_Gillespie
Autodesk
Autodesk

That should probably work. I would prefer to use a less drastic method though, that's why I would try using triggers on the transport activity. That way you're adjusting the speed of the patient and staff right before and after the ambulance needs to move and then the rest of your model should not be affected.



Matthew Gillespie
FlexSim Software Developer

0 Likes
Message 5 of 9

christopher_morgan
Not applicable

Hate to revive an old post, but i'm actually encountering a similar issue. How exactly would you make this as a trigger? I don't see speed as an available label to set as a trigger. @Matthew Gillespie

0 Likes
Message 6 of 9

cliff_king
Not applicable

This post has to do with dynamically settings speeds during runtime. If you simply want to adjust the speeds of staff and other resources, you may do so via the "Speed" field in the Quick Properties window. This particular attribute of resources is not a label, but a variable, so if you want to set it dynamically using a trigger, then you would use a setvarnum() command. The name of the variable is "maxspeed", so the full command would look something like this:

setvarnum(Nurse_1, "maxspeed", 100);

A word of caution, the timing of when you set the maxspeed variable is important. If not set early enough the variable may already have been read by the underlying behavior of the resource and wont have an effect. There are other issues you may have to contend with as well, because the underlying behavior is also dynamically changing the speed of staff to match patients being escorted/transported and equipment being transported!

Message 7 of 9

christopher_morgan
Not applicable

That works! Thanks again Cliff 🙂

0 Likes
Message 8 of 9

christopher_morgan
Not applicable

To expand on this, is it possible to dynamically assign speed to the staff who is to be used?

Your example shows a singular Nurse_1... What if i'd like to dynamically adjust staff speed for whichever nurse in the nurse group was used in the activity?

For example i have Nurse_1,Nurse_2,Nurse_3 from staff group "Nurse" that could all perform the task and i only want to increment the particular nurse who is being utilized for that task and later reduce there speed in a separate trigger? @Cliff King

0 Likes
Message 9 of 9

cliff_king
Not applicable

The getrequiredresource() command should get you what you want depending on when you are trying to capture the information on for what activity. If the timing is not right for use of this command, then check the actual code used in existing picklist options for the various activity fields to see if they may shed light on how best to get access to the staff member involved in the activity. Sometimes the fields have an access variable called that "resource" that may what you want as well.

0 Likes