gama-platform / gama

Main repository for developing the 2024+ versions of GAMA
https://gama-platform.org
GNU General Public License v3.0
12 stars 5 forks source link

[Moving skill] attribute distance of returned path from goto on a graph raises a nul value exception #164

Open chapuisk opened 2 months ago

chapuisk commented 2 months ago

Describe the bug The goto action of the moving skills allows to retrieve the path resulting from the motion (I am not sure, what this path actually represent; how is it different from current_path?) using the return_path facet. However when one wants to retrieve the distance of this path, it raises an exception because there is no weights attached to the returned path's segments

To Reproduce Steps to reproduce the behavior:

  1. Go to Traffic and Pollution.gaml (Toy Models > Traffic > models)
  2. Go to line 76
  3. Add write path_followed.distance; the line below
  4. Launch the model simulation
  5. See error

Expected behavior Have a proper path returned, i.e. in that case having a path made of road agents. If this path is not made of graph edges species, it should be stated clearly in the corresponding doc (that should be improved anyway - in particular how it differs from current_path skill attribute)

Desktop (please complete the following information):