Closed tnguyenh closed 11 months ago
The problem comes from the construction of the "pedestrian path". If you change it by:
list<geometry> lines;
int num <- int(shape.width/ml);
loop k from: 0 to: num {
lines << line([{k * world.shape.width/num, 0}, {k * world.shape.width/num, world.shape.height}]);
}
num <- int(shape.height/ml);
loop k from: 0 to: num {
lines << line([{0, k * world.shape.height/num, 0}, {world.shape.width, k * world.shape.height/num}]);
}
lines <- clean_network(union(lines).geometries, 0.00, true, true);
create pedestrian_path from: lines;
It should work
I suspect the generation of the graph to be the source of the this issue, and in fact no need to use pedestrian operators to generate those strange path, the moving skill did the same job (black entity in the snapshot below). Still I was not able to found a workaround with the clean_network operator. Did you effectively tried @ptaillandier ?
Yes, of course, I already answered this question on github :) . "The problem comes from the construction of the "pedestrian path". If you change it by:"
list
lines <- clean_network(union(lines).geometries, 0.00, true, true); create pedestrian_path from: lines;
It should work
Le jeu. 27 avr. 2023 à 14:24, Kevin Chapuis @.***> a écrit :
I suspect the generation of the graph to be the source of the this issue, and in fact no need to use pedestrian operators to generate those strange path, the moving skill did the same job (black entity in the snapshot below). Still I was not able to found a workaround with the clean_network operator. Did you effectively tried @ptaillandier https://github.com/ptaillandier ?
[image: Screen Shot 2023-04-27 at 09 22 53] https://user-images.githubusercontent.com/13599506/234789419-51305860-39fb-4976-82f6-72c60693e846.png
— Reply to this email directly, view it on GitHub https://github.com/gama-platform/gama/issues/3793#issuecomment-1524961042, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALPWHM4IGILENOLV55QSVLXDINKHANCNFSM6AAAAAAXKYSQDU . You are receiving this because you were mentioned.Message ID: @.***>
Then I don't really understand where does the problem comes from. Is it due to the precision when creating the vertices of the line ? If so, would there a way for a newbie user to understand the problem and find a fix ?
@ptaillandier ơi “Comes from” or “does not come from”. Your reply on github is “edited” but still the same version
Not an issue then but a bad construction of the graph if I understand clearly. I close this issue, feel free to reopen it in case it should remain opened.
Describe the bug When computing virtual paths, the trajectory does not follow a short path, but it seems that some waypoints are chosen randomly on the pedestrian graph at very strange location.
The following picture shows some paths computed on a regular grid that is generated in the code below.
The following code create a pedestrian grid on a regular grid, the spacing between lines being 'ml'. When increasing ml (for example to 8), the grid size dicreases, and the problem is harder to notice.
Gama 1.9