Some questions on passing arguments and changing behaviour of agents according to arguments passed

12 views
Skip to first unread message

Benjamin Mewes

unread,
Dec 10, 2015, 2:14:09 AM12/10/15
to GAMA
Hi all,

I wrote a model with one type of agent (TRACER) that are running in a grid. I can initialize them, they move but they don't act as I want them to act. So, I have to ask you, maybe I am just blind to see my mistakes ;-)

I want my agents to move in direction of a network (l. 147 of my model) which works. But: according to an attribut of my agents: agent_movesInSoil (l. 505) it should move with a slower speed cell_kf. My movement reflex is shown from l. 549.

How does the attribute change: My cells represent some storage, they take a certain number of agents (f_p). The ref_Infiltration reflex (f. l.740) ASKS f_p of AGENTS to change their attribut (normally this should leed to a color change from #red to #blue). But my agents don't change color and the change of speed doesn't seem to show any effect. Is my application of the movement correct? Or should I put it as a callable action in my TRACER agents?

Do you see any error in my model?


Moreover, I have quite a lot of agents if my cell_storage is initially filled to 90% or more (roughly 1.5 mio). Would it help to reduce computation time from 12h for 1h of model if I run it in headless mode on a server?

Thanks for your answers,

Benjamin


DGM_HYD_WC.gaml
GIS.rar

Benjamin Mewes

unread,
Dec 10, 2015, 7:22:01 AM12/10/15
to GAMA
Hi,

first of all: Running headless improves my computing power - That was worth the work!

So I can specify my question.I have an agent reflex flow like this:

                do goto target: target_cell speed: speed;

                current_cell <- target_cell;
                location <- current_cell.location;

I want to move my agent just on the amount that the speed allows (12 m/h) in direction towards the target_cell. Right now, I beam my agent from current_cell to target_cell, or isn't that right? I want to let him walk the distance he is able to walk and then update current_cell (if he left the starting cell). How can I archieve that?



Reply all
Reply to author
Forward
0 new messages