[英]How to seize 1 resource unit and not the entire resource pool for downtime tasks
[英]How to access a unit of a resource pool for condition in function
为什么agent.doctor
不起作用? 还是你没有尝试过?
老实说,我不明白为什么你需要使用 Hold 块? 毕竟,如果资源 ( Doctors
) 很忙,它就不会分配给您的代理 ( Patient
)。
必须使用特定于它们的函数而不是它们的资源池来访问池的单元。 在这里,要检查所需的医生是否可用,第三个条件是
myPatient.doctor.isIdle() == true
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.