# An Algorithm for Part Input Sequencing of Flexible Manufacturing Systems with Machine Disruption
## 3 Proposed Algorithm  
The application of segment set functions to FMS scheduling problems has been conducted. For example, the functions have been utilized for developing the simultaneous part input sequencing and robot scheduling algorithm to simultaneously sequence and input parts and to schedule a robot in FMSs [5]. The functions are utilized here in developing the proposed algorithm. The functions are described by discrete mathematics. Discrete mathematics involves algorithm, logic, Boolean algebras, and so forth [30]. Segment set functions include the concepts of sets, domains, ranges, parts, and so forth. The functions consist of pair-wise elements of domains and ranges. For a simple set function, the 1 st element of the function is a part in a set. The 2 nd element of the function is an integer number representing the range of the function. For a transform function, the 1 st element of the function is also a part in a set. The 2 nd element of the function is the range of the function. The domain of the function is in multiple regions. The range of the function has segment values corresponding to different sets of parts. For a weight function, the 1 st element of the function is similarly a part in a set. The 2 nd element of the function is the range of the function. Different weights are assigned to the function to correspond to different sets of parts. For an overall function, the 1 st element of the function is similarly a part in a set. The 2 nd element of the function is similarly the range of the function. The range of the function has segment values corresponding to different sets. A set of parts in the preprocess area of an FMS at time \(t\) are denoted as \(A_{x}(t)\), \(A_{x}(t)=\left\{b_{hi}|g_{bix}(t)=1\right\}\), where \(x\) is a part set indicator, \(b_{hi}\) is part \(h\) of order \(i\), \(i\) is an order index, \(i=1,2,\cdots,h\) is an part index, \(h=1,2,\cdots r_{i}\), \(r_{i}\) is the production requirement for order \(i\); \(g_{bix}(t)\) is the part set status, \(g_{bix}(t)=\left\{ \begin{aligned} & 1,&\text{ part }b_{hi}\text{ is in set }A_{x}(t);\\ & 0,&\text{ otherwise.}\end{aligned} \right.\)\(A_{x}(t)\) is classified as the other two sets of \(A_{a}(t)\) and \(A_{b}(t)\). Subset \(A_{a}(t)\) is a balanced set. Subset \(A_{b}(t)\) is an unbalanced set. \[A_{a}(t)=\big{\{}\,b_{hi}|b_{hi}\in A_{x}(t)\wedge g_{b_{hi}a}(t)=1\wedge M_{b_{ hi}1}=\widehat{j}\big{\}}, \tag{1}\]  
\[A_{b}(t)=\big{\{}\,b_{hi}|b_{hi}\in A_{x}(t)\wedge g_{b_{hi}b}(t)=1\wedge M_{b_{ hi}1}\
eq\widehat{j}\big{\}}, \tag{2}\]  
\(A_{a}(t)\) and \(A_{b}(t)\) are classified as other four sets, \(A_{u}(t)\), \(A_{b}(t)\), \(A_{m}(t)\), and \(A_{n}(t)\). Among those, \(A_{u}(t)\) and \(A_{v}(t)\) are subsets of \(A_{a}(t)\). \[A_{u}(t)=\Big{\{}\,b_{hi}|b_{hi}\in A_{a}(t)\wedge g_{b_{hi}a}(t)=1\wedge M_{b_ {hi}1}=\widehat{j}\wedge M_{b_{hi}2}=\widehat{j}\Big{\}}, \tag{3}\]  
\[A_{v}(t)=\Big{\{}\,b_{hi}|b_{hi}\in A_{a}(t)\wedge g_{b_{hi}v}(t)=1\wedge M_{b_ {hi}1}=\widehat{j}\wedge M_{b_{hi}2}\
eq\widehat{j}\Big{\}}, \tag{4}\]  
\(A_{m}(t)\) and \(A_{n}(t)\) are subsets of \(A_{b}(t)\). \[A_{m}(t)=\Big{\{}\,b_{hi}|b_{hi}\in A_{b}(t)\wedge g_{b_{hi}m}(t)=1\wedge M_{b_ {hi}1}\
eq\widehat{j}\wedge M_{b_{hi}1}=\widehat{j}\Big{\}}. \tag{5}\]  
\[A_{n}(t)=\Big{\{}\,b_{hi}|b_{hi}\in A_{b}(t)\wedge g_{b_{hi}n}(t)=1\wedge M_{b_ {hi}1}\
eq\widehat{j}\wedge M_{b_{hi}1}\
eq\widehat{j}\Big{\}}. \tag{6}\]  
The symbols in the above equations are explained in the following. \(g_{b_{hi}q}(t)\) indicates the status of a part set, \(g_{b_{hi}q}(t)=\left\{ \begin{array}{cl}1,&\text{part }b_{hi}\text{ is in set }A_{q}(t);\\ 0,&\text{otherwise.}\end{array} \right.\)\(M_{b_{hi}k}\) expresses the machine for \(k\) of part \(b_{hi}\), \(k\) is an operation index. \(\widehat{j}\) expresses the machine that has the minimum of \(\eta_{j}(t)\). \(\widehat{j}\) expresses the machine that has the second minimum of \(\eta_{j}(t)\). \(j\) is a machine indicator. \(\eta_{j}(t)\) expresses the workload of machine \(j\).