1. A method performed by a control system incorporating a computer for regulating a vehicle's speed, the method comprising: determining a horizon from position data and map data of an itinerary including route segments, each route segment having a with length, an end, and gradient characteristics; calculating threshold values according to one or more vehicle-specific values; comparing the gradient characteristics of each segment with the threshold values and assigning each segment within the horizon to a respective category according to the results of the comparisons, wherein the threshold values serve as boundaries for assigning the segments to the respective categories; for each segment within the horizon assigned to a category indicating a steep upgrade or a steep downgrade, the method comprises: calculating the vehicle's final speed V end , the final speed V end being a speed immediately after the end of the segment, based inter alia on an entry speed v i to the segment; and when the calculated final speed V end is outside a range for the vehicle's current reference speed v set defined by V max and V min , the method comprises: correcting the entry speed v i for the segment on the basis of the calculated final speed V end for the segment, wherein the correction is defined by rules for the segment's assigned category, so that V min â‰¦V end â‰¦V max , on the supposition that v i is corrected within the same range; and regulating the vehicle's speed according to speed set-point values V ref based on a respective entry speed v i for each segment.