You'll mainly be interested with the stopping distance which can be derived from this kinematic equation:
vf^2 = v0^2 - 2*a*d
where
vf is the final velocity
v0 is the initial velocity
a is the acceleration
d is the distance
We want to know how far it takes to stop with a given speed and deceleration. So:
speed^2 = 0^2 - 2*deceleration*distance
solving for distance we get:
distance = -(speed^2)/(2*deceleration)
Note: if the value you use for deceleration isn't negative you can omit the minus in the formula.
So then our pseudo code to move the object would be:
if( speed < max_speed) then accelerate
if( distance_to_target <= -(speed^2)/(2*deceleration) then decelerate[/code:bepp4si0]