In my pedestrian model, I have two ped types: RegPed (regular pedestrian) and SpePed (special pedestrian). In the RegPed interface, I have attached a polygonal node to represent 'field of vision' as shown:

enter image description here

Within my model, the RegPeds (green) are walking towards a target line using a PedGoTo block. On the way there, they may 'see' a SpePed (red) inside their field of vision as shown:

enter image description here

When this happens, I want the RegPed to abandon its initial PedGoTo command (named goToExit) and instead adopt a different command via the exit port. I have put the following in the field of vision node's interface to cancel goToExit when the node closes after a SpePed enters it:

enter image description here

However, the following problems arise when I try to run the model:

enter image description here

Is this happening because the field of vision node is within the RegPed interface and not the main agent interface? Are there any solutions which result in the same desired functionality?

Here is my model hierarchy: enter image description here

0

There are 0 best solutions below