We solve the problem of the distribution of petroleum products through oil pipelines networks. This problem is modeled and solved using two techniques: A heuristic method, a multiobjective evolutionary algorithm and mathematical programming. In the multiobjective evolutionary algorithm, several objective functions are defined to express the goals of the solutions as well as the preferences among them. Some constraints are included as hard objective functions and some are evaluated through a repairing function to avoid infeasible solutions. In the mathematical programming approach the multiobjective optimization is solved using the constraint method in mixed integer linear programming. Some constraints of the mathematical model are nonlinear, so they are linearized. The results obtained with both methods for three concrete networks are presented. They are compared with a hybrid solution, where we use the results obtained by mathematical programming as the seed of the evolutionary algorithm.