In my model I've created an automobile robots(AMR) which transports orders. The Automobile robots is a transporter fleet, which is agent type AMR. This agent type has a parameter which is a boolean for needCharging (see figure 1), during my simulation at a certain point a robot needs to charge and the needCharging parameters changes to true.
In my model I want when I seize a transporter that he only chooses a transporter in the fleet where NeedCharging==false
. So I coded it in the transporter choice condition as !unit.NeedCharging
. (see figure 2 and 3 which showing the fleet and seize), but somehow he does not link the unit to a transporter in the seize block, how can I fix this that he only seizes transporters which does not have the parameter needcharging states as true.
Try the following instead:
!((AMR)unit).NeedCharging