Two-level priority scheduling framework in a max-plus linear representation

ABSTRACT A common type of scheduling policy includes first-in-first-out (FIFO) and earliest-outset bases. Among many approaches to this, max-plus linear representation is beneficial for event-driven discrete event systems (DESs). The earliest event occurrence times can be represented by linear relations in max-plus algebra, the resultant of which is analogous with the state equation in modern control theory. Methodologies in control theory such as evolution prediction and just-in-time scheduling can thus be utilized. Although useful, the description capability remains confined to FIFO contexts, for which the method would not be capable of producing an efficient solution for systems with two-level priorities. An entity, e.g. a task or token in scheduling contexts, with higher qualification would be prioritized over one with a lower qualification. A framework for overtaking tasks is necessary for this. Motivated by this need, this article is concerned with constructing a two-level priority scheduling methodology in a max-plus linear context. A numerical experiment applied to a simple manufacturing system highlights the significance of the constructed method.


Introduction
In modern production site and project management, accurate scheduling is important for product production and project management. One of the scheduling methods occasionally used is a max-plus linear (MPL) system. This system is classified as an event-driven discrete event system (DES), effective for scheduling problems such as project scheduling and production planning. The MPL system is described in max-plus algebraic contexts; it is able to represent time structures of two types of systems: parallelizing a job and synchronizing multiple jobs. Several scheduling methods have been proposed using an MPL system [1,2].
Practical applications of MPL systems are diverse; scheduling of a railway timetable is an instance. Goverde [3] applied an MPL system to railway timetable scheduling, along with a timetable analysis based on stability theory. Meanwhile, existing railway systems have constraints that cannot be manipulated with existing frameworks. An instance is that a rapid service train do not stop at some stations, overtaking previous trains, while local trains might have different origin and destination stations. If an overtaking is planned at an intermediate station, then the orders of the relevant trains change at succeeding stations. To address these problems, Goto and Takahashi [4] consider different departure, terminal, and intermediate stations, as well as the maximum number of the latter. Yoshida et al. [5] construct a scheduling method to resolve resource contention in an MPL context. Kusunoki and Takahashi [6] describe a railway system on an MPL system considering maximum and minimum capacities with different departure, terminal, and intermediate stations.
Fast train service is available in many railway lines to achieve faster arrival. Trains with multiple priorities run on a single line, where overtaking is arranged at several intermediate stations. While MPL-based methodologies are beneficial in earliest/latest scheduling policy contexts, a framework for manipulating jobs with multiple priorities has yet to be constructed. Applied to railway systems, the first challenge for this is [7], wherein an MPL system is formulated to account for overtaking preceding trains at intermediate stations. Given initial orders with respect to jobs, the framework enables us to change the order of jobs while at work. Each job shall have a priority level. If a prioritized job is submitted later, then the preceding normal jobs might be suspended at intermediate facilities until the later job overtakes them. In the succeeding facilities, the prioritized job is performed followed by the normal jobs. This disposition is called a priority scheduling. In this paper, we construct a framework for a two-level priority scheduling. The formulation is capable of classifying two priority levels for a job at each facility. At given specific facilities, a prioritized job can overtake preceding jobs.
As a practical application, we construct a framework to formulate a railway system proposed in [7].
In a project scheduling context, indeterminacy arises in constraints between tasks and facilities. These are work constraints, such as specific jobs not being able to start until succeeding jobs have completed or preceding jobs being made to wait by succeeding jobs. These constraints can be addressed by generalizing job overtaking. To overtake a job at a facility, the preceding job waits at a specific facility until the following job catches up, then it resumes after the job has overtaken it. This disposition is comprehended as a constraint on jobs.
Even with an extended model, there has been an issue that the departure time of the overtaking cannot be calculated in a correct manner. This will be resolved by recasting the model in [2].
Event counter is a key variable in MPL systems to identify the job sequence, for which order change of jobs has not been a central concern in potential applications. In some practical systems, however, such change is structurally possible and can improve the entire system's performance. Thus a new MPL-based methodology that accounts for order change need to be developed. Once a formal method is constructed, generalization is achieved by which the potential applications might range from railway scheduling to computer science, e.g. multilevel queue CPU scheduling.
This paper is organized as follows. In Section 2, max-plus algebra and MPL system are introduced. In Section 3, with an MPL-based formulation, an algorithm that accounts for job overtaking is proposed. In Section 4, numerical computations for a manufacturing system are conducted to demonstrate the feature of overtaking. In Section 5, we summarize and conclude our work.

Basic operations in max-plus algebra
Let the whole real set be represented by R. The maxplus algebraic system comprises two basic operations for addition and multiplication: max and "+" opera- The unit element for ⊕ is e (= 0), and the zero element for ⊗ is ε (= −∞). For For matrices X, Y ∈ R m×n max , we define For matrices X ∈ R m×n max and Y ∈ R n×p max , we define The unit matrix e ∈ R n×n max a square matrix with all diagonal elements equal to e, and the other elements equal to ε. All entries of the zero matrix ε ∈ R n×m max are ε. These indicate:

Capacitated MPL state equation
Our target relates with DESs in which the same resources are used repeatedly by multiple jobs. A job may need multiple in-facility jobs at an intermediate facility, and/or may yield multiple outlets at another facility. These flows are comprehended as fork-and join-structures, and some chemical plant and manufacturing system may have either or both of these. A project network commonly has this as well. A system with a fork-join structure in a network shall satisfy the following constraints: • The number of facilities is n, the number of external inputs is p, and the number of external outputs is q. • Each job passes through all facilities, and the number of operations in each facility is one. • A facility with a preceding facility cannot start work until the preceding facility is completed and a job is received. • In a facility with an external input, processing cannot start until a job is input. • A facility with a maximum capacity limit can start a job if the number of active jobs in the facility is less than or equal to its capacity. • When all the conditions for processing are met, processing starts.
The earliest arrival and departure times for facility i of the kth job are [x a (k)] i and [x d (k)] i . The work time in each facility of the kth job is given by p i (k) (≥ 0), and the time required to transfer from facility j to facility i is d ij (≥ 0). Furthermore, [u(k)] j indicates the input time of the external input j, R i is the set of facilities preceding facility i, and Q i is the set of external inputs to facility i. Set M ih denotes the set of facilities following facility i that have a maximum capacity of h.
Matrices P k , F, H (h) , and B are defined as follows: [F] ij = d ij : facility i has a preceding facility j, ε : otherwise , e : maximum number of jobs between facility i and the preceding facility j is h, [B] ij = e : facility i has an external input j, ε : otherwise.
Now, consider the arrival and departure time of facility i. Each time is obtained by the following equations: Since Equations (5) and (6) hold for all i (1 ≤ i ≤ n), the following matrix representation is obtained: where (1) , Here, Q is the maximum capacity. Note that the state equation x appears on both sides of Equation (7). Substituting iteratively the entire equation into the lefthand side, we obtain the following: where F k has the following relationship: There is an instance s (2 ≤ s ≤ n) that satisfies: Here, we define the Kleene closure as follows: Using this closure, Equation (7) is finally formulated as follows: where A rescheduling needed for the kth job is achieved using Equation (12). For a facility i that requires rescheduling, element [x(k)] i is set to ε.

Model extension
We extend the model in the previous section to account for job overtaking. First, we add the following constraints to the model: • The maximum number k max of operating jobs is known. • The job to be overtaken and the facility at which the overtaking occurs are known. • The job overtakes a preceding job at a facility. That is, the preceding job waits for the following job at the facility.
• The job may stay in the facility for longer than processing time, because it may need to wait for a job the needs to overtake. • Overtaking is not allowed at the origin and destination facilities. • Overtaking is not allowed at the junction of a fork.
• Once a job has been overtaken, it does not overtake.
To apply x(k) to overtaking for all k, we extend vectors x a (k) and x d (k) to a matrix X ∈ R n×k max max , defined as follows: The Hadamard product in max-plus algebra is defined here. In X, Y ∈ R m×n max , we define The operation ∧, used to shift the matrix, is defined as follows. Matrix A ∧n is an entity in which the columns after the jth column of the matrix A are shifted left n times, and n empty columns are padded with a vector being set to ε for all elements. Using T a k ∧h , we obtain the departure and arrival times for job k as follows: where g k max is a vector with all elements equal to e. The shift operation for T a k in Equation (17) is calculated in this manner; the current states of the hth job, counting back from job k, are stored at h columns to the left for job k.
To deal with the state vector in Equation (17), the common state vector x(k) in Equation (8) is augmented as follows: By updating x [a|d] k based on Equation (17), the arrival/departure time is updated per overtaking. We define a matrix holding information on the job oper- As a result, the subsequent arrival/departure times, X [a | d] , can be calculated based on in all columns. Equation (21) is expressed with T d k , which indicates dependency of X on T d k . Thus, in obtaining the arrival/departure times at the final state through the algorithm, Equation (17) must be applied after replacing T a k with T d k . The algorithm reflecting overtaking is summarized as Algorithm 1. Note here that matrix T k contains a state variable. When the overtaking is performed, T k is updated to reflect the overtaking.
Algorithm 1 Computation algorithm of the state equation, accounting for overtaking. 4: if Job k is an overtaking job then 6: k ⇐ The earliest job overtaken 7: while k < k do 8:

Empirical result
We verify through numerical experiments if the proposed method accounts for overtaking. Figure 1 shows a manufacturing system with two inputs, two outputs, and eight facilities. The processing time of the facilities is 1, and the transportation time between facilities is 2. There is a maximum capacity limit of 1 between adjacent facilities. With these in mind, the representation matrices are set as follows: 1 1 1 1 1 1 1 1 , In Figure 1, facility 4 has a join structure, and facility 5 has a fork structure. We deal with six jobs in total. They are submitted and shall be called from Job 1 to Job 6 in this sequence, and the input time for Job i is given by u(i) = 3i + 1. Job 4 overtakes preceding jobs at facilities 2 and 4, and Job 6 overtakes at facility 6. The three facilities, 2, 4, and 6, correspond to pre-joining, joined, and forked facilities, respectively.
Here, we focus on a high prioritized Job 4. Job 4 overtakes jobs 2 and 3 at intermediate facilities. To achieve overtaking, these two jobs are supposed to wait at designated facilities 3 and 2, respectively. Job 4 departs each facility upon completion, then the overtaken jobs 2 and 3 leave. This can be observed from the intersections of the lines between job 4 and the facilities of jobs 2 and 3. This confirms that the overtaking is performed before and after the join. Further, we can observe from the intersection of facility 6 that jobs are also overtaken in jobs 5 and 6.
We inspect how other facilities are impacted by overtaking before the join and after the fork. The order of arrival and departure times for each job is summarized in Table 2. Jobs that overtake a preceding job are highlighted in dark gray, and those overtaken by a succeeding job are highlighted in light gray.
We note that facilities 2 and 3 are the predecessors of facility 4. In Table 2, we notice that the impact of overtaking is propagated to facility 3, while no impact is observed for facility 3 in Table 1. The overtaking of job 4 at facility 2 may impact indirectly facility 3. Facility 4 is a direct successor of facility 2, and there is a maximum capacity constraint between facilities 3 and 4. This would imply that the order of arrival and departure does not necessarily hold for the order of start and completion times. With respect to the overtaking at facility 4, Figure 1. A network with a fork-join structure.  only succeeding facilities are affected. For facilities 6 and 7, which are the succeeding facilities of facility 5 with a fork structure, the overtaking of job 5 at facility 6 after branching has no effect on facility 7 after the two forks.

Conclusion
We have proposed a two-level priority scheduling framework in a max-plus algebraic context. In a class of earliest or latest outset-based DESs, there can be situations in which a job overtakes previous ones, or a job must wait for a succeeding job. This operation is occasionally key to achieve better performance in the entire system. The constructed framework is capable of taking into account these. A network with a fork-and/or join-structure, as well as a simple tandem-structured network, can be dealt with in a unified manner. Central there is that the job sequence is determined and might be changed according to arrival and departure times at each facility, and not to start or completion time. To validate the effectiveness of our constructed framework, numerical experiments are conducted for a railway transportation system.

Disclosure statement
No potential conflict of interest was reported by the author(s). His research interests include operations research, geographic information science, and high-performance computing.