In this section, we formulate the mathematical model for both machine (i.e., intra-cell) and cell (i.e., intercell) layout problems with stochastic demands in CMSs. This proposed model deals with the minimization of the integrated (intra-cell and inter-cell) cost function. The machine layout problem is trying to find the optimal arrangement of machines within each cell as well as cells within the shop floor. This model can be considered as a bi-quadratic assignment problem. The assumptions are described as follows: