# Peak Energy Reduction in Flow Shop including Switch-Off Policies and Battery Storage
## 4 Simulation Experiments  
The production line consists of three machines (or three manufacturing stages), and each machine has an upper stream buffer with no capacity limitation. The simulation environment has been developed using the package for Discrete Event Simulation from SIMUL8 Corporation. Figure 2 describes the architecture of the simulation environment developed. The simulation model consists of the following areas:  
* The flow line with machines and buffers that emulates the physical manufacturing system;
* each machine has a controller that performs the activities described in the previous section;
* the electricity grid where the information of the controllers defines the electricity load;
* the energy storage system that is charged by the electricity grid and support the machines based on the decisions of the controllers;
* the integration of the electricity grid and the energy storage system to provide the energy to the machines. Figure 2: Simulation architecture. When a part enters in a machine is determined the power necessary to perform the task is defined and it follows a uniform distribution with a mean of 20 kW and a percentage of variation _vi_ (Expression 2):  
\[Pi=UNIFORM[Pi-vi*Pi;Pi+vi*Pi] \tag{2}\]  
The constraint _Pmax_ is set equal to the sum of the mean power for the three machines, i.e., 60 kW. Table 1 reports the experimental classes for the parameters investigated: battery capacity (_Cp_), charging speed factor K (see Expression 1), and the power variability (_vi_) of the tasks. Three levels of battery capacity (10, 15, 20 kW*PTi), charge rate factor (10, 5, 2.5), and power variability (10%, 20%, 30%) have been considered. The battery capacity is related to the processing time, and _PTi_ follows a normal distribution with mean 10 min (_PTi_) and 25% of standard deviation. The inter-arrival time of the items follows an exponential distribution with a parameter equal to 11 to obtain an average utilization of the machines of 90%. \begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Exp. No.**} & **Battery Capacity** & **Charge Rate Factor** & **Power Variability** \\  & _Cp_ & K & _vi_ \\ \hline  
\hline \end{tabular}
\end{table} 
Table 1: Experimental classes. The experimental classes are simulated for three different model typologies:  
* machines always on;
* machines with upstream policy;
* machines with the upstream and downstream policy. Each model is simulated with and without an energy storage system. Therefore, the total simulations are 27 (i.e., number of the experimental classes) \(\times\) 3 (i.e., number of model typologies) + 3 (i.e., number of models without energy storage system) \(\times\) 3 (i.e., number of the different power variability), with a total of 90 simulation classes. The results are reported for the parameters of the switch-off policies that leads to the same throughput of the models without the switch-off. The parameters are the following:  
* Upstream policy considers one item to switch off and 3 items to switch on in the upstream buffer;
* Upstream and downstream policy considers the same parameters of the upstream policy and one item to switch on and 3 items to switch off in the downstream buffer. The performance measures considered are the following:
* Throughput of the manufacturing system; this performance is monitored to obtain the same throughput level of the models studied;
* The energy used over the peak power constraint (energy peak); this performance allows to evaluate the penalty costs;
* The peak power as the maximum value of the electricity grid load;
* Average electricity grid utilization to evaluate the uniformity of the load on the electricity grid;
* The average battery utilization and the percentage capacity use of the battery. The simulation length is set to 28,800 min to define a statistical analysis for the terminating simulation approach. For each class, a number of replications able to assure a 5% confidence interval and 95% of confidence level for each performance measure has been conducted.