I'm working on a model and using cpdistance to calculate the closets AGV.
double distance = cpdistance(agv.currentCP,destCP);
This returns a value of 340282346638528859811704183484516925440. In the past i have also seen cp distance return a negative value.
As a work around, I added an additional line of code.
if(distance == 340282346638528859811704183484516925440.000000000000)
{ distance = distancetotravel(lgv, destCP); } return distance;
what is the difference between distancetotravel and cpdistance? is there a preference of one vs the other?
What can I check in the paths to make sure cpdistance works?
I'm using flexsim 23.0.15. are there fixes to distance to travel and cpdistance in newer versions of flexsim?