Towards algorithms for scheduling of transport processes

Size: px
Start display at page:

Download "Towards algorithms for scheduling of transport processes"

Transcription

1 Towards algorithms for scheduling of transport processes TRAIL Research School, Delft, November 1999 Author Drs. M.M. de Weerdt Faculty of Information Technology and Systems - Delft University of Technology Thesis supervisors Prof.dr.ir. H.J. Sips Faculty of Information Technology and Systems - Delft University of Technology Prof.dr.ir. R.E.C.M. van der Heijden Faculty of Systems Engineering, Policy Analysis and Management - Delft University of Technology

2 Contents 1 INTRODUCTION Real world motivation Existing approaches Our approach PROBLEM DESCRIPTION Mathematical description Example HARDNESS OF THE PROBLEM 7 4 ALGORITHMIC APPROACHES Generic solvers Approximations Distributed algorithms CONCLUSIONS 11 REFERENCES 12

3 Abstract This is the start of a research project in which we look at the following transport problem: how to move packages from their sources to their destinations using the resources of the concerned organizations. We look at this problem from a computational perspective. First we give a problem description, a motivation and the approach we take in this project. The questions we consider in this paper are the following: How hard is this problem and do algorithms exist to (centrally) compute an optimal solution within reasonable time? We see that this problem is difficult to compute for realistic instances. Therefore we discuss some approaches to deal with such hard problems.

4 1 Introduction Many organizations realize the importance of the control of multi-modal freight transport. This control is a coordination process aiming to reach a solution to the transport problem: to move packages from their sources to their destinations using the resources of the participating organizations. Each of the involved parties tries to maximize its own profit. Therefore it is unlikely that the most efficient solution for all is found. The achievement of such a solution that is optimal to the system as a whole would only be possible if all the decisions are made at one central site where all data and huge amounts of computing power are available. Such a central method may be very hard to accomplish, because firstly organizations do not wish to make all their information accessible and secondly the problem of planning the action of all participants is too hard to be solved by one central computer system. It is, however, still interesting to investigate such methods that solve the problem locally: first of all distributed methods often will be derived from local methods and secondly local approaches can be used as a reference to measure the quality of distributed methods and their solutions. The development of adequate methods to support such a coordination process is one of the topics of the CABS project 1. To develop a control system for multi-modal freight transport we start to look at the transportation problem both as an optimization problem and as a planning problem. How to execute a set of orders like pick up a package at a certain place and deliver it to its destination before the deadline, while having complete, but maybe distributed, knowledge of the transportation network (costs, time needed, capacities) and minimizing the costs? How can an efficient supply chain be formed? It is very well possible we end up with a distributed system because of the distribution of data and control, or even a multi-agent system because of the autonomy and heterogeneity of the participants. According to Walsh and Wellman [WW99], supply chain formation is an important problem in the commercial world, and can be improved by greater automated support. The problem is salient to the multiagent system community and deserves continued research. Similar remarks are made in [DFKI]. In this paper we analyze the complexity of a part of the problem and study one general planning tool. 1.1 Real world motivation To motivate our research project, let us take a real world case about the transport of freight. To transport a package from for example Enschede, in the Netherlands, to New Paltz, near New York, several organizations are involved 1 The CABS project [CABS] is a project of the Delft University of Technology in cooperation with University of Utrecht, TNO-TPD and Siemens NL. This research is also part of the FTAM-DIOC [FTAM] and the SMM-DIOC [SMM]. TRAIL Research School, september

5 that have to coordinate their actions. We would like to design an information infrastructure to support the coordination of these actions. Eventually this may result in a prototypical software application. We assume each organization has some computer facilities and the possibility to connect this computer system to a computer network. So each computer can be contacted by each of the others. The application should be installed on a computer of each organization and the resources (fixed schedules, flexible transport means), costs and preferences of the organization should be entered into the application. This private information stays inside the local computer system and therefore inside the organization. Only information that is really necessary to coordinate the transport is exchanged with others. When a customer calls in by phone and requests the transport of a certain package from Enschede to New Paltz, this order is entered into the application by a secretary. The software processes this information: it plans an efficient way to transport the packages and calculates the costs. Of course it is up to the policy of the organization to decide what to bill the customer. Right now we do not know how the application magically constructs a feasible plan. That is the topic of our research of the coming years. We might think for example of the following: First the application tries to schedule the transport using only the resources of the organization itself. If this fails, or if this leeds to a very inefficient solution, the application may contact others and request them to handle part, or maybe even all, of the job. Another facility of the application may be that when an order is canceled or a transport delayed, the involved parties may be informed automatically. If replanning is necessary, the application may warn the user (read secretary) and propose a set of adaptations. Since replanning sometimes might be very costly, we will require some robustness in the schedules generated by the applications. If there is some slack, some disturbances will not immediately cause large changes in the schedules. Such a coordinating planning system improves the planning and coordination of a transport organization that has a ordinary scheduling system on a couple of points. First of all, it handles also replanning and rescheduling. Second, it deals quickly with negotiating with other organizations about their free slots and prices, saving time. Finally, cooperation is easier and therefore more efficient solutions may be found by cooperating more often. We will try to extract a more general structure from the coordinating planning system. Therefore we might get similar results in other domains that also require coordination and planning of heterogenous parties, like multi-modal person transport or army campaign planning. 1.2 Existing approaches First we describe some of the research done related to the problem of coordinating and planning transport processes. Thereafter we describe some general approaches to similar problems. 2 Dynamic scheduling of transport processes

6 Goldsmith, Philips and Spires [GPS98] applied multi-agent technology for coordinating international shipping. Their goal is to develop a secure electronic commerce system that supports the transport of goods across the US-Mexican border. The system should ensure all documents are available to the customs once the truck containing the goods arrives. They propose a way to model the involved parties and they designed protocols for coordination and developed a prototype (the Border Trade Facilitation Service), but scheduling is not very important in this context. In Germany, at the Research Center for Artificial Intelligence [DFKI], a system for transportation scheduling, again using multi-agent technology is designed to support a forwarding company. In this case the focus is on scheduling the resources dynamically, taking uncertainty in account. The socalled MARS (Modeling a Multi-Agent Scenario for Shipping Companies) system schedules orders for trucks of several parties. Multi-modality is not taken in account. None of the resources has a prefixed schedule and there is no representation of transshipment. But the prototype is being used right now. In Rotterdam, The Netherlands, Hoogeweegen [Hoo97] and Wolters are researching the application of new techniques such as EDI (Electronic Data Interchange) to support the management of a supply chain. So, already much progress has been made 2, although much work stil has to be done. To create plans we may use general planning tools [LPSat], [Smodels], [Blackbox]. They are not specificly suited for transport planning, but since they are general, also transportation problems may be tackled. These planning tools are sometimes very sophisticated and even can take care of time or capacity constraints. But none of them seems to be able to take care of both. In section 4 we will look at one of these tools. Finally we may look at combinatorial optimization. For example the multidepot dynamic vehicle routing [Su99] [FT99] problem is very much alike. In this problem a few depots is assumed and a lot of destinations for packages. Multiple vehicles are routed such that the packages reach their destinations. Such an approach is less general and does not give any suggestions how to deal with multiple organizations. Still, algorithms solving this problem, may need only small adjustments to be effective in our case. 1.3 Our approach We take the following approach to deal with the problem of coordinating and planning transport processes. We start by giving a general description such that all problems concerning coordination and planning fit within this description. Then we study the ideal situation: assume all data are available at one place and assume we have sufficient computation power. How hard is this central 2 In addition to these positive results, we are also cautioned that full automatization may not always be succesful. Automatization of interorganizational coordination on a strategic (negotation) level in container transport is expected to be far less effective than automatization on the operational level [Hen99]. TRAIL Research School, september

7 coordination and planning problem? Do algorithms exist to centrally compute an optimal solution within reasonable time? If not, do algorithms exist which calculate an approximation within a guaranteed bound from the optimal solution? Is it worthwhile and possible to try to create such an ideal situation? After considering these questions we will look at distributed versions: since data and control are distributed over the different organizations, is it possible to reach a good solution by distributed computing and communicating or negotiating the partial solutions? What are good protocols to coordinate this computation? This approach is taken, first of all because if a centralized algorithm is possible, this may lead to better results and may be easier to accomplish from an algorithmic point of view. Distributed algorithms tend to be far more difficult to understand. The second reason is that studying centralized algorithms is very useful, because we may use the same techniques to design a distributed system. In this paper we look at the first few questions. First a problem description is given. From this a mathematical description will be extracted. This latter description is used to abstract from the details and domain dependent issues. Then comparing it to well-known problems proves the hardness of the problem. In section 4 existing algorithms and their properties are described and we give computation-speed results of one of them. In the last section we conclude and describe the next steps to take in this research project. 4 Dynamic scheduling of transport processes

8 2 Problem description We consider the following situation. In practice several transportation companies cooperate to execute orders. Together they offer an extensive service, including transport by road, rail, air, barge, and sea. After a planning and negotiation phase orders or requests from customers have to be executed by some of these organizations. We consider a small simplification of the real problem. First we assume every transport service has a capacity and a needed time associated for each connection, so we also model the existence of predefined schedules in this way. Second we neglect the possibility to transport packages with a total volume larger than the capacity of a route by scheduling them after each other. Suppose we have a set of locations like the airfields, harbors, transshipment, pickup, and deliver points and a set of connections between these locations like legs, ferry lines, and trucks travelling along roads and highways. Suppose furthermore a capacity, time needed, and costs are associated with these connections. The capacity is a function that determines the maximum volume of packages that can travel along this connection in one time unit. Time needed is the time needed for a package to be transported through this connection and costs gives the costs to transport one volume through this connection. Given a set of orders consisting of a pickup and deliver time and place, what is the most cost-efficient path for the package within the capacity and time constraints. 2.1 Mathematical description In the mathematical description we call the transportation network a graph G, the set of locations V (vertices) and the set of connections A (arcs) as is done by convention. Furthermore we use the functions cap, time, cost to represent the capacity, time needed, and costs respectively. Suppose the following are given: a directed labeled graph G = ( V, A) with the labels cap, time, and cost : A R for each arc, and a set of packages P, a set of orders O, an order being a five-tuple o = ( p, v, t1, w, t2) of package, pick-up vertex, pick-up time, deliver vertex, and deliver time, and a function vol : P R to define the volume of each package. The problem is to determine a planning * plan : P A for each package, plan ( p) being a simple path in the graph from v to w, under the constraints (I) that the package is delivered in time, so time( a) t t, and (II) that the capacities are not exceeded, so a P 2 1 a A: vol( p) < cap( a), and such that the total costs (being cost( a) ) are p { p' a plan( p') } a P minimized. We call this problem the Unsplittable Flow Problem with Costs (UFPC). TRAIL Research School, september

9 2.2 Example v1 v2 v3 a1 a2 a 3 a 4 a 5 a 6 v4 v5 v6 a7 a8 a9 a10 v 7 Figure 1: a transport network In figure 1 a small network has been given. The labels can be found in the following table. Three orders are given, p, v,0,,4), p, v,0,,4) and ( 3 3 v4 ( v5 ( 2 2 v7 p, v,0,,4). Also vol ( p 1 ) = 1, vol ( p 2 ) = 1 and vol ( p 3 ) = 1 are given. A solution may be as follows: plan p ) = { a, }, plan p ) = { a, } and ( a4 ( 2 5 a10 plan ( p3) = { a6, a8, a10}, because indeed the two constraints are satisfied (see section 2.1). Arc Costs Capacity a1 a2 a3 a4 a5 a6 a7 a8 a9 a 10 6 Dynamic scheduling of transport processes

10 3 Hardness of the problem Problems that can be solved using a polynomial amount of time are considered to be efficiently solvable and constitute the class P. The class NP constitutes the class of problems for which a solution can be verified efficiently (i.e. in polynomial time). The class NP is believed to be unequal to P. NP problems are the decision variants ( a solution does or does not exist ) of problems from a class called NP- Complete (NPC). We will prove that UFPC belongs to the hardest problems in NPC and therefore, most likely, will not be efficiently solvable. To show this we prove that a known problem from this class can be reduced to the UFPC [GJ79]. Consider the decision problem of the disjoint connecting paths problem: Given a graph G = ( V, A) and a collection of disjoint vertex pairs {( v 1, w1 ), ( v2, w2 ),,( v k, w k )}, does G contain k mutually vertex-disjoint paths, for each i, a path connecting v i and w i? This problem has been proven to be NPcomplete [GJ79] and can be reduced to the UFPC as we will show. Apparently, these problems have a large similarity: both consist of looking for a set of paths. The main difference is in the constraints. The disjoint connecting paths problem (DCPP) requires at most one path per vertex and the UFPC requires at most capacity paths per arc. v 1 a 2 v 2 v a 3 1 a3 v 4 a 4 v 5 Figure 2: a graph of the DCPP This DCPP (disjoint connecting paths problem) can be seen as an instance of the UFPC by transforming the graph and setting the packet volumes to 1. Suppose we have a graph like Figure 2 (i.e. a DCPP instance). If we succeed in transforming every such DCPP-instance into an UFPC instance in an TRAIL Research School, september

11 efficient way such that the former allows a solution if and only if the latter has one, we could use an algorithm for the UFPC to decide whether the DCPP has one. The graph that satisfies this requirement is shown in Figure 3 3. If such an efficient transformation (reduction) from DCPP to UFPC is possible we conclude that the UFPC is at least as difficult as the DCPP. Therefore, since the DCPP has been proven to be a most difficult NP problem and UFPC clearly belongs to NP, we conclude UFPC to be NPC. v 1 a 2 v 3 ' v 2 v 4 a 1 a 5 a 3 v 3 ' ' a 4 v 5 Figure 3: a graph of the UFPC The labels of this figure 3 should be defined as follows. An elaborate proof of the NP-completeness of UFPC can be found in an internal report [Wee99]. Arc Costs Capacity a1 a2 a3 a4 a The reduction shown in the example shows the most difficult transformation. This can easily be generalized to transform larger graphs. 8 Dynamic scheduling of transport processes

12 4 Algorithmic approaches There are several ways to approach the coordination and planning problem. First we look at a general solver and model our problem in the language used by this solver. We show some results that support the conclusion of the last section: this problem is very hard. Thereafter we mention some other possible approaches. 4.1 Generic solvers To optimally solve problems like this, we can use a generic problem solver by giving the problem description to this solver. Unfortunately, due to the hardness of this problem, it will probably take a long time to find solutions for moderate and large instances. Still it is useful to take a look at these kinds of solvers. For example they can be used for speed and quality comparisons. We looked at a solver called Smodels [Smodels, Nie99]. This is a tool that expects a set of rules as input. These rules specify the constraints of the solution and are of the kind if a1 is part of a path, then precisely one of a2, a4 and a5 should be or a1 is the last arc of the path. We developed a program to generate such a set of rules from a graph (see [Wee99]) and we tested this solver with several small networks and order sets. For example first entry in the following table represents the time it took to calculate three plans for three orders, like in the example described in Section 2.2, but with 7 vertices and 28 arcs. The results of these experiments were rather disappointing as can be seen in the following table. Packages Vertices Arcs Time (seconds) * * * Small instances with a few orders and capacities of the arcs equal to 1 are solved very quickly, but unfortunately, even for small instances with somewhat more orders and arc capacity 2 (the ones marked with a *), the solver takes a long time to produce the optimal solution. In the future we will also try other advanced generic solvers like the Blackbox system of Kautz and Selman [KS99], [LPSAT], and some other general SAT solvers [SAT]. TRAIL Research School, september

13 4.2 Approximations Since finding the optimum does take too long for this problem, we take a look at so-called approximation algorithms. These algorithms usually find a solution within reasonable time, not necessarily an optimal solution. For example an approximation algorithm for UFPC will give a plan by which all package are delivered in time, but it won t give the solution with the fewest costs. Several approximation algorithms exist for problems similar to the UFPC [BS97], such as the multiple depot vehicle routing problem [Su99] [FT99]. We will develop variants of those to solve our problem. Often approximation algorithms can be found that are able to find a reasonable solution within polynomial time (i.e. the time needed is a polynomial function of the size of the input). The main difference between the approximation algorithms usually lies in the quality of the solution they can guarantee. The most useful ones are those that can guarantee the solution to lie within a certain ratio from the optimum. 4.3 Distributed algorithms Another way to speed up the computation time of this problem is to use multiple processors. The theory of distributed algorithms shows how to design these algorithms. In general, the time using p processors is somewhat more than the time needed for one processor divided by p. The disadvantages of distributed algorithms are the communication overhead, the fact that they are far much harder to design and to understand, that more processors and thus more money is needed and that many algorithms are not scalable (i.e. at some point adding more processors does not have any use). The time complexity of an algorithm for a NP-complete problem is not reduced by using a distributed version: solving an instance of the problem will still take exponential time with respect to the size of the input. However, especially in combination with approximation algorithms, the potential time reduction (approximately linear in the amount of processors, p) may in some cases just make the difference. 10 Dynamic scheduling of transport processes

14 5 Conclusions We have seen that the computation of a solution to a realistic-sized unsplittable flow problem with costs takes very long. A distributed algorithm is more favorable than a central algorithm because the information, the responsibilities and the capabilities are distributed and organizations in general do not like to give their information to another. The potential advantage of a central algorithm, i.e. being able to calculate the optimal solution in a simple and efficient way, does not apply because of the hardness of the problem. Additionally some more processing power can be used with a distributed algorithm. An approximation variant of such a distributed algorithm (if we are able to design such an algorithm) seems very useful for this problem, because approximation algorithms in general are rather fast. Fortunately, the main disadvantage of approximation algorithms (i.e. they don t give an optimal solution) doesn t apply in this setting: finding local optimal solutions usually doesn t lead to the optimal global solution and therefore it isn t really necessary to find a local optimum. Our knowledge of central and optimal solution methods can be used as a measure of the speed and quality of distributed algorithms. For example the speed of a distributed approximation algorithm can be compared to a central approximation algorithm and the quality to a solution gained by a central optimal algorithm. Right now we are only in the beginning of this research. First far more attention should be paid to approximation algorithms. Both the optimal algorithms and the approximation should be able to cope with the dynamic nature of the problem we neglected thus far. But the main topic to study is how to design a distributed version of the available central algorithms. TRAIL Research School, september

15 References [Blackbox] [BS97] [CABS] [DFKI] H. Kautz and B. Selman. BLACKBOX: A New Approach to the Application of Theorem Proving to Problem Solving. In Working notes of the Workshop on Planning as Combinatorial Search, held in conjunction with AIPS-98, Pittsburgh, PA, A. Baveja, A. Srinivasan. Approximation Algorithms for Disjoint Paths and Related Routing and Packing Problems. In Proc. IEEE Symposium on Foundations of Computer Science, pages , C. Witteveen, The CABS project. K. Fischer, J.P. Müller and M. Pischel. Cooperative Transportation Scheduling: an Application Domain for DAI. In Journal of Applied Artificial Intelligence. Special issue on Intelligent Agents, 10(1), [FTAM] Freight Transport Automation and Multimodality (FTAM), Jaarverslag Delft Interdisciplinary Centre for Person and Goods Mobility Research (TRAIL onderzoeksschool), [FT99] [GJ79] [GPS98] [Hen99] [Hoo97] [KS99] [LPSat] [Nie98] L. Fu and S. Teply. On-Line and Off-Line Routing and Scheduling of Dial-a-Ride Paratransit Vehicles. In Computer-Aided Civil and Infrastructure Engineering 14, pages , M.R. Garey, D. S. Johnson. Computers and intractablity. W.H. Freeman and company, S.Y. Goldsmith, L.R. Phillips and S.V. Spires. A Multi-Agent System for Coordinating International Shipping. In AMET '98, M. den Hengst-Bruggeling. Interorganizational Coordination in Container Transport a chain management design. PhD Thesis, Delft University of Technology, M.R. Hoogeweegen, Modular network design; assessing the impact of EDI. PhD Thesis, Rotterdam School of Management, H. Kautz and B. Selman. Unifying SAT-based and Graph-based Planning. In Proc. IJCAI-99, Stockholm, S.A. Wolfman and D.S. Weld. The LPSAT Engine and its Applications to Resource Planning. In Proc. IJCAI-99, I. Niemelä, Logic Programs with Stable Model Semantics as a Constraint Programming Paradigm. In Proc. Workshop on Computational Aspects of Nonmonotonic Reasoning, Trento, Italy, May 30-June 1, [SAT] R.S. Amant, AI Planning resources, [SMM] Naadloze ketenmobiliteit, Onderzoeksprogramma Seamless Multimodal Mobility. TRAIL research school, Delft University of Technology, [Smodels] I. Niemelä, P. Simons. Computing the stable model semantics Dynamic scheduling of transport processes

16 [Su99] [Wee99] [WW99] Chwen-Tzeng Su. Dynamic vehicle control and scheduling of a multi-depot physical distribution system. In Integrated manufacturing systems 10, M.M. de Weerdt. Transport scheduling, internal report TU Delft, W.E. Walsh and M.P. Wellman. Modeling Supply Chain Formation in Multiagent Systems. In IJCAI-99 Workshop on Agent Mediated Electronic Commerce, TRAIL Research School, september