gama-platform / gama

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

[Moving skill] facet return_path should be the same as returns facet in create statement #163

Open chapuisk opened 5 months ago

chapuisk commented 5 months ago

Is your request related to a problem? Please describe. Using the moving skill, one can retrieve the actual path the agent is going through using the return_path facet of the goto action. However, the facet is a boolean and requires to rewrite the whole actions, going from do goto target:target return_path:true to path p <- goto(target: target, return_path:true) which is not so intuitive (you have to know that an action can be used this way, that argument of the method can be labeled and specified, etc.)

Describe the improvement you'd like I suggest that modelers should be using the facet as it is the case in the create statement, i.e. specifying the return variable reference along the facet that is returns: collection_of_agents

Additional context I tried to copy/past the scope.addVarWithValue() solution from the create statement but it seems that it is only limited to certain type of statements (those with a Symbol annotation with the remote_context enabled) that are allowed to create and deliver variables to the scope.