question

Tiffany Pecson avatar image
0 Likes"
Tiffany Pecson asked Matthew Gillespie answered

Acquiring Staff based on Area

I would like to acquire staff based on the location that is acquired by the patient. I can do this pretty easily in the HC version, but I'm using the latest version 18. For example, if the location that is acquired is Registration1, I'd like to use Receptionist1. Do I need to add more labels to do this?

It looks like the Object by Case makes the most sense, but I'm having a hard time understanding how to set that up. It's not as intuitive/obvious as the HC version.

FlexSim 18.0.1
process flowacquire locationacquireacquire staff
assigning-staff.jpg (146.6 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.

1 Answer

·
Matthew Gillespie avatar image
0 Likes"
Matthew Gillespie answered

If each registration desk has an assigned staff, an easy method is to make a center port connection between each desk and its associated staff. To make a center port connection hold down the "S" key, click on one object with the left mouse button, drag the mouse to the second, and then release the mouse button. You would then acquire that staff from the desk using a statement like this:

current.RegistrationDesk.as(Object).centerObjects[1];

Otherwise, you could write some code and fill out two different arrays - one for the if side and one for the then side:

treenode desk = token.RegistrationDesk;

Array desks = [model().find("Registration1"), model().find("Registration2")];
Array staff = [model().find("Receptionist1"), model().find("Receptionist2")];

for(int i = 1; i <= desks.length; i++) {
	if(desk == desks[i])
		return staff[i];
}

We're still in the process of bringing over all the niceties of HC and haven't put much effort into refining the pickoptions on these activities.

BTW, the Object by Case option doesn't really work here because each case has to be an integer.

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.