I have defined a custom block representing both graphically and logically gates in a metro station model, in which I have defined a parameter of type TargetLine. In Main model I have used the agent "gateEntity" and have set the input parameter of the block by assigning a defined Target Line to it, but when the peds are walking through newly defined agent, following error is thrown:
> Exception during discrete event execution:
> root.gateEntity.pedService.?<PedSettings>.pedLevels_xjal[0].pedServices[0].queues[6].queue.goTo_xjal:
> Unreachable target: (120.00, 46.91) on level 'name: levelNew' for
> pedestrian 'id: 1' located at: (359.21, 320.21) on level 'name:
> level'!
levelNew is the level defined in child agent, it seems that I should link the level of main agent to level of child agent but how?
this is my child agent image and how levelNew is set for services:
and this is my Main agent when my newly defined block is selected:
UPDATE: the model after adding pedExit in Main:
and gateEntity after adding pedEnter:
but the following error is thrown:
Agent (Agent#1[root.pedExit]:root.pedExit.processBlock.output.output.out->root.gateEntity.pedEnter.processBlock.input.in)can't be in several flowcharts at the time. At least two flowchart blocks are in conflict: root.gateEntity.pedEnter and root.pedExit
Ok, this is the answer you need
If you want your pedestrian to move around, it needs to move around things that are in the same level... so that means you need to have inside your GateEntity agent a targetLine that is present in LevelNew, otherwise your pedestrians will never reach the target as you are asking for them to move accross levels
Don't use Agent, use Pedestrian in your ped source, and do the same in your pedEnter inside your GateEntity agent
That's all.. you can't define an input targetLine unless the destination is in the same level as that input... for some reason you created a different level inside your agent