0

I am modelling a surgery ward, where 3 different patient types (red patient, blue patient and green patient) are entering based on a schedule. Based on the type of patient they are (red, blue or green) the surgery time varies. Red: 30 min. Blue: 1 hour and Green: 2 hours. I am using a delay block to simulate the surgery time. How do I make it so that the delay time is based on the type of patient that enters?

So for example: the delay time is 30 min. when a Red patient enters the delay block, but 1 hour if a Blue enters?

Thanks!

KrisG125
  • 43
  • 5

1 Answers1

1

the patients can be just one agent type with a variable for the type.

then in the delay time you add a function for instance getTypeDelay(agent);

And in the function you do something like

if(agent.type.equals("green") return 5.0;//hours or whatever time is

i hope this guides you

Felipe
  • 8,311
  • 2
  • 15
  • 31