In this paper, a mixed-integer linearized programming (MINLP) model is presented to design a group layout (GL) of a cellular manufacturing system (CMS) in a dynamic environment and considering production planning (PP) decisions. This model incorporates an extensive coverage of important manufacturing features used in the design of CMSs. There are also some features that make the presented model different from the previous studies. These include: 1) the variable number of cells, 2) machine depot keeping idle machines, and 3) integration of cell formation (CF), GL and PP decisions in a dynamic environment. The objective is to minimize the total costs (i.e., costs of intra-cell and inter-cell material handling, machine relocation, machine purchase, machine overhead, machine processing, forming cells, outsourcing and inventory holding). Two numerical examples are solved by the GAMS software to illustrate the results obtained by the incorporated features. Since the problem is NP-hard, an efficient simulated annealing (SA) algorithm is developed to solve the presented model. It is then tested using several test problems with different sizes and settings to verify the computational efficiency of the developed algorithm in comparison to the GAMS software. The obtained results show that the quality of the solutions obtained by SA is entirely satisfactory compared to GAMS software based on the objective value and computational time, especially for large-sized problems.