The aim of the present paper is to propose a location–allocation model, for a capacitated health care system. This paper develops a discrete modeling framework to determine the optimal number of facilities among candidates and optimal allocations of existing customers for operating health centers in a coverage distance, so that the total sum of customer and operating facility costs are minimized.Our goal is to create a model that is more practical in the real world. Therefore, setup costs of the hospitals are based on the costs of customers, fixed costs of establishing health centers and costs based on theavailable resources in each level of hospitals.In this paper, the idea of hierarchical structure has been used. There are two levels of service in hospitals including low and high levels and sections at different levels that provide different types of services. The patients are referred to the hospital’s different sections according to their requirements. To solve the model, two meta-heuristic algorithms, including genetic algorithm, simulated annealing and their combination are proposed. To evaluate the performance of the three algorithms, some numerical examples are produced and analyzed using the statistical test in order to determine which algorithm works better.