Agent Movement Speed 

Although AnyLogic directly supports movement at a constant speed and zero acceleration, you can model acceleration/deceleration by changing the speed at the appropriate time moments. You can use statechart with states like Static, Slow, Medium, Fast, etc and timeout transitions to control the motion.

  To set the initial speed of the agent

  1. Open the properties of the agent type by clicking it in the Projects view.
  2. Open the Movement section of the properties.
  3. In the Initial speed field, specify the initial speed of agents of this type, and choose the correct units of measurements for this speed next to it. The default value is 10 meters per second.


void setSpeed( double v ) - sets the speed ("cruising speed") of the agent. If the agent is moving, it will continue moving from the current location with the new speed. If the agent is not moving, it will not start moving until you call moveTo().

double getSpeed() - returns the current speed of the agent (speed is a parameter of the agent, its "cruising speed", non-zero speed does not mean the agent is moving).

If you configure agent movement with the help of MoveTo object, you can set custom agent speed in its properties. 

Remember that the agent's speed will be changing if you use the functions moveToInTime() to define agent movement.