Abstract The large distribution companies of goods have the challenge of solving the problem of offering an optimal service in which different interests are faced which determine the decisions of the company, the problem is reduced to providing the best customer assistance, with low restrictions. operating cost on a route. Due to this, we see the need to make the programming of the routes of each vehicle as equitable as possible in terms of the capacity of the vehicle and the available fuel, in addition, it seeks to reduce the distances in which the vehicle travels without load. In this article we will demonstrate in detail in a document the optimal solution to the electric vehicle routing problem, which consists of determining optimal routes for a transport company to make efficient use of available resources, saving electricity and time, among other variables. Initially, the basic concepts about the operation of electric vehicles are described, later the concepts and modalities of vehicle routing are discussed, among which are the problem of routing open vehicles and the problem of routing vehicles with backhauls, later the scenario to develop the respective routes. and show the results with the optimal routes and routes, finally the conclusions obtained from the development of the techniques are exposed.