Background: This paper discusses the optimization of a novel fuzzy hierarchical location-routing problem, taking into consideration reliability. The mathematical model presented aims to determine the optimal locations of production centers and warehouses, as well as the optimal routing of vehicles, in order to minimize total costs. Methods: Because of the uncertainty surrounding the demand and transportation cost parameters, a fuzzy programming method was employed to control the model. To solve the mathematical model, both GA and PSO algorithms were used. Results: The results show that as the uncertainty rate increases, the total costs also increase. Additionally, the results indicate that the maximum relative difference percentage between the solutions of the GA and PSO, and the optimal solutions are 0.587 and 0.792, respectively. On the other hand, analysis of numerical examples demonstrates that the Baron Solver is unable to solve large-scale numerical examples. Conclusions: By comparing the results of GA and PSO, it is observed that PSO was able to solve numerical examples in less time than GA, while GA obtained better results than PSO. Therefore, the TOPSIS method was used to rank the different solution methods, which resulted in GA being recognized as an effective algorithm with a utility weight of 0.972.