New and exciting possibilities in vehicle control are revealed by the consideration of topography, for example through the combination of GPS and three dimensional road maps. How information about future road slopes can be utilized in a heavy truck is explored. The aim is set at reducing the fuel consumption over a route without increasing the total travel time.A model predictive control (MPC) scheme is used to control the longitudinal behavior of the vehicle, which entails determining accelerator and brake levels and also which gear to engage. The optimization is accomplished through discrete dynamic programming. A cost function that weighs fuel use, negative deviations from the reference velocity, velocity changes, gear shifts and brake use is used to define the optimization criterion.Computer simulations back and forth on 127 km of a typical highway route in Sweden, show that the fuel consumption in a heavy truck can be reduced with 2.5% with a negligible change in travel time.