An employee transporting problem

An employee transporting problem is described and a set partitioning model is developed. An investigation of the model leads to a knapsack problem as a surrogate problem. Finding a partition corresponding to the knapsack problem provides a solution to the problem. An exact algorithm is proposed to obtain a partition (subset-vehicle combination) corresponding to the knapsack solution. It requires testing and matching too many alternatives to obtain a partition. The sweep algorithm is implemented in obtaining a partition (subset-vehicle combination) in an efficient manner. Illustrations are provided to show how the algorithms obtain solutions.


Background
A number of employees will be picked up from various places (bus-stops) within a city and brought to the plant. At the end of the work day, they will be returned back to where they were picked up. A similar situation holds for school students. The students are picked up from their homes and returned back to their homes after school. Transporting the passengers needs to be accomplished within a given time period. It is obvious that work at a plant starts at a specified time (8:30 in the morning for instance), and the first class starting time at some schools is 8:40 in the morning. The workers or the students must reach the plant or the school on time. We call this problem an employee transporting problem.
A set of different types of vehicles is used during the transportation of those passengers. Vehicles may differ in capacity, operating cost, and speed. Cruising within a city has speed limits, and transporting passengers within a city requires strict obedience to these speed limits. Subsequently, all the vehicles are assumed to have the same speed while traveling in the city streets.
Even though the vehicles may have different operating costs, they are chartered according to their capacities and paid accordingly. Every vehicle will be assigned to a subset of bus stops according to its capacity and the distance (time) required for traveling to this subset. Clearly, the number of passengers picked up or delivered cannot exceed the capacity of the vehicle. Further, the distance Correspondence: umit.yuceer@toros.edu.tr Department of Industrial Engineering, Toros University, Mersin 33140, Turkey (time) required to travel through this subset of destinations (bus stops) via a route must remain less than a predetermined distance (time) amount. Any route is acceptable as long as the traveling distance (time) does not exceed the predetermined time, and thus, it is not necessarily the traveling salesman (TSP) route.
The vehicle routing problem (VRP) or vehicle scheduling problems concern with the distribution of goods between the center (depot) and the customers (destinations-final users). The objective is to determine an optimal set of routes by a fleet of identical vehicles to serve these customers. The total demand of the customers on a route cannot exceed the vehicle capacity. This type of problem is called capacitated vehicle routing problem (CVRP). The fleet of the vehicles may differ in size, capacity, and the operating costs. This gives rise to heterogeneous vehicle routing problem (HVRP) or fleet mix problem in the literature. All these problems are the extensions and/or generalizations of the vehicle routing problems. Toth and Vigo (2002) provide an extensive discussion on VRP and solution methods with some applications. There are also numerous excellent articles on those problems and solution methods in the literature. A general approach to modeling this class of problems is based on the integer formulation of Miller et al. (1960). Various researchers have modified and/or extended their formulation to handle different situations.
The latest developments and the challenges in terms of modeling and the solution techniques for VRP and its variants are presented in Bruce et al. (2008). Yaman (2006) presents different formulations for HVRP and one formulation with flow variables and also develops strong bounds. Baldacci et al. (2011a) developed an exact method for solving VRP after modeling it based on a partitioning problem. Again in another attempt, Baldacci et al. (2011b) describe an effective exact method for solving CVRP based on the set partitioning formulation.
One possible approach for dealing with the existence of binary and integer variables in those models is to rely on the heuristic solution methods for CVRP and HVRP. Desrochers and Verhoog (1991) propose a new savings heuristic based on successive route fusion. Gheysens et al. (1986) developed another heuristic based on a lower-bound procedure. Numerous others have developed various heuristic methods to solve the problem of determining fleet size and the mix vehicle routing problems in the literature. There have also been attempts to apply metaheuristic methods too. Önder (2007) attempts using metaheuristics to solve HRVP without an investigation of the structure of the model but fails unfortunately. Evidently, the application of heuristics and even the metaheuristics requires a thorough investigation of the structure of the problem and the model.
The sweep algorithm described in Toth and Vigo (2002) is a heuristic for a possible solution method for VRP and some other problems. Nurchanyo et al. (2002) investigates the capability of the sweep algorithm in solving the VRP for public transport. After trying various approaches, they conclude that it is capable of solving VRP for public transport under certain conditions. Renaud and Boctor (2002) apply the sweep algorithm for the fleet size and the mix vehicle routing problem. Two kinds of decisions are considered: selecting a mix of vehicles and the routing of the selected fleet. Their algorithm generates a large number of routes to be serviced by one or two vehicles. Then the selection of the vehicles is accomplished by solving a set partitioning problem with a special structure.
The employee transporting problem is a variant of mix vehicle problem without routing. This article takes a different view from the literature and presents a set partitioning model for the employee transporting problem. The thrust of this article lies in the thorough investigation of the structure of the model. Subsequently, a surrogate problem is developed from this model which turns out to be a knapsack problem. The assignments of the vehicles are accomplished by matching subsets. For large-size problems, the sweep algorithm is proposed to obtain the assignments of the vehicles and consequently a partition in an efficient manner. The next section presents a set partitioning model, then the section 'A surrogate constraint' develops the surrogate problem. The solution methods are described in the section 'A solution method, ' and some illustrations are presented in the section 'An illustration'. Finally, conclusions and findings of this article are summarized in the 'Conclusions' section.

A set partitioning model for employee transporting problem
Let A be the set of n destinations (bus stops) in an area, for instance, vicinity of a city. Each destination has a demand: the number of employees to be picked up and/or delivered. Let s(a) denote the number of employees at destination a ∈ A. Naturally, s(a) ≥ 1 and an integer. Let V be the set of the vehicles available with different capacities. Then A v ⊂ A represents a number of destinations to be serviced by the vehicle v of capacity Q v . If m vehicles are required for servicing those n destinations, then each vehicle v will serve a subset A v , and none of the subsets have any intersection. More specifically, a partition of the set A is obtained in the assignment of m vehicles. Let be the class of all partitions of the set A. A partition The cost per trip of assigning a vehicle v ∈ V with capacity Q v to a subset A j ∈ P ⊂ is c v . This cost depends on the capacity of the vehicle only, and it is independent of the subset assigned. However, the total cost of the assignment depends on the partition P ∈ . Consequently, the decision of assigning a vehicle to a subset is not independent of the partition P ∈ . Therefore, the decision variable of assigning a vehicle to a subset is defined as follows: Thus, the employee transporting model is given by the following: subject to where J P is the index set of the subsets in the partition P ∈ , δ(A j ) is the traveling distance (time) to the destinations in a subset A j via some route for j ∈ J P , and T max is the maximum allowed total traveling distance (time) for any subset in any partition. The sum s(A j ) = a∈A j s(a) rep-resents the total number of passengers to be transported in a subset A j , and it reduces constraint 3 to y vj S(A j ) ≤ Q v . This is a linear constraint. It simply expresses the fact that the total number of passengers to be transported from any subset cannot exceed the capacity of the vehicle.
The set of constraint 4 states that the traveling distance (time) to a subset A j ∈ P for any partition P ∈ cannot exceed the maximum allowed distance (time). It is tacitly assumed that the vehicles start from the center and return back to the center after visiting every destination in their routes. Traveling distance (time) to a subset is independent of the vehicle; therefore, δ(A j ) ≤ T max for all A j ∈ P, P ∈ . This is not a linear constraint. The total distance (time) needs to be calculated for each subset A j . Any route to the subset A j is acceptable as long as the distance (time) does not exceed T max . This means that it is not necessary to solve the TSP to determine the least-distance (time) route for each subset.
The set of constraint 4 can also be treated as a set of soft constraints. The distance (time) traveled to any subset can be increased by a small amount ( > 0) to make the right-hand side of the constraint T max + at an added cost of opportunity loss of being late to work (school). Consequently, the objective function will be increased by In this expression, η(.) > 0 is the cost of opportunity loss of being late by an amount of for the subset A j . For a given value of , this problem is solved by setting the right-hand side of the set of constraint 4 to T max + .
The objective function is then the total cost of all assignments of vehicles to all subsets of any partition. The problem is then to find a partition P ∈ and a corresponding set of assignments of the vehicles to those subsets of this partition such that the total cost of such partition-vehicle assignments is minimum. This expression clearly defines the employee transporting problem as a heterogenous fleet mix problem without routing.

A surrogate constraint
Multiplying the set of constraint 3 by y vj then summing the capacity constraints over v ∈ V and j ∈ J P yields The variables y vj are binary variables, and thus, y 2 vj = y vj . On the other hand, every subset A j ∈ P must be assigned to a vehicle v ∈ V , but not every vehicle v ∈ V may be assigned to a subset. Consequently, v∈V y vj = 1 for all j ∈ J P , and j∈J P y vj ≤ 1 for all v ∈ V . In fact, a new variable can be defined now representing whether a vehicle is assigned or not as follows: Then a sequence of algebraic manipulations yields the right-hand side of the inequality 3 to be the total number of passengers to be transported from all the destinations.
On the other side of the inequality, v∈V Q v j∈J P y vj = Consequently, a knapsack problem is obtained for a partition P ∈ as follows: where y v ∈ {0, 1} for all v ∈ V and the additional set of constraints δ(A j ) ≤ T max for all j ∈ J P , P ∈ . For any partition P ∈ , this surrogate problem needs to be solved. The Stirling number of the second kind (S (k) n ) gives the number of partitions with exactly k nonempty subsets of n elements. For instance, the number of partitions of 15 elements with exactly six nonempty subsets is S (6) 15 = 420,693,273. Consequently, the total number of all partitions of a set of n elements is given by n k=1 S (k) n . In fact, the total number of all partitions of a set of 15 elements is n k=1 S (k) 15 = 1,382,858,545. Let P * ∈ be an optimal partition with a corresponding vehicle assignment (V * = 1, 2, . . . , v p ). Hence, v∈V * c v y v is the minimum cost and the total transporting capacity is given by v∈V * Q v y v = b ≥ s(A). The right-hand side of the constraint can be greater than or equal to the total number of passengers (s(A)) to be carried due to the discreteness of the number of passengers at different locations and the traveling time constraint. For each subset A j ∈ P * , the distance (time) constraint δ(A j ) ≤ T max holds.
The following knapsack problem is independent of any partition. If a partition (vehicle-subset assignment satisfying the capacity and the distance (time) constraints) can be obtained for this solution, a solution to the original problem is obtained.
Theorem 1. Let Y * (r = b) be an optimal solution to the knapsack problem above. If there exists a partition (satisfying the capacity and the distance constraints) corresponding to Y * (b), then this solution is optimal to the problems (2), (3), and (4). Proof. Let P * ∈ be an optimal partition and V * be the corresponding vehicle assignment. This solution satisfies the surrogate problem necessarily. Clearly, v∈V * c v y v is the minimum cost solution for the optimal partition P * , and further, v∈V * c v y v ≤ v∈V c v y v for any set V and any partition P ∈ . The knapsack problem with the righthand side s(A) ≤ r < b can have a solution in Y (r), but there cannot be any corresponding vehicle-subset assignments and/or partitions available satisfying the distance (time) constraint. If this were possible, then there would be a partition P and V such that v∈V c v y v < v∈V * c v y v . This is a contradiction to the hypothesis. Therefore, a knapsack problem with r = b needs to be considered.
Let Y (r = b) = (y v1 , y v2 , . . . , y vm ) be a solution to this knapsack problem for some 1 ≤ m ≤ n together with implies that they must be equal. The sets V * and V (r) may not be equal because of the existence of alternating optimal vehicle-partition combinations. Thus, an optimal partition (vehicle-subset combination) exists for the solution Y (r).
The argument until now assumes that there is only one type of each vehicle; hence, y v is a binary variable, and the surrogate problem is a (0,1) knapsack problem. However, if the number of vehicles of each capacity is more than one, then the surrogate problem becomes a bounded integer knapsack problem. All the arguments up to now apply equally well to the case of bounded integer knapsack problem. In this form, the employee transporting problem is reduced to the common sense problem of determining the number of vehicles of each capacity to transport all the passengers at a minimum cost provided that the distance (time) of any route to a subset of destinations does not exceed a predetermined limit without any consideration of routing and vehicle-subset assignments.

A solution method
The knapsack problem can be solved by any method in the literature, see for instance Kellerer et al. (2004). It contains |V | variables, binary or integer. Fortunately, in this class of problems, |V | is a rather small number possibly not exceeding 10. This fact simplifies the numerical computations somehow while solving this knapsack problem. After obtaining a solution to the knapsack problem, a partition of the set A is sought, satisfying the capacity and the distance constraints. If such a partition is obtained, then an optimal solution to the original problem is found. Otherwise, the right-hand side value of the knapsack problem is increased to the next range, and the procedure is repeated. Before describing the algorithms, first, how to determine the range on the right-hand side of the knapsack problem is presented. The knapsack problem where y j ≥ 0, and the integer for j = 1, 2, . . . , m can be converted to a maximization knapsack problem by setting y j = w j − x j where w j = b a j is the smallest integer greater than or equal to b/a j for j = 1, 2, . . . , m. The new knapsack problem is given as follows: where 0 ≤ x j ≤ w j , and the integer for j = 1, 2, . . . , m.
be an optimal solution to this knapsack problem. Then m j=1 a j x * j = b * ≤ m j=1 a j w j − b. Consequently, the upper bound on r is r u = m j=1 a j (w j − x * j ) and the lower bound on r is r = b.
Intuitively, having a sufficient number of vehicles will provide a partition (vehicle-subset assignment). Obviously, the algorithm will converge to a solution after a finite number iterations. A main algorithm to solve the knapsack problem consecutively and a subalgorithm to obtain a partition will be described next. Let Y t (r) = (y t v1 , y t v2 , . . . , y t vm ) represent the number of each type of vehicle in the knapsack solution in the iteration t.
The main algorithm is as follows: Step 0. Initialize: Set t = 1, r = s(A), go to Step 1.
Step 1. Solve the knapsack problem to obtain a solution Y t (r), and go to Step 2.
Step 2. Use the subalgorithm to obtain a partition corresponding to the solution Y t (r). If such a partition is obtained, go to Step 4, otherwise go to Step 3.
Step 3. Increase the right-hand side range to the next level for which r is the lower bound. Set t := t + 1 and go to Step 1.
The subalgorithm to find a partition corresponding to Y t (r) will determine all the possible subsets for each vehicle in the solution Y t (r), and subsequently, it will check whether a match is possible. The total capacity of the vehicles used in the solution Y t (r) is v∈V (r) Q v = r ≥ s(A). Let s 0 = s(A) − r be the slack representing the unused capacity of all the vehicles initially. Let R v represent the set of not-yet-assigned destinations for the vehicle v. Initially, R 1 = A. P v represents the incomplete partition for the vehicles 1, 2, . . . , v, and P 0 = ∅.
An exact algorithm to find a partition is as follows: Step 0. Initialize: Set v = 1, R 1 = A, and P 0 = ∅. Go to Step 1.
Step 5, otherwise go to Step 2.
Step 2. Let A v ∈ L v be the first subset in this list. Set Step 4, otherwise go to Step 2.
Step 1, otherwise go to Step 2.
Step 5. Terminate by declaring that either a feasible partition is obtained if R v = ∅ or there are no feasible partitions if R v = ∅ or L 1 = ∅.
This algorithm finds a partition for the solution Y t (r) if it exists by checking all the possibilities. An example is provided to illustrate how this algorithm works. Unfortunately, it requires checking so many alternatives; it is not practical for solving large-size problems. Consequently, an adaptation of the sweep method (Toth and Vigo 2002) is proposed as an easier and efficient approach for finding the subset-vehicle assignments. This sweep algorithm is also a subalgorithm to be called by the main algorithm in Step 2 to obtain a partition.
The sweep algorithm is as follows: Step 0. Initialize: Convert the Cartesian coordinates to the polar coordinates for each destination a j (x, y) → a j (r, θ) for j = 1, 2, . . . , n. The destinations are called nodes from now on. Set v := 1. Start with the vehicle v in the solution Y t (r) with the capacity Q v . Go to Step 1.
Step 1a. Start rotating from the x-axis and find a node a vk such that min θ a j (r, θ) = a vk (r, θ) where θ k ≤ θ j for all a j ∈ A. If a vk exists, then go to Step 1b, otherwise go to Step 3.

An illustration
An implementation of the main algorithm and the subalgorithms is essential to observe how the employee transporting problem can be solved to optimality in an efficient manner. A small example with ten destinations and 91 passengers to be transported is used in testing the knapsack solution and the exact algorithm. A largersize example with 79 destinations and 694 passengers is used to implement the sweep method. Both examples are randomly generated. A small town with ten destinations is considered. The coordinates and the number of passengers to be transported from/to each destination is given in Table 1. The distance matrix is given in Table 2. There are three types of vehicles available for transportation: mini-busses with 15 seats, midi-busses with 30 seats, and coaches with 50 seats with costs of 35, 55, and 105 TL per trip, respectively. There are altogether 91 passengers to be transported. How many vehicles of each type are needed and to which subsets will they be assigned to accomplish the task at a minimum cost?
The initial knapsack problem to be solved is given as follows: min z = 35y 1 + 55y 2 + 105y 3 2013, 9:31 http://www.jiei-tsb.com/content/9/1/31 where y i ≥ 0, and the integer for i = 1, 2, 3. In this problem, y 1 is the number of mini-busses, y 2 is the number of midi-busses, and y 3 is the number of coaches to employ. The solution to this knapsack problem yields Y 1 = (1, 1, 1) with a cost of 195 TL. The following argument shows that this solution is valid for 91 ≤ r ≤ 95. A simple computation shows w 1 = 7, w 2 = 4, and w 3 = 2. The transformation y j = w j − x j for j = 1, 2, 3 gives the following knapsack problem: where 0 ≤ x 1 ≤ 7, 0 ≤ x 2 ≤ 4, and 0 ≤ x 3 ≤ 2 are all integers. The optimal solution to this knapsack is X = (6, 3, 1) and Y = (1, 1, 1) with z = 480 − 675 = − 195 = −z and 15x 1 + 30x 2 + 50x 3 = 230. Therefore, r u = 325 − 230 = 95 and r = 91. Obviously, if the right-hand side of this knapsack is less than 230, a new solution is required. The next range is 96 ≤ r ≤ 105 with an optimal solution Y 2 = (1, 3, 0) with a cost of 200 TL. Further, the next range is 106 ≤ r ≤ 110 with an optimal solution of Y 3 = (0, 2, 1) with a cost of 215 TL. T max = 370 distance (time) units for this town. First, the exact algorithm is implemented for finding a partition corresponding to the solution Y t (r). There are no partitions for the solution Y 1 (91) = (1, 1, 1) with T max = 370. Then the next best solution (next range) is attempted. Y 2 (96) = (1, 3, 0). The total capacity of the vehicles now is 105. Therefore, Treating the constraint δ(A x ) ≤ T max as a soft constraint is also considered. T max = 370 distance time units in this example. Now it is increased by 1% to 373.7 at an additional cost of opportunity loss of 2% of the total cost of the solution. Then Y 1 = (1, 1, 1) yields the partition A 1 = {1, 4, 5, 6, 7, 8} with s(A 1 ) = 47, δ(A 1 ) = 370; A 2 = {2, 3, 9} with s(A 2 ) = 29, δ(A 2 ) = 373; and A 3 = Now a larger-size problem shows how efficient the sweep algorithm is in obtaining a partition if it exists or not for the given fleet of vehicles. This example has 79 destinations located in a metropolitan area, and the total distance to be traveled should not exceed 50 km. Table 3 provides the locations in (x, y) and (r, θ) polar coordinates and the number of passengers to be transported from those 79 destinations to the center in the morning and back later in the evening in this metropolitan area. There are 694 passengers to be transported; therefore, the knapsack problem to be solved is given as follows: min z = 35y 1 + 55y 2 + 105y 3 subject to 15y 1 + 30y 2 + 50y 3 ≥ 694 where y i ≥ 0 and the integer for i = 1, 2, 3. The solution is Y 1 = (1, 21, 1) with a cost of 1,295 in the range 694 ≤ r ≤ 695. The next best solution is Y 2 = (1, 23, 0) with a cost of 1,300 in the range 696 ≤ r ≤ 710. Further, the next best solution is Y 3 = (0, 22, 1) with a cost of 1,315 in the range 711 ≤ r ≤ 720. Finally, the next solution is Y 4 = (2, 23, 0) with a cost of 1,335 in the range 721 ≤ r ≤ 725. The sweep algorithm does not obtain any partitions for the solutions Y 1 = (1, 21, 1), Y 2 = (1, 23, 0), and Y 3 = (0, 22, 1), but finds a partition for the solution Y 4 = (2, 23, 0) given in Table 4. Therefore, the relative error is less than (1, 335 − 1, 295)/1, 295 = 3.09%. As an indication of the efficiency of the sweep algorithm, one should point out that a small laptop computer (netbook) with a processor chip of 1.60 GHz solves the last problem in 1.73 s of CPU time.

Conclusions
The employee transporting problem is actually a set partitioning problem for the assignment of the vehicles. The capacities of the vehicles vary in size. Therefore, it is a heterogenous fleet problem. These facts make the employee transporting problem belong to a different class of problems than the HVRP in the literature. Although in both problems the aim is to determine the fleet mix and composition, the employee transporting problem strives for this aim without routing. A set partitioning model is developed, deviating from the integer formulations in the literature. An important aspect of this article is the thorough investigation of the model structure. Consequently, this investigation leads to a knapsack problem from the model structure. This knapsack problem is the common sense problem of determining the number of vehicles of each capacity to transport all the passengers at a minimum cost by ignoring the subset-vehicle assignments.
The partition obtained for the knapsack solution is an optimal solution. There is an exact algorithm to find the partition for a given knapsack solution. However, it requires matching too many subsets; it is impractical for large-size problems. The sweep algorithm is suitable for large-size problems. It is a heuristic method which obtains a partition in a very efficient manner computationally but may miss the optimal partition. A few examples are provided to illustrate how the main algorithm and each subalgorithm works. It is worth mentioning at this point that other heuristics and/or metaheuristics can be implemented in obtaining the partition after deciding the mix of the fleet. The employee transporting problem differs in nature from HVRP by not considering the routing, thus a computational comparison with other methods in the literature will not serve any purpose and such a task was not undertaken.
The model for the employee transporting problem and its solution can provide useful insights to practitioners in order to decide the mix of vehicles in the fleet and subsequently the fleet size to transport the passengers from/to the destinations. Furthermore, vehicle drivers are human beings; hence, they may have preferences and/or restrictions where to go. The approach of this article allows including the preferences and/or restrictions of the drivers in the choice of destination subsets.