## 3 Methods
### Deterministic Model for the Aggregate Production Planning  
The deterministic model minimizes the total productions cost, determining the number of workers prior to the start of the APP, the number of parts that will be produced and will be stored (inventory) for each period and family of products and the backlogs per month with a specific service level for each period and family of products. The model considers the following assumptions:  
* Two families of products are considered. * The demand and production capacity are known for all periods, i.e., the demand is forecasted and production capacity is estimated for each family of products. * The fixed costs for parts that are produced, listed in an inventory, backlogs and workers hired, are linear. * There exists enough raw material to produce all family products over the horizon plan. The notation of the APP is the following:
* Indices: \(T\) is the set of periods with \(t\in T\); \(K\) is the set of family products with \(k\in K\). * Parameters: \(D_{(t)k}\) is demand for each period and family product \(CP_{(t)k}\) is production capacity for each period, family product and worker; \(C_{(t)k}\), \(C_{X(k)}\) and \(C_{B(k)}\) are the inventory, production and backlog costs per unit, family of products and period. \(C_{W(k)}\) is the workers' cost over the planning horizon, i.e., the total amount to be paid to each worker assigned to each family product for the total/entire APP duration; \(LS_{k}\) is the level service for every family product (between 0.8 and 1). \begin{table}
\begin{tabular}{l l l l l l} \hline \hline
**Properties of the Study** & **This Approach** & **[PERSON] et al. [5]** & **[PERSON] et al. [12]** & **[PERSON] et al. [3]** & **[PERSON] et al. [9]** \\ \hline CPU time & & & & & \\ \hline Here-and-now solution & & & & & \\ \hline Wait-and-see solution & & & & & \\ \hline Sensibility analysis of & & & & & \\ deterministic parameters & & & & & \\ \hline Sensibility analysis of & & & & & \\ stochastic parameters & & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: _Cont._* Decision variables: \(W_{k}\) is the number of workers assigned to production for each product type; \(I_{(t)k}\), \(X_{(t)k}\) and \(B_{(t)k}\) are the inventory units, parts produced and backlogs per period product. \[min\sum_{k=1}^{K}W_{k}C_{W(k)}+\sum_{t=1}^{T}\sum_{k=1}^{K}I_{(t)k}C_{I(k)}+\sum _{t=1}^{T}\sum_{k=1}^{K}X_{(t)k}C_{x(k)}+\sum_{t=1}^{T}\sum_{k=1}^{K}B_{(t)k}C_ {B(k)}\] (1)  
Equation (1) is the objective function that minimizes total costs production plan. Notice that the cost of the workers assigned to each family products is not for all the periods, which is because without a hiring-firing policy, the workers' size will be the same for all periods, and then, \(\sum_{k=1}^{K}W_{k}C_{W(k)}\) is the amount to be paid for all the periods in the horizon plan. \[X_{(t)k}+I_{(t-1)k}=D_{(t)k}+I_{(t)k}+B_{(t)k}-B_{(t-1)k}\forall t\in T,k\in K \tag{2}\]  
Equation (2) is the demand-inventory-backlogs balance; this equation determines the number of parts to be produced, the inventory level and the number of backlogs per period and family of products. Notice that if backlogs occur in some period, then in the following period, the backlogs must be conserved. \[X_{(t)k}\leq W_{k}C_{P(t)k}\ \forall t\in T,k\in K \tag{3}\]  
Equation (3) is the capacity constraint and indicates that the maximum parts for each period and family of products must be equal or less than the number of workers assigned for each family of products multiplied by the production capacity for each period and family of products. \[D_{(t)k}-B_{(t)k}\geq LS_{k}D_{(t)k}\ \forall t\in T,k\in K \tag{4}\]  
Equation (4) is the level of service constraint and ensures that a certain percentage of the demand will be completed for each period and family of products. \[X_{(t)k},I_{(t)k},B_{(t)k},W_{k}\geq 0\ \forall t\in T,k\in K \tag{5}\]  
Constraint (5) indicates nonnegative decision variables for all periods and families of products.