A time expanded version of the (Hitchcock-) transportation problem

This paper considers a time expanded version of the classical (Hitchcock-) transportation problem. Certain quantities of goods are produced in the production facilities in each period of a planning horizon and also the demand values of the outlets are different for each time period. Moreover, the transportation costs from i to j also vary over time. The different planning periods are connected by the fact that goods may be stored at a facility or at an outlet to exploit cheaper transportation costs as long as the demand is met in every time period. We describe the problem by two models, showing that it can be solved in polynomial time by standard software packages. Then we describe some generalizations of the problem by adapting the two models, pointing out that each model seems to provide different benefits.

In this paper we consider a time expanded version, which is defined below as problem P. Problem P was studied in [2] (see also [3,4]) by referring to a method for solving integer programming which resorts to the calculation of suitable Gröbner bases [7]: in particular, the authors call it 3-dimensional transportation problem (referring to [11], while a similar name was used in [1] for a different problem). The motivation of this paper is to try to study problem P by an operations research approach. The closest reference in this sense seems to be [8], where the authors study the existence of feasible solutions in a multiperiod allocation problem of substitutable resources: in particular, at a certain point of the paper the authors call it a multiperiod transportation problem a problem which however seems to be quite distant from problem P.
Let P be the following problem: Given r production facilities F 1 , . . . , F r , let A ik (i = 1, . . . , r, and k = 1, . . . , t) denote the number of units of an indivisible good produced by F i during the k-th period of a planning horizon of t periods. Assume that there are s outlets O 1 , . . . , O s each one demanding a certain number of units per period, say B jk ( j = 1, . . . , s and k := 1, . . . , t). Let c ijk ≥ 0 be the cost associated with transporting one unit from F i to O j during the k-th period, let h ik ≥ 0 (let h jk ≥ 0) be the cost associated with storing one unit in F i (in O j ) at the end of the k-th period. Then one wishes to minimize the total cost of transportation and of storage along the planning horizon of t periods.
One can assume that the following conditions (1) (2) If Eq. 1 is not true, then the problem has no feasible solution (demand exceeds supply at thet-th period). If Eq. 2 is not true, then one may proceed similarly to the Hitchcock problem (i.e., problem P for t = 1) as shown in [10]  In this paper we propose two models for P: the first (Section 2) is a natural min-cost flow model, while the second (Section 3) is a Hitchcock model obtained by exploiting some peculiarities of the problem. Then we describe some possible generalizations of P by adapting the two proposed models (Section 4), pointing out that each model seems to provide different benefits.

A min-cost flow model for P
together with a source σ ∈ V with 0 indegree, with a terminal τ ∈ V with 0 outdegree, with an edge-capacity function w : E −→ R, and with an edge-cost function The value of f is the quantity: (σ,y)∈E f (σ, y). The cost of f is the quantity: Given a network N and a flow-value v f , the mincost flow problem with respect to pair (N, v f ) is that of computing in N a flow f of value v f that has minimum cost.
In the sequel, let us try to model P as a min-cost flow problem in the following network, which is constructed by considering that P implicitly contains t instances of the Hitchcock problem and by adding an origin vertex, a destination vertex, and edges for the links between consecutive periods (see Fig. 1): • construct t disjoint digraphs G 1 , . . . , G t such that: • the elements of V and E are defined as above; • the function w : E −→ R of edge-capacities is defined as follows: w(e) = ∞, for the remaining elements e ∈ E; • the function c : E −→ R of edge-costs is defined as follows: c(e) = 0, for the remaining elements e ∈ E.
Let N = (σ, τ, V, E, w, c) be the network defined as above. By Eq. 1 it is possible to define in N a flow of value v f = j=1,...,r k=1,...,t B ik . Then let P f denote the min-cost flow problem in (N, v f ). By Eq. 1 and by the structure of N, given a feasible solution [x ijk , z ik , z jk ] of P one can derive a feasible solution [y(u, v)] of P f , and vice-versa, by the following equalities: by the definition of costs for edges of N.
One can formalize what above by the following theorem.

Theorem 1 An instance of P can be solved as a min-cost f low problem.
As network N can be efficiently constructed, one obtains the following corollary.

Corollary 1 Problem P can be solved in polynomial time.
In particular the problem admits an optimal integer solution if all the values A ik , B jk are integer.

A Hitchcock model for P
Let us consider problem P as problem P f defined in Section 2, according to the equalities linking the respective solutions. In [10] a standard transformation from an instance of the min-cost flow problem to an instance of the Hitchcock problem is shown. However, in the sequel let us try to model P as a Hitchcock problem just by exploiting some peculiarities of the problem (i.e., by compacting some aspects of P f ) and not by using the standard transformation of [10].
The Hitchcock model for P is based on the following variables (see Fig. 2): Then (also by conditions (1) and (2)) one has: It remains to define the costs c ii jj . Assume that i > j . Then one can define c ii jj = ∞, so to ensure q ii jj = 0 for i > j .
Assume that i ≤ j . Let us observe that for any solution of P, the amount q ii jj will arrive from F i to O j through a path from a ii to b jj in the network N of Section 2: in particular, all the edge-capacities along each of such paths are ∞.
It follows that for any optimal solution of P, the amount q ii jj will arrive from F i to O j through a least cost path (or in general through least cost paths, if more than one) from a ii to b jj in the network N of Section 2. Then the cost c ii jj may be defined as the cost of a least cost path from a ii to b jj : by the structure of N such paths are exactly j − i + 1 (i.e., each such path is formed by a possible storage multi period in F i , by a transfer period from F i to O j , and by a possible storage multi period in O j : the transfer period is a period k with i ≤ k ≤ j ).
Then summarizing one obtains: From P to H Let [x ijk , z ik , z jk ] be an optimal solution of P. Then a solution [q ii jj ] of H with the same cost can be obtained as follows. Let us observe that: (i) the costs of storage in facilities (in outlet) do not depend on the destination (on the origin) of the good. By (i) and by the definition of costs c ii jj , one may proceed as follows.
The first step may be to obtain the values of q ikjk , for k = 1, . . . , t: to this end, for k = 1, . . . , t, it is enough to chose the values of q ikjk , in order to maximize i=1,...,r j=1,...,s q ikjk , subject to q ikjk ≤ x ijk and to j=1,...,s q ikjk ≤ A ik for i = 1, . . . , r (that is to charge the values of x ijk to those of q ikjk as much as possible). That can be easily done by a greedy technique.
The second step may be to obtain the other values of q ii jj : to this end one can apply the Ford-Fulkerson procedure to compute a maximum flow in the network N obtained from the network N of Section 2 by modifying the edge-capacities as follows: In fact, by starting from a null flow in N , at each iteration of the procedure an augmenting flow saturates a path in N from a certain lowest a ii to a certain highest b jj , with i < j (because of the first step): the value of such an augmenting flow can be charged onto q ii jj , which may be updated at each iteration. Note that: concerning the cost, [q ii jj ] has the same cost as [x ijk , z ik , z jk ], since the latter is an optimal solution of P and by the definition of costs c ii jj ; concerning the procedure, at most t × (r × t) × (s × t) iterations occur, where the first t stands for an upper bound to the number of all possible paths from a ii to b jj .
From H to P Let [q ii jj ] be a solution of H. Then a solution [x ijk , z ik , z jk ] of P with the same cost can be obtained as follows. By the definition of costs c ii jj , every q ii jj defines a least cost path P ii jj from a ii to b jj in the network N of Section 2 (i.e., corresponding to the costs which minimize the expression which defines c ii jj ). Then q ii jj can be charged (as a flow line) onto the edges of P ii jj , so to compose the values of a solution [x ijk , z ik , z jk ] of P according to the equalities of Section 2.
One can formalize what above by the following theorem.

Theorem 2 An instance of P can be solved (directly) as a Hitchcock problem.
Then a corollary and a comment similar to those at the end of Section 2 hold.

Some generalizations of P
In this section let us introduce three possible generalizations of problem P, pointing out the advantages and the disadvantage of the two proposed models.
Let P 1 be the following problem. In the context of problem P, assume that every facility F i for i = 1, . . . , r (that every outlet O j for j = 1, . . . , s) can store at most d i (at most d j ) units of good at the end of each period k for k = 1, . . . , t. The objective remains that of the problem P.
Then P 1 can be solved as a min-cost flow problem, i.e., in polynomial time.
On the other hand, it seems to be not immediate to model P 1 by the Hitchcock model of Section 3.
Let P 2 be the following problem. In the context of problem P, assume that the good produced in a facility has to be sold in a outlet before a certain number of periods (e.g., before corruption of the good), say L periods. The objective remains that of the problem P.
Actually in this way one obtains a generalization of the min-cost flow problem, which remains a linear programming problem, but can not be solved as a classical min-cost flow problem.
Then P 2 can be modeled by the Hitchcock model of Section 3, by modifying the costs as follows: • c ii jj = ∞ , for j − i > L, so to ensure q ii jj = 0 for j − i > L.
Then P 2 can be solved as a Hitchcock problem, i.e., in polynomial time.
Let P 3 be the following problem: In the context of problem P, let c ik (i = 1, . . . , r, k = 1, . . . , t) be the cost of production for a unit of good in F i in the kth period, and let p jk ( j = 1, . . . , s, k = 1, . . . , t) be the profit for selling a unit of good in O j in the k-th period: in particular, A ik can be view as the maximum amount which can be produced by F i in the k-th period. Then one wishes to minimize the total cost of transportation, of storage, and of production, less the total profit by selling, along the horizon of t periods, i.e., one wishes to maximize the total profit by selling, less the total cost of transportation, of storage, and of production, along the horizon of t periods.
A possible scenario for problem P 3 may be that of a tobacco manufacture company: in fact the selling price of tobacco varies over countries and its fluctuation (over countries) is planned in advance.
Then P 3 can be modeled by the min-cost flow model of Section 2, by modifying the network N as follows: Actually in this way one obtains a generalization of the min-cost flow problem (where: the costs are allowed to be negative, and the flow value is not fixed), which remains a linear programming problem, but can not be solved as a classical min-cost flow problem.
Then P 3 can be modeled by the Hitchcock model of Section 3 as follows.
Let us observe that (recalling the definition of costs c ii jj of Section 3) it is possible and convenient to send good from a ii to b jj if and only if: Let us say that a variable q ii jj is green if the above two conditions are satisfied. For any green variable q ii jj let us writec ii jj = c ii + min i ≤k≤ j {( u=i ,...,k−1 h iu ) + c ijk +( u=k,..., j h ju )}− p jj , and let K be a scalar with K > |c ii jj |.
Then let us define the following costs c * ii jj for every variable q ii jj : Then it is not difficult to verify that, given an optimal solution [q * ii jj ] of P * 3 , one can directly derive an optimal solution [q ii jj ] of P 3 by setting: • q ii jj = q * ii jj , if q ii jj is a green variable; • q ii jj = 0 , otherwise.
Then P 3 can be solved as a Hitchcock problem, i.e., in polynomial time.
Then summarizing it seems that: the first model is more powerful than the second model to describe generalizations of P (e.g., P 1 ), though it may lead to linear programming which can not be solved as a classical min-cost flow problem (e.g., P 2 and P 3 ); while the second model may be more useful than the first model to show that certain generalizations of P (e.g., P 2 and P 3 ) can be solved as a classical Hitchcock problem.

Conclusions
The (Hitchcock-) transportation problem is a well known problem in operations research [6,9,10] and can be solved in polynomial time by fast algorithms (see e.g. [12]). By its applicative nature, several versions of this problem have been considered, such as dynamic, timedependent versions (see e.g. [5]).
In particular the following time dependent version was studied in [2] (see also [3,4]) by referring to a method for solving integer programming which resorts to the calculation of suitable Gröbner bases [7]: Given r production facilities F 1 , . . . , F r , let A ik (i = 1, . . . , r, and k = 1, . . . , t) denote the number of units of an indivisible good produced by F i during the k-th period of a planning horizon of t periods. Assume that there are s outlets O 1 , . . . , O s each one demanding a certain number of units per period, say B jk ( j = 1, . . . , s and k := 1, . . . , t). Let c ijk ≥ 0 be the cost associated with transporting one unit from F i to O j during the kth period, let h ik ≥ 0 (let h jk ≥ 0) be the cost associated with storing one unit in F i (in O j ) at the end of the kth period. Then one wishes to minimize the total cost of transportation and of storage along the planning horizon of t periods.
In this paper we tried to study the above problem by an operations research approach. We described the problem by two models, showing that it can be solved in polynomial time by standard software packages: the first is a natural min-cost flow model, while the second is a Hitchcock model obtained by exploiting some peculiarities of the problem. Then we described some possible generalizations of the problem by adapting the two proposed models, pointing out that each model seems to provide different benefits.