To design the movement of one agent based on agent's neighbors position. We come usually to this control protocol:
x'_i(t) = ai1*x_i(t)+ +aij*x_j(t) ; j=1,..,N,
N
is the total neighbor ofi
.aij
: are the constant (design coefficient).
at the end we come to solve this equation:
x'(t) = Ax(t) : A is a design matrix, x is the position of the agent.
one of the simplest case could be: (x,y
are neighbors)
x'(t) = x(t) + 2y(t)
y'(t) = 2x(t) + y(t)
Is there any numerical method to solve this equation. So that at each tick time, I can display the x(t)
and y(t)
.
In matlab we have ode45 solver to do this. But with Netlogo I don't know how. With Runge-Kutta Method it work only with one variable x(t) = f(x,t)
.