## 4 Scheduling Method  
To obtain a feasible short-term schedule, the most difficult step is to decide on \(OD\)s and \(OD\)s. In this paper, we assume that a refining schedule is given, as can be found in the methods in [28; 30]. Given a refining schedule that is set according to the crude oil availability during the scheduling horizon, the feeding rate to the distillers is known, which implies that there is enough crude oil in the storage tanks to be processed. Hence, finding a detailed schedule to realize a given refining schedule is independent of the number of storage tanks and their capacity, and the storage tanks in the system are ignored when a PN model is presented in the discussion thereafter. According to [PERSON] et al. [21; 22], the existence of a feasible short-term schedule is the key to finding a schedule under the normal mode. With the SCF mode, a schedule should be available. Nevertheless, since the SCF mode is undesirable, its use should be minimized and the normal mode should be applied if possible. Thus, to schedule the system, we adopt both modes and the SCF mode is adopted only for some charging tanks during some periods when necessary. Under the normal mode, the system with initial state \(M_{0}\) is said to be schedulable if there exists a feasible short-term schedule for a horizon (\(0\), \(\infty\)) [21; 22]. A state \(M\) is said to be safe if, with \(M\) as its initial state, the system is schedulable. Based on this safety concept, we discuss the scheduling problem to minimize the use of the SCF mode. To minimize the use of the SCF mode, we need to measure such usage. When the SCF is applied for a charging tank by starting at time \(\tau_{1}\), this mode is applied without interruption until time \(\tau_{2}\). Then we say that, during time slot from \(\tau_{1}\) to \(\tau_{2}\), the SCF is applied to the charging tank. For a system with \(H\) charging tanks and \(K\) distillers, assume that charging tank \(CTK_{i}\) adopts the SCF mode for \(N_{i}\) time slots during the scheduling horizon. Let \(\tau_{sin}\) and \(\tau_{ein}\) denote the start and end time of the \(n\)th slot of applying the SCF mode for charging tank \(CTK_{i}\), respectively. Then the total time during which the charging tanks adopt the SCF mode is defined as \(\Pi=\sum_{i=1}^{H}\sum_{n=1}^{N_{i}}\left(\tau_{ein}-\tau_{sin}\right)\). Furthermore, let \(\Gamma=\left(\tau_{s},\tau_{e}\right)\) be the scheduling horizon. Then the usage of the SCF mode can be measured by \(\delta=\Pi/K(\tau_{e}-\tau_{s})\), which gives the ratio of time during which the distillers are fed under the SCF mode. Hence, to minimize the usage of the SCF, we have to minimize \(\delta\). As the charging tanks are an important and limited resource, a utilization ratio is introduced to the charging tanks. A charging tank is at a working state if it is being charged, discharged, or \(t_{2}\) in Figure 2 fires; otherwise it is at an idle state. Let \(N_{i}\) denote the number of time slots during which charging tank \(CTK_{i}\) is at a working state during the scheduling horizon, and \(\zeta_{sin}\) and \(\zeta_{ein}\) denote the start and end time of the \(n\)th working slot of \(CTK_{i}\), respectively. Then, the utilization ratio of \(CTK_{i}\) is defined as \(\rho_{i}=\sum_{n=1}^{N_{i}}\left(\zeta_{ein}-\zeta_{sin}\right)/\left(\tau_{e }-\tau_{s}\right)\), and the utilization ratio for the whole system is defined as \(\rho=\sum_{i=1}^{H}\rho_{i}/H\). We develop scheduling methods to find a schedule to minimize \(\delta\) and increase \(\rho\). We use \(f_{disi}\),\(f_{p\max}\), \(\Psi\), and \(\sigma\) to denote the feeding rate to distiller \(DS_{i}\), the maximal oil transportation rate of the pipeline, the ORT, and the safety stock, respectively. Places \(p_{is}\) and \(p_{ic}\) are used for charging tank \(CTK_{i}\) in the PN model. As a scheduling method, it is meaningful only if the production rate of the system can reach the maximum since productivity is a very important criterion.