- Email: [email protected]

Contents lists available at ScienceDirect

Robotics and Autonomous Systems journal homepage: www.elsevier.com/locate/robot

Conflict-free scheduling and routing of automated guided vehicles in mesh topologies Hamed Ghasemzadeh, Ehsan Behrangi, Mohammad Abdollahi Azgomi ∗ Department of Computer Engineering, Iran University of Science and Technology, Tehran, Iran

article

info

Article history: Received 25 November 2007 Received in revised form 21 October 2008 Accepted 28 October 2008 Available online 12 November 2008 Keywords: Automated guided vehicle (AGV) Flexible manufacturing system (FMS) Robot scheduling

a b s t r a c t Many storing and manufacturing systems tend to use automated guided vehicles (AGV) for speed, quality and safety as transporting objects. In this paper an integrated algorithm for scheduling and routing of AGVs in mesh-like systems is presented. The main characteristics of the scheduling algorithm are as follows: (1) prediction and prevention of conflicts, (2) arbitrary choice for AGVs to traverse shortest path from source to destination, (3) effect of priority policies to the scheduling result, and (4) no theoretical limitation on the number of participated AGVs. The proposed greedy algorithm for routing reduces the average number of conflicts and is closely related to the scheduling algorithm. We will also present mathematical and statistical models for the analysis of the algorithms. © 2008 Elsevier B.V. All rights reserved.

1. Introduction Automated guided vehicles (AGV) are widely used for transferring loads in industrial environments. Typical applications of AGVs are in flexible manufacturing systems (FMSs), automatic material handling systems and container terminals [1–4]. In the real world, the path topology of AGVs is mesh-like. Therefore, the conflict-free routing and scheduling algorithms for AGVs in mesh topology are very important and applicable [5,6]. Most of the existing methods work with a small number of AGVs and offer a low degree of concurrency. With a drastically increased number of AGVs in recent applications (e.g. in the order of a hundred in a container handling system), efficient algorithms are needed to resolve the increased contention of resources among AGVs [5]. There are two classes of scheduling algorithms for AGVs: centralized and decentralized (or distributed). In this paper, a new centralized algorithm for scheduling and routing of AGVs in orthogonal networks, especially for mesh topology is presented. To increase concurrency, AGVs have been divided into four categories depending to their source and destination. Then the time scale has been divided into four slots and the movement time of AGVs have been adjusted to prevent conflicts on junctions. In a mesh topology, every AGV should traverse one of the possible shortest paths. In the proposed algorithm, a shortest path

∗ Corresponding address: Department of Computer Engineering, Iran University of Science and Technology (IUST), Hengam St., Resalat Sq., 16846-13114 Tehran, Iran. Tel.: +98 2177240391; fax: +98 2177240469. E-mail addresses: [email protected] (H. Ghasemzadeh), [email protected] (E. Behrangi), [email protected] (M. Abdollahi Azgomi). 0921-8890/$ – see front matter © 2008 Elsevier B.V. All rights reserved. doi:10.1016/j.robot.2008.10.016

that causes fewer problems with the movement of other AGVs will be selected. The algorithm belongs to the class of one shot algorithms. In this class of algorithms, the system programs AGVs, fires them and then reprograms them to pursue new objectives when all the jobs in the previous shot have been completed. Some major advantages of the proposed algorithm are as follows:

• The algorithm is independent of the number of AGVs, • To face the run-time problems, the algorithm selects the shortest path for routing,

• It selects another path in the case of failure of an AGV, and • It applies high priority to a specific AGV. The remainder of this paper is organized as follows. In Section 2, the related works are introduced. In Section 3, a model of the system which will be used in the proposed algorithm is presented. In Section 4, the proposed algorithm and the related theorems and definitions are presented. A prototype implementation of the algorithm and its results are presented in Section 5. Some practical considerations are noted in Section 6. Finally, some concluding remarks are mentioned in Section 7. 2. Related works A number of results have been published on conflict-free routing of AGVs, which are categorized in [5]. As the best of our knowledge, there are few works on AGV routing in mesh topology [1,6–8]. Some of the related works are briefly introduced in the section. In [7], an algorithm for routing 4n2 concurrent AGVs using a sorting algorithm on a mesh structure is proposed. The optimized

H. Ghasemzadeh et al. / Robotics and Autonomous Systems 57 (2009) 738–748

739

Fig. 1. Model of the problem that is a general view of the movement system of robots in a mesh.

version of this algorithm appears in [8]. This latter algorithm guarantees that each AGV reaches to its destination with less than 3n movements. However, the number of movements is not optimized and AGVs do not use the shortest path to reach to their destinations in any of the above algorithms. The algorithm presented in [6], prevents more than one AGV to arrive to the same junction at the same time by adjusting the speed of AGVs. This algorithm can also prevent conflicting AGVs and uses the shortest path for routing of AGVs, but has some drawbacks (e.g., speed of each AGV is different and AGVs cannot have the same destination concurrently). Static parameters of this algorithm cause more problems (e.g., a single blockage will cause failure of the whole system [6]).

of horizontal and vertical roads is same and equal to n + 1. Of course, this latter supposition does not affect the applicability of the algorithm to rectangular meshes. In the rest of this section, we will first present a simplified model. Then, our claims about the scheduling algorithm will be mentioned. Finally, the routing policies will be introduced. Fig. 2 shows the simplified model. In this model the width of paths and AGVs are supposed to be equal to zero. As a convention, the coordinates of the junction corresponding to the intersected lines 1p , Γq are denoted by (p, q) (see Fig. 2). The following equation (Eq. (1)) is used for conversion of the coordinates into Cartesian:

3. Modeling the system Fig. 1 shows a simple model of an AGV in a real world meshlike topology. There are four buffers in each junction and there is also a bidirectional road between every two adjacent junctions. To simplify the algorithm, we have supposed that the capacity of buffers is unlimited. Each road has two directions. The width of each direction is denoted by W . The length of each road between two junctions is denoted by L. The speed of the AGVs is constant and equal to 41Lt , where is time unit of the system. The number 0

p−q+n x = x+y=p 2 ⇒ n−x+y=q y = p + q − n .

(1)

2

4. The proposed algorithm In this section we propose an algorithm to solve the existing problems by separation of scheduling and routing of AGVs. In the following algorithm, each AGV can use an arbitrary shortest path to reach to its destination. Then, we will discuss how an AGV can

740

H. Ghasemzadeh et al. / Robotics and Autonomous Systems 57 (2009) 738–748

Fig. 2. A simple model of the system that is used in the proposed algorithm.

choose a better shortest path (among all possible shortest paths) to cause fewer delays to the movement of the other AGVs. Definition 1 ( Job). The ordered pair Jk = ((p0 , q0 ), (pm , qm )), p0 6= pm ∨ q0 6= qm is a job assigned to machine number k(Mk ), which means AGV number k moves from source (p0 , q0 ) to destination (pm , qm ). Definition 2 (Path). A path is a sequence as follows:

For other directions this claim will be proved as in the previous case. Sufficiency: Suppose ξk is strictly ascendant for path πk . Then, the AGV traverses from 1i to 1i+1 in each step and the number of its shortest remained paths from destination will be reduced by one. Therefore, πk is a shortest path. Notice: According to Theorem 1, all ascending or descending paths are strict. So, if it is not mentioned, ascending and descending are strict, implicitly.

πk = (p0 , q0 ) → (p1 , q1 ) → (p2 , q2 ) → (p3 , q3 ) · · · → (pm , qm ) where, πk is a sequence of junctions that Mk (machine number k) should traverse them to reach to its destination and πk (i), (0 ≤ i) is the coordinates of i-th junction in sequence πk (e.g. πk (0) = (p0 , q0 ) shows the beginning location of Mk ). We can separate two new sequences ξk , ψk from πk :

ξk = p0 → p1 → p2 → · · · → pm ψk = q0 → q1 → q2 → · · · → qm . According to the coordinates, we can rewrite ξk , ψk as follows:

ξk ≡ ξ¯k = 1p0 → 1p1 → 1p2 → · · · → 1pm ψk ≡ ψ¯ k = Γq0 → Γq1 → Γq2 → · · · → Γqm . Claim 1. The distance of two consecutive sentences of ξk (ψk ) is one. If not, AGV should traverse two different streets without traversing any junction, which is impossible. Theorem 1 (Shortest Path). πk is a shortest path for job Jk if and only if ξk or ψk is strictly ascending or strictly descending. Proof (Necessity). If πk is a shortest path then it contains just two orthogonal and constant directions. For example, if a shortest path contains the north and east directions, in each step the AGV will move from 1i to 1i+1 . This implies that ξk (m + 1) = ξk (m) + 1. Therefore, ξk is strictly ascendant.

4.1. Classification of movements Paths are classified into four different classes. If Mk traverses an ascending/descending path such as ξk , it belongs to P + /P − and for ascending/descending ψk it belongs to Q + /Q −. In some cases Mk may belong to the two classes simultaneously (e.g., when πk is a direct path). In the rest of this paper, when we use P ± in a sentence, we mean the sentence is true for both P + and P − classes. Similarly, when we use Q ± in a sentence, we mean the sentence is true for both Q + and Q − classes of AGVs. 4.1.1. Delay Delay time is the time interval that an AGV stays in a buffer before movement. If we want to assign s ∈ N to delays of Mk , we add 4s1t0 to its delay time. τk denotes the initial delays of Mk (i.e. Mk should stay 4τk 1t0 at its buffer). Note that the speed of each AGV is 41Lt . Therefore, the delay 0 time (41t0 ) is equal to the required time for traversing the distance between two adjacent junctions. 4.1.2. The priority function A movement priority function (f ) is defined on the AGVs. f (Mk ) = c implies that the movement priority of Mk is equal to constant c. For example, f (Mk ) > f (Mk0 ) means that the movement priority of Mk is greater than Mk0 . The scheduling algorithm cannot guarantee f , but tries to retain it.

H. Ghasemzadeh et al. / Robotics and Autonomous Systems 57 (2009) 738–748

4.1.3. P class collision theorem Theorem 2 (P Class Collision Theorem). Suppose two AGVs, which belong to the class P ± and have no delay in the middle of their paths. They will crash if and only if the following conditions satisfy:

ξk (0) − ξk0 (0) = ±(τk − τk0 ) ∃m ∈ Z , ψk (m − τk ) = ψk0 (m − τk0 ).

(2) (3)

In the following paragraphs, this theorem is proved for class P +, which can be extended easily to class P −. Necessity: If τk − τk0 ≥ 0 it can be claimed that Mk0 leaves the buffer at t = 0 and Mk has been received τk − τk0 delays. So, no collision is occurred. Hence we have:

ξk0 (c ) = ξk (c − (τk − τk0 )) ψk0 (c ) = ψk (c − (τk − τk0 )).

Algorithm 1 (Scheduling). The following scheduling algorithm consists of five parts for P +, P −, Q +, Q − and synchronizes these four parts. We will explain the above parts in the following paragraphs. Part 1, 2: Step 1. Select the biggest member of SP ± , like Mi . Step 2. For all AGVs such as Mk ∈ SP ± with the following conditions:

ξi (0) − ξk (0) = ±(τi − τk ) ∃m ≥ τi , ∃τk , ψi (m − τi ) = ψk (m − τk ) Step 3. Now Mi is scheduled. Step 4. Delete Mi from SP ± .

(5)

Step 5. Continue the above operations for other AGVs of SP ± .

Then:

Part 3, 4:

ξk0 (0) + c = ξk (0) + c − (τk − τk0 ) ξk (0) − ξk0 (0) = τk − τk0 ψk0 (c ) = ψk (c − (τk − τk0 )) c = m − τk0 ψk0 (m − τk0 ) = ψk (m − τk ).

Step 1. Select the largest member of SQ ± , like Mi .

(8)

(9) (10)

4.2. Scheduling algorithm SP ± are two sets including all P ± AGVs and SQ ± are two sets including all Q ± AGVs. These two sets should be disjoint. Therefore, for AGVs such as Mk belonging to more than one set, the algorithm checks their initial coordinates. If ξk (0) ≥ ψk (0), then Mk will be deleted from SQ ± set. Otherwise, Mk will be deleted from SP ± . Then, we can define the order on members of each set as follows: Mk ≥ Mk0 ∈ SP ± if :

±[ξk (0) − ξk0 (0)] > τk − τk0 ∨ {±[ξk (0) − ξk0 (0)] = τk − τk0 ∧ f (Mk ) ≥ f (Mk0 )}.

(11)

Also, Mk ≥ Mk0 ∈ SQ ± if :

±[ψk (0) − ψk0 (0)] > τk − τk0 ∨ {±[ψk (0) − ψk0 (0)] = τk − τk0 ∧ f (Mk ) ≥ f (Mk0 )}. Now, we are ready to present the scheduling algorithm.

avgp(S ) = average of f for each AGV belonging to S, where f is the priority function and S is a set of AGVs.

Theorem 3 (Q Class Collision Theorem). Two AGVs belonging to the class Q ± and do not receive any delay in the middle of their path will crash if and only if the following conditions satisfy:

ξk (m − τk ) = ξk0 (m − τk0 ).

Step 4. Delete Mi from SQ ± . Part 5:

4.1.4. Q class collision theorem

∃m ∈ Z ,

(14)

Step 5. Continue above operations for other AGVs of SQ ± .

According to the movement of Mk0 at t = 0 and the movement of Mk after τk − τk0 delays, above relations shows that both of them will crash in same junction.

ψk (0) − ψk0 (0) = ±(τk − τk0 )

ψi (0) − ψk (0) = ±(τi − τk ) ∃(m ≥ τi , τk ) ξi (m − τi ) = ξk (m − τk ) Step 3. Now Mi is scheduled.

(7)

Also we have:

ψk (m − τk ) = ψk0 (m − τk0 ) c = m − τk0 ψk0 (c ) = ψk (c − (τk − τk0 )).

Step 2. For all AGVs like Mk ∈ SQ ± with the following conditions:

do τk = τk + 1.

Sufficiency:

ξk (0) − ξk0 (0) = τk − τk0 ∀c {ξk0 (0) + c = ξk (0) + c − (τk − τk0 )} ξk0 (c ) = ξk (c − (τk − τk0 )).

(13)

do τk = τk + 1.

(4)

(6)

741

• Step 1. Sort the set {SP − , SP + , SQ − , SQ + } ordered by avgp(.) and denote the members of the resulting set as {S0 , S1 , S2 , S3 }, where avgp(S0 ) ≥ avgp(S1 ) ≥ avgp(S2 ) ≥ avgp(S3 ). • Step 2. Add i1t0 to total delaying time of each AGV belonging to Si , where i = 0, 1, 2, 3. Correctness proof of the scheduling algorithm: First, we show that there are no conflicts between AGVs which belong to SP + after executing the scheduling algorithm. Suppose two AGVs such as Mk , Mk0 ∈ SP ± have a conflict. Also, suppose Mk exits from SP + before Mk0 . Suppose τk is the number of delays of Mk after deletion from SP + , and τk0 is the number of delays of Mk0 when Mk is being analyzed (before indicating its delays), and τk0 + c , c ≥ 0 is the number of delays of Mk0 after deletion from SP ± .1 If [ξk (0) − ξk0 (0)] 6= τk − (τk0 + c ) then according to P Class Collision Theorem the AGVs will not have any conflict (contradiction). If [ξk (0) − ξk0 (0)] = τk − (τk0 + c ) and c = 0 then when Mk is being checked and the algorithm will not assign any delay to Mk0 so @(m ≥ τk0 , τk )ψk0 (m − τk0 ) = ψk (m − τk ) and according to Theorem 2, they have no conflicts (contradiction). If c 6= 0 then [ξk (0) − ξk0 (0)] < τk − τk0 and according to total ordering in SP + so Mk is not greater than Mk0 (contradiction). Conflict-freeness of other sets can be proved as above. There is no conflict between AGVs of different sets, suppose Mk ∈ Si1 , Mk0 ∈ Si2 (the avgp(Si ) for (i = 0, 1, 2, 3) is descending

(12) 1 The number of delays of a machine after deletion from S , will not change. P+

742

H. Ghasemzadeh et al. / Robotics and Autonomous Systems 57 (2009) 738–748

on i and i1 > i2 ) collide after the scheduling, if conflict takes place in a junction then: c1 41t0 + i1 1t0 = c2 41t0 + i2 1t0 4

4

(c1 − c2 )4 = i1 − i2 ⇒ (c1 − c2 )4 ≡ i1 − i2 ≡ 0 1 ≤ i1 − i2 ≤ 3.

(15)

Therefore, this is a contradiction. For equal and constant speed of AGVs, a conflict will take place at a junction. So, after scheduling of AGVs we will not have any conflict in the system. 4.3. Routing algorithm Each AGV can choose each shortest path to reach to its destination, but which shortest path has the fewest problems with other AGVs? Each robot should pass through a number of roads to reach its destination. The minimum length of the set of these roads will result in the shortest path. Since the speed of robots is limited, the time a robot needs to do its job could not be less than a minimum duration. Therefore, the main measure for evaluation of the results of an approach for a solution of robots movement is the time difference between output of the algorithm and this minimum duration. Actually the time difference is the delays mentioned in evaluations and diagrams. Now, assume each AGV has at least two choices for the shortest path to reach to its destination. Therefore, the total number of possible routing methods is at least 2n . So, an exhaustive search method to find best set of shortest paths (totally gets the minimum conflicts) is a NP-hard problem, if there are at least two choices for every AGV. Since each AGV has only one choice, if an AGV reaches to its destination by moving through a direct path, the whole system will have only one routing method. In practice, depending on the system architecture, the movement of AGVs through a direct path rarely occurs. It is possible that at most times there is at least one break point in the path. Therefore, in order to reduce the total mean of delay times in the system, it is required that an efficient algorithm selects the paths. Theoretically, in path selection step it is possible to select every path if it is a shortest one. However, in scheduling step, an intelligent selection of path can reduce the number of collisions and as a result will reduce the mean delay times. An efficient routing algorithm should reduce the number of conflicts in the system. A system with fewer conflicts receives fewer delays. Therefore, each AGV will reach its destination in a shorter time. From statistical considerations, we try to choose paths with at most one break point (change direction) and the fewest conflicts. To see the details, please refer to Appendix A. There are not more than two shortest paths with one break point for each AGV. In small systems we can test all possible cases. However in large systems, we offer the following greedy algorithm. Now, we can present the routing algorithm. Algorithm 2 (Routing). The routing algorithm has two parts, which are discussed below. In this algorithm (x0i , y0i ) denotes destination coordinates of Mi . Part1: For choosing correct path for Mi ∈ SP ± check all Mk ∈ SP ± , k 6= i and ξi (0) = ξk (0). If the number of AGVs that satisfies conditions (16) is more than the number of AGVs that satisfies conditions (18), choose the row first and then choose the column; otherwise choose the column first and then choose the row as shortest path of Mi .

± [ψk (0) − ψi (0)] > 0, ±(x0k − x0i ) < 0.

(16)

± [ψk (0) − ψi (0)] < 0, ±(y0i − y0k ) > 0.

(17)

Table 1 Jobs of AGVs. M0 = ((0, 3), (0, 1)) M3 = ((1, 2), (3, 3)) M6 = ((2, 1), (0, 1))

M1 = ((0, 2), (3, 2)) M4 = ((1, 1), (2, 3)) M7 = ((2, 1), (3, 2))

M2 = ((1, 2), (0, 0)) M5 = ((1, 1), (3, 1)) M8 = ((2, 0), (2, 1))

Table 2 Classification of AGVs. SP +

SP −

M3 M7 M8 M4

M2 M6

SQ +

SQ − M5 M1 M0

Part 2: For choosing the correct path for Mi ∈ SQ ± check all Mk ∈ SQ ± , k 6= i and ψi (0) = ψk (0). If the number of AGVs that satisfy conditions (18) is more than the number of AGVs that satisfy conditions (19), choose the row first and then choose the column; otherwise choose the column first and then choose the row as shortest path Mi .

± [ξk (0) − ξi (0)] > 0, ±(x0k − x0i ) > 0.

(18)

± [ξk (0) − ξi (0), ] < 0 ±(y0k − y0i ) < 0.

(19)

Explanation of the algorithm: The routing algorithm is greedy. Suppose there are two AGVs, M1 and M2 (without any delay) in their buffers and they belong to category P + and have jobs such as J1 = ((x1 , y1 ), (x01 , y01 )) and J2 = ((x2 , y2 ), (x02 , y02 )), respectively. Also, suppose: x1 + y1 = x2 + y2 . Theorem 4 (Routing Theorem). If M1 and M2 have no conflict and the shortest path which has at most one break point is selected, then x01 − x02 < 0 or y02 − y01 < 0. Inversely if x01 − x02 < 0 or y02 − y01 < 0, then they can select a conflict-free shortest path that has at most one break point. Explanation: In some cases conflicts can be prevented by selecting correct (one break point) shortest paths. Suppose x01 − x02 < 0, if we select a row first then select a column as the path of M2 , we can prevent accident between M2 and M1 . Also if y02 − y01 < 0, we can prevent a probable conflict by selection of the first column and then the appropriate row for M1 as its shortest path. If we select a row after selecting a column we refer to it as column–row path; inversely, if a column is selected after a row we say row–column path is selected (see Fig. 3). Now, we present an example to explain the proposed method. Suppose we have a 4 × 4 mesh in which the jobs of the AGVs are as presented in Table 1. First, we categorize the AGVs to the sets P +, P −, Q +, Q −, as shown in Table 2. The AGVs of each column are sorted in descending order (from top to down) based on the definition presented in Section 4.2. A random value is also used as the priority of each AGV. The routing algorithm affects M1 , M3 , M4 According to the algorithm:

• Between M4 and M8 , M4 selects column–row path, • Between M1 ,M8 and M5 , M1 selects column–row path and • Between M3 and M7 , M3 selects column–row path.

H. Ghasemzadeh et al. / Robotics and Autonomous Systems 57 (2009) 738–748

743

Fig. 3. Situation of M1 and M2 in the mesh, by some selection M1 is protected from accidents with M2.

Table 3 Selected shortest paths that have at most one break point. M0 : M1 : M2 : M3 : M4 : M5 : M6 : M7 : M8 :

(0, 3) (0, 2) (1, 2) (1, 2) (1, 1) (1, 1) (2, 1) (2, 1) (2, 0)

(0, 2) (1, 2) (1, 1) (1, 3) (1, 2) (2, 1) (1, 1) (2, 2) (2, 1)

(0, 1) (2, 2) (1, 0) (2, 3) (1, 3) (3, 1) (0, 1) (3, 2)

decreases the number of probable conflicts before starting the scheduling. (3, 2) (0, 0) (3, 3) (2, 3)

All AGV paths are shown in Table 3. The scheduling algorithm begin on P +, M3 (first the greatest member of P +) does not have any conflict with other members of P +. So, it causes no change on the others delays. Therefore, M3 is scheduled and the algorithm removes it from P +. Other members of P + are similar to M3 and cause no change. In P −, M2 and M6 satisfy the conflict condition. So the algorithm assigns a delay to delay set of M6 which is empty. Each member of Q − (like P +) does not cause any delay to others. Finally, members of SP + will receive no additional delay time, members of SQ − receive 1t0 as additional delay time, SP − receive 21t0 as additional delay time and members of SQ + (which has no member in this example) receive 31t0 as additional delay time. In this example we have considered a sample priority function. Notice that some probable conflicts of the system were omitted by routing policy (e.g., (M3 , M7 ) or (M4 , M8 )), so the routing policy

5. Prototype implementation In this section, the practical results of our approach are presented. The prototype is implemented in Java programming language and has been run on a PC with 1800 MHz AMD Athlon x64 3000 + processor and 1 GB RAM. We have simulated a square (n × n) mesh with multiples of n2 AGVs that an (approximately) equal number of AGVs are located on each buffer. The AGVs are assigned to junctions randomly. We have implemented all simulations with our routing algorithm. The resulting routing time in small meshes was negligible and for larger cases was near to 16 ms. The goal of the system is to reduce the number of delays that are evaluated as a measure of improvement, as shown in the diagram of Fig. 4. According to this figure, the number of delays is a linear function of AGVs/Junctions. Indeed increasing the number of AGVs cannot move the average delays sharply in a fixed mesh which uses the proposed algorithm. Fig. 5 shows the ratio of scheduling time to AGV/Junction in logarithmic pane. According to the linear results of this figure, it can be concluded that the order of execution time of the scheduling algorithm is polynomial for the intervals of Fig. 5. Fig. 6 compares the number of delays of the proposed routing algorithm with random routing. In this figure the number of delays is evaluated as a measure of improvement. As shown in the figure,

744

H. Ghasemzadeh et al. / Robotics and Autonomous Systems 57 (2009) 738–748

Fig. 4. Average of delays according to density increment.

flexibility in routing phase which has already been explained, they have been separated into scheduling and routing parts. However, the delay finally determines whether the whole approach has a positive effect on the current state or not. Therefore, evaluation of the scheduling algorithm without considering its effect on scheduling is not rational. So, the effect of routing algorithm on the overall goal of the system, namely the reduction of the mean of delay times, should be evaluated, which is done in the diagrams of Figs. 4 and 6. In evaluation of the algorithm, we have selected only the random method and the other methods are not considered because of the following reasons: Other routing algorithms form a program that is a combination of scheduling and routing, not each one separately. The output of these algorithms is also a conflict-free model. While in the routing step of the method named orthogonal router, most conflicts exist and are not resolved. So, an algorithm should be selected that is designed for the proposed scheduling method. Those algorithms that have not separated scheduling and routing could not be used for evaluation of the proposed routing method. To evaluate the routing algorithm, we have selected only the random method as a candidate and other methods are not considered because of the reasons described. Also the selection of a random algorithm is done to prove that orthogonal intelligence of the proposed routing algorithm is positive to reduce the mean delay. Proposing the routing method is for improving the existing methods. Since the scheduling method together with the routing method is a total solution, it is required to propose at least one compatible routing algorithm. Because, in our study the orthogonal algorithm is considerable and with an acceptable efficiency, it has been introduced in this paper. 6. Practical considerations To use the proposed algorithm in real-world applications, it is required to consider more details discussed in this section. 6.1. Length of paths

Fig. 5. Time of delay assignment in the scheduling algorithm.

Paths can have arbitrary lengths in real-world applications. We can tune the AGV speed before each junction such that the time distance between every two adjacent junctions be equal to 41t0 . 6.2. Width of junctions and paths Suppose W is the width of each road. Also, suppose a situation in which an AGV arrives at a junction. If the AGV wants to change its movement direction in a junction, it should spend exactly w w 21t0 ( L i + L j ) units of time to pass the junction (roadi ⊥ roadj ). j

i

If it does not change its current direction in the junction, it should spend exactly 21t0 wk ( L1 + L1 )(roadi k roadj , roadi ⊥ roadk ) units j

i

of time to pass through the current junction (roard i is the current road).2 6.3. Limitations of AGV length Fig. 6. Comparison of the routing algorithm with random router for a mesh of size 32×32.

the improvement is considerable. Of course the improvement will be considerable for high densities. 5.1. Analysis of the results The proposed algorithms for scheduling and routing are an integrated method to solve robots movement problem. To achieve

To prevent a conflict situation in a general model, inequality (20) should be preserved: Lmin

> Max(M ) (20) 2n where, Lmin is the length of the shortest road between two junctions and Max(M ) is the length of the longest AGV. 2 In the above relations it have been supposed that every road includes two subroads with different directions with same widths.

H. Ghasemzadeh et al. / Robotics and Autonomous Systems 57 (2009) 738–748

6.4. Buffer overflow In practice, the problem of buffer overflow in bounded buffers should be considered and solved. It is possible to prevent overflow by specifying some rules on movement and storage of AGVs in the buffers. In this section some rules are introduced for this purpose. Of course these rules are not strict and some rules may exist to solve the problem by a different approach. Consider such a system by the following limitations: 1. All buffers can store 2k AGVs. 2. Each buffer initially has not more than k AGV(s). 3. Every buffer can be selected as a destination of not more than k AGV(s). 4. AGV(s) cannot stay in the buffer. In Appendix C, we have proved that these considerations are sufficient to prevent buffer overflow. Also there is a problem: what is the solution if more than k AGVs select same buffer as the destination? According to supposition 3 and 4, some must select another destination as a ‘‘temporary destination’’ to let the others complete their objectives. This is the situation where the second problem will arise. How does system behave if no temporary destination can be found for an AGV? The answer to this question leads to the Theorem 5. Theorem 5. There is a routing schema that selects a temporary destination for every overflowing AGV. Proof. Please see Appendix C. Hence, if k + m AGVs select same buffer, k of them can complete their objective and m of them that overflow can select another temporary destination. All overflowing buffers will be converted to full buffers and overflow AGVs will be distributed to temporary destinations. Appendix C shows that supposition 2 can be guaranteed in the next shot and AGVs selecting the temporary destinations will have a chance to reach to their objectives in the next scheduling and routing program. The previous discussion describes where m AGVs are routed to a temporary destination and named them ‘‘overflow AGVs’’. Which of the k + m AGVs will be marked as overflowing? It is the key concept to guarantee the chance of completing all jobs. To guarantee the chance of an AGV to reach to its destination in a limited number of shots, a counter named overflow counter is stored in every AGV. If k + m AGVs want to reach the same destination, m of them which have smaller counters will be marked as overflowing and will be route to a temporary destination. If an AGV selects a temporary destination, the counter will be increased by one. Every time the AGV reaches its destination, the counter will be reset. This algorithm guarantees that each AGV can complete its objective in a limited number of shots eventually. Appendix C proves this claim, too. 7. Conclusions In this paper we introduced a new integrated algorithm for scheduling and routing automated guided vehicles (AGVs) for mesh-like topologies. The main characteristics of scheduling in the proposed algorithm, which is based on a heuristic method, are as follows:

• Prediction and prevention of conflicts, • Arbitrary choice and flexibility for AGVs to traverse the shortest

745

In addition, a greedy routing algorithm is proposed to be used for reducing the average number of conflicts. A major advantage of the proposed algorithm is its independency from the number of AGVs. The other advantages are using the shortest path for routing and its flexibility in facing run-time problems (e.g. failure of an AGV, applying high priority to a specific AGV, etc.). We have investigated the proposed algorithm using a prototype implementation. The results obtained from the prototype implementation demonstrated the characteristics and advantages of the algorithm. The algorithm proposed in this paper is dedicated to two dimensional models. We have also worked on its extension for N-dimensional systems. We will present this extension in a forthcoming paper. Appendix A. Statistical analysis of the proposed router In this appendix, the statistical conflict model of two arbitrary AGVs is presented. The goal of this modeling is to compare two alternative policies for routing AGVs. In the first alternative, the AGV may change its direction in its path arbitrarily. In the second alternative, the maximum number of changes in directions in its shortest path is one. As we will present in the following paragraphs, the second alternative is preferred to reduce the total number of conflicts. For the first alternative, suppose there are two AGVs belonging to P +, one of them is placed at position (p, q1 ) and the other at (p, q2 ), where q1 > q2 . Both AGVs decide to do an arbitrary job simultaneously. Each of them selects an arbitrary shortest path to its destination. The classic probability of conflict between the two AGVs, P1 , can be calculated by the following formula3 :

P i,j

P1 =

γ (i, j) (A.1)

α(n − x2 , n − y2 )α(n − x1 , n − y1 ) 0 ≤ i ≤ n − x2 , 0 ≤ j ≤ n − y 1 . In relation (16), (x1 , y1 ) and (x2 , y2 ) are Cartesian coordinates of (p1 , q1 ) and (p2 , q2 ), respectively. Also, α and γ are defined as the following relations:

α(m, n) =

m+n+2 m+1

−1=

m+n+2 n+1

−1

(A.2)

γ (i, j) = β(i, j)α 2 (n − x2 − i)α(n − y1 − j). (A.3) In relation (A.2), β is defined as the following recurrent relation: σ +i+j σ +i+j i

j

2 j i X X i − k1 + j − k2 = β(k1 , k2 ) i − k1

(A.4)

k1 =0 k2 =0

β(0, 0) = 1

where σ = 1 2 2 . Now, we discuss the second alternative, where each AGV receives an arbitrary job but chooses the shortest path with at most one break point. In this context, we refer to a single change in direction of an AGV as break point. In this scenario the probability of conflict is equal to: q −q

P P2 =

i,j

γ 0 (i, j)

α 0 (n − x2 , n − y2 )α 0 (n − x1 , n − y1 ) 0 ≤ i ≤ n − x2 , 0 ≤ j ≤ n − y1

(A.5)

path from source to destination,

• Effect of priority policies to the scheduling result, and • No limitation on the number of participating AGVs in theory.

3 Proof of the above relation exists and we have not presented it here to limit the number of pages of the current paper.

746

H. Ghasemzadeh et al. / Robotics and Autonomous Systems 57 (2009) 738–748

Fig. A.3. Relationship among σ , ϕ and P2 for the 2nd scenario with at most one break point for large scales. Fig. A.1. Relationship among σ , ϕ, P1 for the 1st scenario.

Fig. A.2. Relationship among σ , ϕ and P2 for the 2nd scenario with at most one break point.

(Proof of the above formulas is presented in Appendix B.) where:

α 0 (m, n) = 2mn + n + m + 1

(A.6)

and γ 0 is defined by the following relations:

(2n − x2 − y1 + 1)2 i = 0, j = 0 ( 2n − x2 − y1 − i + 1)(n − y1 + 1) i > 0, j = 0 0 γ (i, j) = (2n − x2 − y1 − j + 1)(n − x2 + 1) i = 0, j > 0 (n − x2 − i + 1)(n − y1 − j + 1) i > 0, j > 0.

Fig. B.1. n + 1 vertical roads intercept m + 1 horizontal roads.

Suppose n + 1 vertical roads intercept m + 1 horizontal roads, as shown in Fig. B.1. The system in left-bottom most node is labeled as (0, 0) and top-right most interceptions are labeled as (n, m). There are

i+j i

, 0 ≤ i ≤ n, 0 ≤ j ≤ m distinct shortest paths to node

(i, j). In the following sentences, when a path is used, it means that (A.7)

σ −p

Consider ϕ = n + 2 . The greater value for ϕ , which shows a greater degree of freeness for the movement of the two AGVs. q +q To model the system simply, suppose n = 1 2 2 , so relationship among σ , ϕ, P1 and P2 in the above scenarios can be shown as in Figs. A.1–A.3. In the diagram of Fig. A.1, by considering a constant value for σ and by increasing ϕ , conflicts are decreased after a pick. However, in Fig. A.2, conflicts increase continuously. By comparing these diagrams it can be concluded that the second approach will reduce conflicts in the system significantly. Fig. A.3 demonstrates the claim for larger intervals. Appendix B. Proof of formulas In this appendix we will prove formulas (A.1) through (A.5) of Appendix A.

it is a shortest one. By summing all distinct paths to every node (i, j), the number of shortest paths originated from node (i, j) will be as follows:

X i + j i,j

i

=

n X m X i+j i =0 j =0

i

.

(B.1)

By induction over variable m we have:

X i + j i,j

i

=

X n n X i+m+1 i+m+1 = . i+1 m i =0

(B.2)

i=0

By a similar induction over variable n we have:

(n + 1) + (m + 1) −1 i m+1 i,j (n + 1) + (m + 1) = −1 n+1 (n + 1) + (m + 1) α(n, m) = − 1, n, m ≥ 0. n+1 X i + j

=

It is obvious that α(n, m) = α(m, n).

(B.3)

(B.4)

H. Ghasemzadeh et al. / Robotics and Autonomous Systems 57 (2009) 738–748

747

Fig. B.2. A (r + 1) × (n + 1) mesh system with two vehicles.

Notice: The above equation enumerates the path (0, 0) to (0, 0) as a shortest path. Suppose a (r + 1) × (n + 1) mesh system that two vehicles are located in (0, m) and (m, 0), as shown in Fig. B.2. The vehicles will begin to reach their destinations simultaneously. First, the number of situations in those two vehicles that are conflicting is enumerated. Consider γ (i, j) as the number of situations in which two vehicles conflict first at node D(i, j). Hence the probability of the two vehicles conflicting is obtained by:

P p=

i ,j

γ (i, j)

α(r − m, n)α(r , n − m)

.

(B.5)

=

j i X X

β(i0 , j0 )

i0 =0 j0 =0

(i − i0 ) + (j − j0 ) . i − i0

(B.7)

The left part of the above equation is the total situations in which the vehicles reach D(r − m, n − m). The right part of the above equation is based on the idea of ‘‘all situations in which the vehicles reach to D(i, j), reach D(i0 , j0 ), i0 ≤ i, j0 ≤ j without any conflict’’. Since there is one path for each vehicle to reach D(0, 0), it is obvious that β(0, 0) = 1. To evaluate β(i, j) it is necessary to determine boundary conditions i.e., β(0, j) and β(i, 0). By substituting j in the Eq. (A.7) by zero we have:

m+i i

=

i X

i − i0 β(i , 0) i − i0

0

=

i X

β(i0 , 0).

(B.8)

Consider β(i, j) as the number of situations in which two vehicles can reach node D(i, j), such that no conflict occurs before reaching node D(i, j). Hence γ (i, j) is equal to:

By using the above equation and induction over variable k the following can be proved:

γ (i, j) = β(i, j)α 2 (r − (m + i), n − (m + j))

β(k, 0) =

β(i, j) satisfies the following recurrent relation: m+i+j m+i+j i

j

(B.6)

i 0 =0

i 0 =0

m+k−1 . k

(B.9)

Also, by using a similar approach, it is possible to prove that β(k, 0) = β(0, k). Hence by using β(k, 0) and β(0, k) and recurrent relation of β, β(i, j), can be evaluated for every pair (i, j).

748

H. Ghasemzadeh et al. / Robotics and Autonomous Systems 57 (2009) 738–748

It is easy to calculate the conflict probability by using a same approach if every shortest path has not more than one break point. Therefore, it is left to the readers. Appendix C. Theorems for buffer overflow In this appendix we present three theorems for buffer overflow and their proofs. Theorem C.1. Considerations of the section x are sufficient to prevent the buffer overflow. Proof. In the worst case there are k AGVs in the buffer when other AGVs arrive. Since there are k empty places in the buffer and no more than k AGVs select the buffer as their destination, new AGVs can be stored without any overflow. Because no more than k AGVs select a buffer as their destination and all AGVs leave their departures, there are no buffers stored in more than k AGVs after the current shot is completed. Theorem C.2. There is a routing schema that selects temporary destination for every overflowing AGV. Proof. Suppose there are n AGVs in the system, the capacity of buffers is 2k and the number of buffers is equal to b. Also, suppose there are at most k AGVs in buffers. Suppose there is in total m AGVs in the system in an overflow state. If we remove these m AGVs from the system, without selecting a temporary destination it is possible to route the remainder of AGVs to destination if there are finally at most k AGVs in the buffer. If the number of AGVs in the system satisfies the relation kb − m < n − m, there are still m empty places in the system which can be used as a temporary destination. Considering the ceiling value for k for every buffer, we can allocate their remained capacity such that each of the m overflowing AGVs will be routed to these temporary destinations. Theorem C.3. If in a planning an AGV is routed to a temporary destination, at most in next b n−k 1 c plans it will reach its destination, where n denotes the number of AGVs in the system. Proof. If in a planning the AGV a is routed to a temporary destination, those AGVs which are routed to a’s destination, in the overflow situation could not give a chance of reaching to a’s destination from a, so long as a has not reached its destination. This occurs because their counters will be set to zero, while the counter of a will be increased by one. This inequality will be preserved as long as the AGV has not reached its destination. If there are n AGVs in the system and all of which are in an overflow situation are competing with a, in the worst case a will be defeated by n − 1 AGVs. Hence, these defeats can continue to next b n−k 1 c steps. Finally, after defeating by all AGVs, a will have a chance of reaching its destination. Reasoning: If we present the diagram of orthogonal routers separately, a question that may arise is that whether the intelligence of the method, which is the basis of the method, is effective or not? This may not be proved using the formulas 16–19 of the main text.

Also the scheduling method together with routing is a total solution and it is required to propose at least one compatible routing algorithm. Because in our study the orthogonal algorithm was considerable and yields an acceptable efficiency, it has been introduced in this paper. References [1] Ling Qiu, Wen-Jing Hsu, Algorithms for routing AGVs on a mesh topology, in: Proc. of the 2000 European Conference on Parallel Computing, Europar’2000, in: Lecture Notes in Computer Science, vol. 1900, Springer-Verlag, Munich, Germany, Aug. 29–Sep. 1 2000, pp. 595–599. [2] J.J.M. Evers, S.A.J. Koppers, Automated guided vehicle traffic control at a container terminal, Transportation Research, Part A 30 (1) (1996) 21–34. [3] Rong Ye, Wen-Jing Hsu, Voon-Yee Vee, Distributed routing and simulation of automated guided vehicles, in: Proc. of TENCON 2000, vol. 2, Kuala Lumpur, Malaysia, Sept. 24–27, 2000, pp. 315–320. [4] Xee Yu, Shell-Ying Huang, A centralized routing algorithm for AGVS in container ports, in: Proc. of the 4th International Conference on Computer Integrated Manufacturing, Singapore, 1997, pp. 589–600. [5] Ling Qiu, Wen-Jing Hsu, Shell-Ying Huang, Han Wang, Scheduling and routing algorithms for AGVs: A Survey, International Journal of Production Research 40 (3) (2002) 745–760. [6] Zeng Jianyang, Wen-Ling Hsu, Conflict-free of routing of AGVs on the mesh topology based on a discrete time model, in: Proc. of the 2003 IEEE International Conference on Robotics and Automation, Taipei, Taiwan, Sept. 14–19, 2003, pp. 3510–3516. [7] Ling Qiu, Wen-Jing Hsu, Routing AGVs on a mesh-like path topology, in: Proc. of the IEEE Intelligent Vehicles Symposium, IVS’2000, Michigan, USA, 2000, pp. 392–397. [8] Ling Qiu, Wen-Jing Hsu, An algorithm for concurrent routing of AGVs in a mesh, in: Proc. of the 7th Australasian Conference on Parallel and Real-Time Systems, PART 2000, Sydney, Australia, Nov. 29–30, 2000, pp. 202–214.

Hamed Ghasemzadeh is a B.Sc. student in Computer Engineering since 2005 at Iran University of Science and Technology. His research interests include modeling and simulation, heuristic methods, mathematics and its applications in computational analysis, DNA-computing, graph theory and combinatorics and theory of wavelets. He has published several papers in international conferences about robot motions and question answering.

Ehsan Behrangi received his B.Sc. degree in Computer Engineering from Sharif University of Technology, 2005. He received his M.Sc. in Software Engineering from Iran University of Science and Technology, 2007. His research interests include embedded compilers, simulation, modeling and search engines.

Mohammad Abdollahi Azgomi received the B.Sc., M.Sc. and Ph.D. degrees in Computer Engineering (Software) (1991, 1996 and 2005, respectively) from Sharif University of Technology, Tehran, Iran. His research interests include performance and dependability modelling with high-level modelling formalisms such as stochastic Petri nets, tools for modelling and evaluation, verification and validation, objectoriented modelling and network security. He has published several papers in international journals and conferences. Dr. Abdollahi Azgomi is currently an assistant professor of software engineering at the Department of Computer Engineering, Iran University of Science and Technology, Tehran, Iran.

Copyright © 2020 COEK.INFO. All rights reserved.