Cell formation and layout design are important steps in the implementation of production systems. Existing models focus mainly on the problem of cell formation and machine layout design and cell location in a dynamic environment, with the exception of a few recent studies. Also, in many existing articles, binary information has been used for cell formation and other information such as production volume, operation sequence and lower production costs have played a role in the structure of existing models. In this paper, a nonlinear programming model under possible dynamic conditions is presented. The objectives of the model include minimizing the total costs of intracellular and intercellular movements of parts, the existence of exceptional parts, intercellular layout of machines, operating costs, fixed costs of machines and the cost of the difference in demand estimated by the model from its expected value. A genetic algorithm is used to solve and the results are compared with the optimal solution. © 2021 KIIE.