## 4 Algorithms for Core System Functionality
### BOM Precedence Constraint Satisfaction Metaheuristics
\(\forall\ p(i,j)\in K^{-}\) do: 1. Calculate all \(\frac{rjm_{j}}{N_{ij}}\). 2. Find \(j\) with \(\min\frac{rjm_{j}}{N_{ij}}\). 3. Prompt user to transfer \(j\). 4. If \(STi\geq\sum_{j=1}^{J}N_{ij}\) terminate, else go to b to find next \(j\). Of final note in this section is the impact analysis heuristic. This heuristic extends the logic behind BOM precedence constraint satisfaction to all the functional groups. Execution normally comes after the termination of the TS/VNS-ATM algorithm for all functional groups. The first step is the identification of \(p(i,j)\) pairings for which \(i\) and \(j\) belong to different functional groups. For all such pairs, if transferring or any type of dispatching has led to \(PPPi=PPPj\), hence \(i\) has been delayed, then the planner is prompted to transfer \(j\) to \(PPPj=PPPi+1\). Additionally, if \(i\) has been moved significantly earlier (a rare occurrence), for example, \(PPPi=PPPj-3\), then the planner is prompted to transfer \(j\) to \(PPPj=PPj-2\). The main goal is to have a single PPP difference for all pairs belonging to different functional groups, thus conforming to the lead times. The exhortations are presented to the planner via a report indicating the child-father production order codes, the work centers producing them, their respective functional groups, the start and finish times, and finally, the PPPs. Table 6 provides a synopsis of the algorithmic framework presented in Section 4. All the algorithms are presented along with their inputs and outputs. The inputs are directly drawn by the G-DSS from the PPC database since both systems share a common database schema. The only exception is the ATM algorithm where the children's stock quantities are taken from the ERP system, which functions as the inventory monitoring system of the case study. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Algorithm** & **Inputs** & **Outputs** \\ \hline Weighted earliest due date heuristic (WEDD) & Quantities, processing times, due date, priority level & Sequence of orders \\ \hline Priority rule “SPT” & Quantities, processing times, due date & Sequence of orders \\ \hline Priority rule “LPT” & Quantities, processing times, due date & Sequence of orders \\ \hline Priority rule “PSF” & Quantities, processing times, due date & Sequence of orders \\ \hline Priority rule “SST” & Quantities, processing times, due date, setup times & Sequence of orders \\ \hline Priority rule “Combo” & Quantities, processing times, due date, setup time, priority level & Sequence of orders \\ \hline Capacity calculation algorithm & Work center capacity, quantities of sequenced orders & Work centers load, bottleneck identification \\ \hline Processing time estimation algorithm & Alternative work centers, capacities, quantities of sequenced orders & Processing time for alternate work centers \\ \hline Preemption algorithm & Planned quantities, remaining quantities, due date & New production orders for the remaining quantities \\ \hline ATM & BOM tree, quantity of “father items”, inventory of “children items”, starting time of “children items” & Production orders of “father items” capable to manufacture \\ \hline TS/VNS & Weighted priority indexes of priority rules, quantities, processing times, due date, priority level & Improved sequence of orders \\ \hline BOM tree impact analysis heuristic & BOM tree, due dates, production groups of “father items” and “children items” & List of proposed orders transfers \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Synopsis of core functionality algorithms.