Lot-sizing problems (LSPs) belong to the class of production planning problems in which the availability quantities of the production plan are always considered as a decision variable. This paper aims at developing a new mathematical model for the multi-level capacitated LSP with setup times, safety stock deficit, shortage, and different production manners. Since the proposed linear mixed integer programming model is NP-hard, a new version of simulated annealing algorithm (SA) is developed to solve the model named revised SA algorithm (RSA). Since the performance of the meta-heuristics severely depends on their parameters, Taguchi approach is applied to tune the parameters of both SA and RSA. In order to justify the proposed mathematical model, we utilize an exact approach to compare the results. To demonstrate the efficiency of the proposed RSA, first, some test problems are generated; then, the results are statistically and graphically compared with the traditional SA algorithm.