# Computing Idle Times in Fuzzy Flexible Job Shop Scheduling
## 3 Idle Times with Fuzzy Durations
### A Naive Approach  
The most straightforward approach to computing the time a resource, \(r\), is idle waiting for an operation, \(o\), under a fuzzy schedule, \(\phi\), denoted as \(\hat{l}_{\phi}(o)\), is to subtract the completion time of the operation's immediate resource predecessor, \(RP_{\phi}(o)\), from the starting time of \(o\). This is a direct translation of how the idle time can be computed in a deterministic setting, and it has been applied several times in the fuzzy scheduling literature [43; 44; 45]. Taking into account that negative values for idle times are impossible, this translates into the following definition:  
\[\hat{l}_{\phi}^{N}(o)= \begin{cases}(0,0,0)&\text{if }o=\alpha_{\phi}(\tau_{ \phi}(o)),\\ \max\{(0,0,0),\widehat{s}_{\phi}(o)-\widehat{c}_{\phi}(RP_{\phi}(o))\}&\text{ otherwise.}\end{cases}  \tag{16}\]  
That is, if \(o\) is the first operation to be processed in its resource \(r=\tau_{\phi}(o)\), the idle time before \(o\) is null, and otherwise, it is the difference between the operation's starting time and its predecessor's completion time, discounting negative values (which we know are impossible). Then, the core idle time for resource \(r\) is given by the sum of idle time for the operations scheduled in \(r\):  
\[\widehat{\Gamma\Gamma}_{\phi}^{N}(r)=\sum_{o\in\mathbf{O}:\tau_{\phi}(o)=r} \hat{l}_{\phi}^{N}(o) \tag{17}\]  
The problem with this straightforward extension of the deterministic definition is that, as mentioned in Section 2.1, the fuzzy subtraction assumes that the variables involved are non-interactive. Making such an assumption for two consecutive operations in a resource is at least naive and, in most cases, problematic. Indeed, in a feasible schedule, an operation, \(o\), cannot start before its immediate processor is completed, so there is a clear dependence between \(\widehat{s}_{\phi}(o)\) and \(\widehat{c}_{\phi}(RP_{\phi}(o))\). This dependence is highly marked in the case of semi-active schedules, where \(\widehat{s}_{\phi}(o)\) is defined in terms of \(\widehat{c}_{\phi}(RP_{\phi}(o))\), as shown in Equation (11). As a result, computing the idle time for an operation, \(o\), using (16) will most likely result in a quantity with added artificial uncertainty in the sense that many values in its support are actually unattainable. Let us illustrate this with an example:  
Let \(u\), \(v\), and \(w\) be the only three operations in a schedule \(\phi\) where \(u\), the job predecessor of \(w\), is processed on its own in a resource, while \(v\) is the resource predecessor of \(w\) in a second resource. Let the processing times of these tasks be \(\widehat{p}_{\phi}(u)=(1,2,3)\), \(\widehat{p}_{\phi}(v)=(5,6,8)\), and \(\widehat{p}_{\phi}(w)=(1,3,4)\). Clearly, if \(u\) and \(v\) start at instant \(0\), their completion times are, respectively, \(\widehat{c}(u)=(1,2,3)\) and \(\widehat{c}(v)=(5,6,8)\). Hence, the completion time of \(u\) cannot affect the starting time of \(w\), \(\widehat{s}_{\phi}(w)\), which, for any feasible schedule, must be such that \(\widehat{c}(v)\preceq\widehat{s}(w)\), with an equality for semi-active schedules, i.e., \(\widehat{s}(w)=\widehat{c}(v)=(5,6,8)\). The Gantt chart of the schedule, adapted to TFNs, as proposed in [50], can be seen in Figure 1. Now, if we compute the difference, \(\widehat{s}_{\phi}(w)-\widehat{c}_{\phi}(v)=(5-8,6-6,8-5)=(-3,0,3)\). This number is counterintuitive for two reasons. First, allowing for negative idle time values does not make any sense. This is solved by taking the maximum with, \((0,0,0)\); so, according to (16), the idle time for \(w\) is \(I^{N}(w)=(0,0,3)\). We depict the resulting TFN in Figure 0(b), where the dashed line represents the negative side that is removed, with the area under the membership function for \(I^{N}(w)\) shaded in grey.