I’m trying to calculate the distance between two nodes but I can’t find a solution:
`int index = agent.getTransporter().getIndex(); //Find the transporter
Position posizioneTransportatore = main.aGVs.get(index).getPosition(); //Find the transporter position
Position posizioneLotto = agent.getPosition(); //Find the product position
//Find the nearest node from transporter and the nearest node from product
Network network = main.network;
Node startNode = network.getNearestNode(posizioneTransportatore.getX(),posizioneTransportatore.getY(),posizioneTransportatore.getZ(),null);
Node pickupNode = network.getNearestNode(posizioneLotto.getX(),posizioneLotto.getY(),posizioneLotto.getZ(),null);`
Thanks to everyone wants to help me.
enter image description here
I did a lot of different trials, using ChatGPT or Java documentation