Is there a straightforward way to to get the coordinate points of an agent in relation to main when that agent is the lower agent of multiple other agents?
For example:
I have a Box agent.
There are populations of Box agents in both my Shelf and Pallet agents, and the Pallet agents can be located either in the main or Rack agents.
So I've got:
main > Shelf > Box
main > Pallet > Box
main > Rack > Pallet > Box
So far, I've created individual hard-coded functions that add up the coordinate of the Box with the coordinates of its upper-level agents.
So:
For boxes in pallets in racks: CoordBoxInMain = CoordBox + CoordPallet + CoordRack
For boxes in shelves: CoordBoxInMain = CoordBox + CoordShelf
But now I am wondering, is there a way to construct a single function that directly gets the coordinates of my Box agent without having to create multiple different functions that each refers to a different sequence of upper-level agents?
Thank you.
