## 3 The Structure of the Decision Support Platform
### Production Scheduling Module
#### 3.5.1 Mathematical Model  
Considering the above aspects, a mathematical model, and the combinatorial optimization method to obtain the optimal scheduling frameworks of activities associated with the technological flows through modification of working time sequence corresponding to the programmable equipment or installations, is developed. The combinatorial optimization method is based on a fast heuristic search in the large admissible sets to obtain the optimal solution, represented by the time intervals in which the programmable equipment will work. The proposed method represents a useful decision-making tool in the choice of energy suppliers with the best offer of the energy cost and the identification of energy efficiency solutions. The objective is the flattening of the energy consumption profile through the identification of the optimal solutions for the production scheduling of the SMEs, whatever may be the industrial activity branch. The method considers the energy amount consumed by the equipment and installations which perform a certain activity inside a technological flow, from the moment they start working until their stopping after the associated task has been accomplished. Another aspect refers to the identification of the equipment and programmable installations. Those programmable installations and equipment, with high energy consumption, can be moved to work in the hourly periods with a small energy tariff or the reduced energy consumption without affecting the technological flow and having a minimum influence on the performance. The flattening of the energy consumption profile is done for the work period when the activity is very intensive, moving the programmable equipment and installations in the hourly period with reduced activity. The mathematical expression of the objective function is [56]:  
\[\min\sum_{h=1}^{T_{H}}c_{W,h}\cdot\left|\sum_{a=1}^{n_{a}}\sum_{e=1}^{n^{a}_{ e}}w_{f,a,h}-\frac{C_{T}}{T}\right| \tag{12}\]  
where  
\[C_{T}=\sum_{a=1}^{n_{a}}C_{d,a}=\sum_{a=1}^{n_{a}}\sum_{e=1}^{n^{a}_{e}}c_{W,h }\cdot w_{f,a,h^{\prime}}\ f=1,\ \ldots,\ n_{p} \tag{13}\]  
\(c_{W,h}\)--the energy cost at hour \(h\), \(h=1\),..., \(T_{H}\); \(T\)--analysis duration, usually is represented by the work schedule; \(w_{f,a,h}\)--the energy consumption of equipment or installation \(e\) necessary to execute the activity \(a\) and obtaining the final product \(f\); \(n_{p}\)--the total number of final products; \(n_{a}\)--the necessary activities to obtain the final product \(f\); and \(n^{a}_{e}\)--the number of equipment and installations used for the activity \(a\) to be carried out. Due to the complexity of the industrial processes, the following technical constraints must be considered:* _the allocation of the equipment or installations_ to a technological flow to perform a task: \[X_{f,a,c,h}=\left\{ \begin{array}{ll}0&if\;k\;\text{does not work}\\ 1&if\;k\;\text{works}\end{array} \right. ;\] (14) \[h=1,\;\ldots,T_{H},\;e=1,\;2,\;\ldots,\;n_{e}^{a},\;f=1,\;2,\; \ldots\;n_{p},\;a=1,\;2,\;\ldots n_{a}\] where \(X_{f,a,c,h}\) represents a decision variable for the allocation of the equipment or installations. Only if \(X_{f,a,c,h}=1\), then the equipment or installation \(e\) performs the activity \(a\), to obtain the final product \(f\), at the hour \(h\). * _the working time of equipment or installation_ \[T_{f,a,e}^{Start}-T_{f,a,e}^{Stop}\geq T_{f,a,e};\;e=1,\;2\;\ldots,n_{e}^{a},\; f=1,\;2,\;\ldots\;n_{p},\;a=1,\;2,\;\ldots n_{a}\] (15) where \(T_{f,a,e,h}^{Start}\) and \(T_{f,a,e,h}^{Stop}\)--the start and stop hours, respectively, between which the equipment or installation \(e\) works to carry out the activity \(a\), to obtain the final product \(f\) and \(T_{f,a,e}\)--the working time of the equipment or installation \(e\).