The paper suggests a method for determining the optimal location of service points (warehouses) based on the method for optimal planning of radiation therapy of malignant tumors. This method enabled us to identify the location of the most optimal number of warehouses taking into account their capacity for the required volume of freight transportation and distance from warehouses to consumers. The results of the study coincide with the results obtained by using the method of ant algorithm. The proposed method of finding the optimal location of warehouses enables to significantly minimize the cost of delivering goods from a producer to a consumer.