Optimization of Drilling Sequences with VBA: Consideration of Manhattan, Euclidean, and Genetic Algorithm Distances for the Generation of an NC Program
López Miranda M.; Espinoza Haro P. · International Journal on Engineering Applications (2026) · DOI: 10.15866/irea.v14i2.26070
Resumen
– One of the main challenges to be solved in the metalworking industry, especially in the drilling process in CNC machines, is minimizing the cutting tools' travel. This problem is directly related to the computational consumption of the different solutions that can be presented. In this research, a comparative analysis between the Euclidean Distance (ED) and the Manhattan Distance (MD) metrics evaluated in one and two spaces (R1, R2) has been conducted in order to validate the results based on the drilling sequence. The Genetic Algorithm (GA) has been applied, by considering the Traveling Salesman Problem (TSP). The research has been divided into three parts. In the first part, macro programming in VBA for Excel and Python has been developed to allow validating the shortest route based on the sequence, considering any starting point in order to obtain the best solution. In the second part of the paper, the solutions found with CAM software have been compared and they have been applied to real parts in order to validate the optimal sequence. The third part focuses on reducing the computational consumption and the coincidence of MD and ED by grouping the perforations in three holes and validating the angular relationship.
Instituciones: Universidad Ricardo Palma; Universidad Nacional de Ingeniería