Replies: 3 comments 7 replies
-
Hi,
I can try to help if you also provide the GIS data used (so that I can test
the model in the same state as you).
Cheers,
Patrick
Le mar. 25 mars 2025 à 03:33, GamaDevp ***@***.***> a écrit :
… Dear all,
I hope this message finds you well.
I’m currently working on a snowstorm simulation model using GAMA for a
research project. I’m reaching out because I’ve encountered a critical
issue that I’ve been struggling to resolve despite extensive debugging and
reviewing the documentation.
I’ve attached below a detailed version of my GAML model, but let me
briefly explain the main functionality and the issue I’m facing.
*Model Overview:*
- The simulation models a snowstorm in a city using shapefiles for
buildings and roads.
- Snow accumulates dynamically over time on roads.
- Rescue stations spawn multiple agents:
- plows (leaders),
- plow (helpers),
- and rescue_vehicle (emergency responders).
- The plows (leaders) are supposed to:
- Detect roads with the most snow (using a scoring system),
- Move to those roads,
- Request help once snow exceeds a threshold,
- Begin clearing snow *while waiting* for the helper.
- The plow (helper) agents are designed to:
- Detect when a leader (plows) needs help,
- Move to the same road,
- Start clearing alongside the leader.
*Problem Description:*
The issue I need help with is specifically related to the behavior of the
leader plow (plows) once it reaches a road with significant snow and
requests help.
1.
Initially, the leader correctly detects the snowy road, moves to it,
and requests help.
2.
While waiting, it starts clearing the target road or surrounding
roads, as expected.
=> However, after some time, it gets stuck, either:
-
oscillating back and forth between two points,
-
or completely stopping without clearing any more snow.
This coordination problem is at the core of my project and I urgently need
guidance to fix it.
The current logic that is working as described above is within this plan: plan
clear_target_snow intention: clear_snow
*What I’ve Tried*
I’ve inspected and modified the plan clear_target_snow intention multiple
times.
-
I added conditions to detect road endpoints and attempted to identify
dead ends by checking for connections at intersections.
-
I experimented with reassigning targets or reversing direction when
stuck.
-
I tested alternate routing using path_between, distance checks, and
debug logs for heading and road shape points.
Despite all these debugging efforts, the behavior persists. The leader
gets stuck repeating a short move or simply halts without engaging in
further clearing.
*What I Need Help With*
I believe the issue lies in how the plow decides what to do after reaching
the end of the road or when no alternative routes are found. I would be
very grateful if someone could review the clear_target_snow plan logic and
suggest how I might refactor it to make the leader plow:
1.
continue clearing effectively while waiting for help,
2.
handle road ends or isolated segments gracefully, and avoid getting
stuck in place or repeating movements.
This coordination is the centerpiece of my simulation, and resolving it is
vital for the project to progress.
Nothing has resolved the issue, and I’m at a point where I need expert
help.
If anyone in the community or development team could spare some time to
look at this model or suggest debugging directions, it would mean a lot.
This project is part of a larger academic effort, and I truly want to make
it functional and impactful.
Thank you very much for your time and for the amazing work you all do with
GAMA.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Hello,
Thank you for your prompt response.
Attached are the GIS data used for this project.
|
Beta Was this translation helpful? Give feedback.
5 replies
-
Hi,
I've taken a look at the model and tested it with the data, and while I can
see the behavior described, it's difficult for me to just correct it, as
there's a lack of information/elements for that.
The first thing is that I don't understand when a plows agent is supposed
to have a desire other than “clear_snow” once that one has been chosen.
Does it decide at some point that it has removed enough snow and wants to
have another desire?
Another (wrong ?) aspect of the model is the use of the first and last
points of routes to choose a path. In fact, the model uses an undirected
graph, so the notion of first and last points to ensure graph connection
doesn't really work.
I proposed a (maybe?) fixed version of the model (attached file).
Cheers,
Patrick
Le mer. 26 mars 2025 à 08:54, GamaDevp ***@***.***> a écrit :
… Yes, that's the repository.
—
Reply to this email directly, view it on GitHub
<#445 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALPWHJP6UTX65JLA5BUPKT2WICGZAVCNFSM6AAAAABZV4IQYOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTENRSGIYTKNY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Dear all,
I hope this message finds you well.
I’m currently working on a snowstorm simulation model using GAMA for a research project. I’m reaching out because I’ve encountered a critical issue that I’ve been struggling to resolve despite extensive debugging and reviewing the documentation.
I’ve attached below a detailed version of my GAML model, but let me briefly explain the main functionality and the issue I’m facing.
Model Overview:
plows
(leaders),plow
(helpers),rescue_vehicle
(emergency responders).plows
(leaders) are supposed to:plow
(helper) agents are designed to:plows
) needs help,Problem Description:
The issue I need help with is specifically related to the behavior of the leader plow (plows) once it reaches a road with significant snow and requests help.
Initially, the leader correctly detects the snowy road, moves to it, and requests help.
While waiting, it starts clearing the target road or surrounding roads, as expected.
=> However, after some time, it gets stuck, either:
oscillating back and forth between two points,
or completely stopping without clearing any more snow.
This coordination problem is at the core of my project and I urgently need guidance to fix it.
The current logic that is working as described above is within this plan:
plan clear_target_snow intention: clear_snow
What I’ve Tried
I’ve inspected and modified the
plan clear_target_snow intention
multiple times.I added conditions to detect road endpoints and attempted to identify dead ends by checking for connections at intersections.
I experimented with reassigning targets or reversing direction when stuck.
I tested alternate routing using path_between, distance checks, and debug logs for heading and road shape points.
Despite all these debugging efforts, the behavior persists. The leader gets stuck repeating a short move or simply halts without engaging in further clearing.
What I Need Help With
I believe the issue lies in how the plow decides what to do after reaching the end of the road or when no alternative routes are found. I would be very grateful if someone could review the clear_target_snow plan logic and suggest how I might refactor it to make the leader plow:
continue clearing effectively while waiting for help,
handle road ends or isolated segments gracefully, and avoid getting stuck in place or repeating movements.
This coordination is the centerpiece of my simulation, and resolving it is vital for the project to progress.
Nothing has resolved the issue, and I’m at a point where I need expert help.
If anyone in the community or development team could spare some time to look at this model or suggest debugging directions, it would mean a lot. This project is part of a larger academic effort, and I truly want to make it functional and impactful.
Thank you very much for your time and for the amazing work you all do with GAMA.
Below is my entire model code that I am using :
Beta Was this translation helpful? Give feedback.
All reactions