Ind. Eng. Chem. Res. 2005, 44, 7435-7450
7435
Contract Selection and Tank Allocation in a Terminaling and Storage Facility H. L. Tay,† I. A. Karimi,*,‡ C. K. Peck,‡ and X. L. Peh‡ The Logistics Institute-Asia Pacific, and the Department of Chemical & Biomolecular Engineering, National University of Singapore, 4 Engineering Drive 4, Singapore 117576
Chemical logistics play a key role in chemical supply chains. Terminaling and tank storage of liquid chemicals is a very common activity in the transport, use, and trading of chemicals. Efficient utilization of the available tank capacity at a storage terminal is a difficult combinatorial problem and is paramount in reducing costs for both the terminal operator and its customers. We present three multiperiod mixed-integer linear-programming (MILP) formulations for selecting contracts and allocating tanks to contracts in a typical storage terminal to maximize profit. One of the three models seems promising for managing a moderate-size facility. For managing larger facilities, we propose two heuristics. We illustrate our models and algorithms with a case study involving 27 tanks and 40 contracts. The heuristics give comparable solutions that are roughly 8-9% lower than the optimum solution. On one hand, they show the advantage of rigorous optimization, while on the other, they show that even these heuristics could represent significant savings compared to the manual procedures used in the chemical logistics industry. 1. Introduction In recent years, chemical companies are increasingly outsourcing a variety of their logistics activities to thirdparty logistics (3PL) firms. This is to reduce their capital expenditure associated with the logistics facilities and to focus on the core competency of chemical manufacturing. A 1998 survey by Bhatnagar, Sohal, and Millen1 of 126 registered Singaporean firms (not necessarily all chemical firms) showed that 60.3% of these companies had engaged third-party logistics services. Of the firms that employed the logistics services, 73.7% indicated that they engaged multiple contract logistics firms and 84% of them had been engaging contract logistics services for more than three years. Another study by Sohail and Sohal5 on 124 Malaysian firms (again not necessarily all chemical firms) in 2000 indicated that 67.7% were using 3PL services and of the firms outsourcing logistics services, 63% had employed the services of multiple contract logistics firms. These show the significance of outsourcing logistics and the need for the 3PL firms to be competitive. The services provided by the 3PL firms to chemical companies fall into the following three broad categories. (1) Tank storage: This includes storage and transportation of chemicals, trans-shipment, break of bulk cargo, consolidation of some base commodity chemicals, blending, mixing, and drumming of chemical products, waste treatment, supply chain management, and industrial terminaling.2 [Industrial terminaling is a concept in which the company builds, operates, and owns the jetties and pipeline connections in the service of the surrounding chemical and petrochemical hub.] (2) Land-based logistics: This includes customs clearance, marking, labeling, sampling, transportation of * To whom correspondence should be addressed. Phone: +65 6874-6359. Fax: +65 6779-1936. E-mail: cheiak@ nus.edu.sg. † The Logistics Institute-Asia Pacific. Currently with Vopak Singapore Pte Ltd. ‡ Department of Chemical & Biomolecular Engineering.
less-than-truckload (LTL) quantities, and one-stop shopping for end-users.3 [One-stop shopping is a concept in which a logistics service provider offers multiple logistics services to meet the customer’s diverse logistics needs.] (3) Integrated logistics: This includes a regionally based operation of logistics services across multiple countries and modalities. It provides customized integrated logistics solutions such as management and optimization of product flows and other activities within the chemical supply chain that aim to reduce the overall supply chain cost. Tank storage facilities or tank storage terminals form the core of chemical logistics services. Such terminals exist worldwide at many strategically located ports such as Singapore, Rotterdam, etc., where clusters of chemical companies operate. For instance, Singapore hosts more than 72 major chemical companies in its Jurong Island cluster. Its favorable geographical location links west to east and provides a preferred break-bulk point for accessing the greater Asia Pacific region. Furthermore, its excellent infrastructural support, availability of quality workforce, and other support services make it an excellent location for a storage terminal facility. Served mostly by dedicated pipelines, storage terminals provide storage for petrochemical and chemical products. Truck-loading bays, semi-automated drum filling points, and covered/open warehouses usually support a tank storage terminal. It is also common for a terminal operator to operate jetties that can handle a range of shipping vessels and parcel tankers that load and discharge materials to and from the terminal. The tank terminals allow chemical industry users to enjoy the economies of scale by sharing the common facilities such as jetties, truck-loading, drumming, etc., so that they can focus fully on their manufacturing activities and save the valuable capital for logistics. A typical third-party storage terminal may have more than a hundred tanks with a total storage capacity of 150,000 m3 storing a variety of chemicals with varying storage specifications. A chemical storage terminal
10.1021/ie0501632 CCC: $30.25 © 2005 American Chemical Society Published on Web 08/16/2005
7436
Ind. Eng. Chem. Res., Vol. 44, No. 19, 2005
typically receives from its customers orders with varying requirements for chemical storage and other logistics facilities. Once accepted, these become short-term or long-term binding contracts for storage between the 3PL and the customer. Contracts for the lease of storage space range from a week to a few years. It is common for a storage terminal to have several such contracts at any time. Short-term contracts are also called spot contracts. Petrochemical/oil traders who require only temporary storage for their materials usually opt for spot contracts. On the other hand, big petrochemical and pharmaceutical plants that require storage of their upstream raw materials and downstream finished products usually opt for long-term contracts that may last for several years. The tanks in a storage terminal normally have different sizes and characteristics to cater to the variety of storage requirements. Depending on the chemical involved and its storage requirements, only some tanks may be suitable for a contract. However, at any given time, several contracts may compete for a tank and the optimal allocation of tanks to the contracts is a complex combinatorial issue that the terminal operator must resolve routinely. In a dynamic environment, when current contracts end and new contracts begin, the terminal operator may need to reallocate tanks continually to increase facility utilization, maximize revenue, and minimize costs. If the facility is overloaded and the operator cannot service all orders, then it must select the profitable orders to serve and reject others. In other words, selecting the most profitable contracts and simultaneously assigning tanks to these contracts in a dynamic and optimal fashion is an important problem that many 3PLs face. A myopic management strategy that does not address the problem in an integrated manner and employs a short-term vision that ignores future orders may result in poor facility utilization, excessive tank-switching costs, and reduced revenues from the refusal of orders that an optimized strategy could have accommodated. We are not aware of any work that has addressed this novel and important problem. Our work was motivated by the operation of an existing local storage terminal owned by a major international 3PL firm that provides a variety of logistics services, such as bulk liquid storage, repackaging, distribution, etc. Over the past few years, increased competition from players in the region, such as Malaysia and China, who offer highly competitive rates for chemical storage services because of their lower land, labor, and operating costs have reduced the margins for the 3PL operators in Singapore. In view of these threats, it has become imperative for terminal operators, not only in Singapore but worldwide, to reduce their costs by managing their facilities better. In this paper, we develop a novel multiperiod mixed-integer linearprogramming (MILP) formulation for selecting contracts and allocating tanks to contracts over a predetermined planning horizon to maximize the terminal’s profit. 2. Problem Description We focus on only the tank storage operations in a terminal. A third-party storage terminal houses several tanks of varying sizes and stores a variety of chemicals with diverse storage specifications. Let S denote the set of tanks (s ∈ S) and S ) |S| the cardinality of S. Typically, the tanks are grouped in blocks called bunds
(b ) 1, 2, ..., B). A bund is composed of several tanks bordered within a rectangular embankment that prevents the spread of a chemical spill in the event of a tank failure. Let SBb denote the set of tanks in bund b, so S ) SB1 ∪ SB2 ∪ ... ∪ SBB with SBb ∩ SBb′ being a null set for b * b′. The chemicals range from easy solvents requiring minimal handling and storage effort to acids, acrylates, and specialty chemicals with more stringent storage requirements and thus greater handling and storage effort. In addition to the differing sizes, the tanks differ in several characteristics such as tank material (carbon steel, stainless steel, etc.), internal coating (none, epoxy, zinc, etc.), heating facility (steam suction heater, electric tracing, heating coil, etc.), cooling facility (chilling, refrigeration, etc.), hot/cold insulation, blanketing system (nitrogen, etc.), internal floating roof (none, aluminum, carbon steel, etc.) etc. Because the chemicals require varying combinations of these features, a tank may not be suitable for storing all chemicals, and vice versa. We define a contract (c) to be a business agreement between the terminal operator and a customer for the leased storage of one unique chemical. Let C be the set of all contracts, whether current (confirmed) or potential (new or unconfirmed) that the terminal operator may manage soon. While a confirmed contract is binding and the operator must respect it, a new or unconfirmed contract is simply an unconfirmed order that the operator may decide to accept or reject based on the contract’s profitability and the terminal’s storage availability. We allow even a partial acceptance of an unconfirmed contract in terms of both storage duration and volume. We define CC as the set of confirmed contracts and UC as the set of new or unconfirmed ones. Each contract (c ∈ C) has the following attributes: (a) customer, (b) chemical, (c) requested amount of storage capacity (Qc), (d) requested duration of storage start date STc and end date ETc, we assume STc ) 0 for the current contracts), and (e) storage specifications that determine the appropriate tank features such as material, internal coating, roof, blanketing, etc. A contract for storage may accompany demands for other logistics services mentioned earlier including drumming, trunk-filling, warehousing, etc. On the basis of the contract requirements, the operator identifies the tanks suitable for storing the contract’s chemical. Let Sc denote the set of tanks that are suitable for storing (notwithstanding if they are empty or not) the chemical in a contract c ∈ C. Then, on the basis of its estimated costs, the operator fixes a charge rate for the contract in terms of dollars per cubic meter per day$/m. Generally, contracts that require greater handling and storage effort or ask for other value-added logistics services would have a higher rate. However, in this paper, we deduct the costs associated with the other logistics services from the total contract rate and define contract revenue as the net charge for storage only. Let Rc represent this revenue ($/m3/day) for a contract c ∈ C. When suitable empty tanks are not immediately available for an incoming contract, the terminal operator may reallocate some tanks to make space. This involves transferring the chemical in a tank to another suitable empty tank, and using the emptied tank for the incoming contract. This process involves the cost of emptying the chemical from the filled tank and cleaning. This cost may depend on the chemical (thus contract) that is involved in the switching process. In addition to
Ind. Eng. Chem. Res., Vol. 44, No. 19, 2005 7437
this, the terminal operation may also incur other costs, such as heating, cooling, cleaning, blanketing, pumping, maintenance, etc. We lump these costs into an operating cost ($/m3) for storing a contract in a given tank. Thus, each tank has an operating cost, a cleaning cost, and a pumping (in/out) cost, which may all depend on the contracts as well. The goal of the terminal operator is to maximize its gross profit by selecting the profitable new contracts and dynamically allocating tanks to various contracts over the near future. We can now state the complete terminal management problem as follows: given the details on the tanks, contracts, costs, revenues, and the state of the terminal at time zero, the operator must determine (1) which of new contracts should be confirmed or rejected, (2) how much storage should be alloted to each newly confirmed contract, (3) how long should each newly confirmed contract be served, (4) which tanks, when, and for how long a tank should beused for each contract, and (5) the revenue from, the costs for, and the maximum gross profit from all contracts For this study, we make the following assumptions regarding the terminal operations. (i) All data and parameters are static. In a real situation, each time there is a change in parameters or data, the operator must solve the model with updated information. (ii) The durations for tank-cleaning and intertank transfers are negligible compared to the contract durations. (iii) Each contract has a unique chemical. Thus, the operator cannot mix chemicals from two contracts, and a tank cannot hold multiple contracts at any time. (iv) Storage requirement is constant over the entire duration of a contract. (v) The operator must serve old and confirmed contracts to completions. It cannot preempt any of them. (vi) The operator cleans tanks at the end of each contract, so empty tanks are always clean. In a situation where tank cleaning is not required, this assumption will lead to suboptimal solutions. We foresee significant changes to the presented formulation, hence we plan to address this issue in a future communication. 3. General Resource Allocation Problem We are not aware of any previous literature on the terminal management problem described in the last section. However, previous work3,4 does exist on resource allocation problems in general but with no scheduling considerations. We now compare these problems with the terminal management problem. Resource allocation problems abound in many practical applications and have been studied widely in the literature. One well-studied problem is the well-known knapsack problem. Its name arises from the backpacker who has a fixed-size knapsack and must fill it with only the most useful items. In most applications, the items are unbreakable and must be either put entirely in the knapsack or not included at all. The 0-1 property that is inherent in most applications makes the knapsack problem hard. A practical instance of such a 0-1 knapsack problem arises in allocating resources with a limited budget (e.g., selecting items of varying prices using a fixed budget). Every item has a cost and a value, and the goal is to seek the most value for a given budget. Several heuristics exist for solving the 0-1 knapsack problem.
An extension of the knapsack problem is the binpacking problem that involves multiple bins of different capacities instead of one fixed-size knapsack. Both bins and items can be multidimensional and such problems are NP-hard. The bin-packing problem is analogous to the tank terminal problem except for time considerations. At each point in time, the latter resembles the former in that the storage tanks in the terminal are analogous to the bins and the contracts are analogous to the items that we must select to fill the bins in order to maximize value. In addition to having the time dimension, our problem includes costs for using bins, items are divisible, we can select items partially, and a bin (tank) cannot store more than one item. Clearly, it is not possible to solve our problem as a general binpacking problem. Thus, we formulate it as a multiperiod MILP model. 4. MILP Formulation As the first step in our formulation, we gather the requested or confirmed start times (STc) and end times (ETc) of all contracts in one pool and arrange them in chronologically increasing order. After eliminating the replicates, we label the remaining ordered time instances as t0 () 0) < t1 < t2 < t3 < ... < tp ... < tP, and define period p as the interval [tp-1, tp]. By doing so, we have divided the planning horizon [0, tP] into P nonuniform periods (p ) 1, 2, ..., P) of known lengths. Note that each contract c starts in some period psc and at time STc ) tpsc-1 and ends in some later period pec and at time ETc ) tpec. Let Pc ) {p|psc e p e pec} denote the set of periods that make up the requested or confirmed duration of contract c. Note that for a c ∈ UC, both STc and ETc are not confirmed but merely requested. The operator may not be able to or decide not to serve a c ∈ UC to its full duration, so a c ∈ UC may start in a period later than psc and end in a period earlier than pec. The optimizer must decide the best duration that the operator should offer to each c ∈ UC. In contrast, once the operator confirms a contract, it must fulfill its agreed duration and storage capacity. As discussed earlier, given the requirements of each contract c, the operator knows the set Sc of tanks that are suitable for storing the chemical of each contract c. Similarly, for every storage tank s, the operator knows the set Cs of contracts that s can serve. In addition to the real contracts, we define a dummy or zero contract with c ) Q0 ) R0 ) 0, S0 ) S and no defined duration and make it a member of every Cs. Whenever, a storage tank is empty, we say that it is storing the zero contract. In the following, unless indicated otherwise, we write all constraints for the valid ranges of their defining indices s, p, c, etc. The most primary decisions in this problem are (1) which contract c should each tank s carry in each period p and (2) how much volume that contract’s chemical should occupy in each period. To model the first decision, we define the following binary variable
xscp )
{
1 if tank s holds contract c during period p 0 otherwise c ∈ Cs, p ∈ Pc
Note that xs0p is a valid variable for all s and p. For the second decision, we define a continuous variable vscp (c * 0, c ∈ Cs, p ∈ Pc) as the volume of chemical that tank
7438
Ind. Eng. Chem. Res., Vol. 44, No. 19, 2005
s stores during p for contract c. Since the zero contract has no storage, we do not use vs0p. As per the third assumption, a tank cannot hold more than one contract at any time. However, since an empty tank is supposed to carry the zero contract, each tank always carries exactly one contract at all times. So we write
∑
c∈ Cs3p∈Pc
xscp ) 1
vscp e min[Vs, Qc]xscp c * 0
(2)
The above forces vscp ) 0, when s is not storing a contract c (c * 0) during p. Given the xscp, we can easily identify whether the operator serves a c ∈ UC in a period p. To this end, we define the following 0-1 continuous variable
{
1 if the operator serves a c ∈ UC period p 0 otherwise c ∈ UC, p ∈Pc
We do not define ycp for c ∈ CC because the operator must serve them for their full agreed duration. For a c ∈ UC, if even a single tank holds that c during a period p, then we can infer that the operator must be serving c during p. In other words
ycp g xscp c ∈ UC, s ∈ Sc
(3a)
On the other hand, if no tank holds a c ∈ UC during a period p, then the operator must not be serving c during p. Therefore
ycp e
∑
xscp c ∈ UC
(3b)
s∈Sc
Eqs. 3a and b ensure that ycp will be binary, even though we treat it as a 0-1 continuous variable. Knowing whether the operator serves a c ∈ UC in each period p ∈ Pc, we can also know whether it has accepted to serve c at all or rejected c. To this end, we define another 0-1 continuous variable
{
1 if the operator accepts to serve partially or fully a c ∈ UC zc ) 0 otherwise
c ∈ UC
zc e
∑ ycp
c ∈ UC, p ∈ Pc
{
1 if the operator begins serving a c ∈ UC at time tp 0 otherwise c ∈ UC, p, (p+1) ∈ Pc
yecp ) 1 if the operator ends serving a c ∈ UC at time tp 0 otherwise c ∈ UC, p, (p+1) ∈ Pc
{
Note that we define the above only at interior time points within the requested service interval [STc, ETc]. When the operator begins serving a c ∈ UC at tp, then yc(p+1) must become one and vice versa. We write this fact using
yc(p+1) ) ycp + yscp - yecp c ∈ UC; p, (p+1) ∈ Pc
(4a) (4b)
p∈Pc
Once a c ∈ UC is accepted, the operator must also decide and offer a continuous duration of storage service. We assume that this duration consists of a set of contiguous periods from within Pc rather than an interval defined by some variable start and end times. It cannot be that the operator serves c during a period
(5)
Note that even though we did not explicitly define yscp ) yc(p+1) and yecp ) 0 for p ) psc - 1, yecp ) ycp and yscp ) 0 for p ) pec. Clearly, a c ∈UC can start once and only once if the operator has decided to serve c, therefore
zc ) yc,psc +
∑
yscp
(6a)
p,(p + 1)∈Pc
where the first term on the right-hand side takes care of the start at STc. Similarly, c can end once and only once if the operator has decided to serve c, therefore
zc ) yc,pec +
∑
yecp
(6b)
p,(p + 1)∈Pc
where the first term on the right-hand side takes care of the end at ETc. Furthermore, a c ∈ UC cannot start and end at the same time, when it is selected, and cannot start or end, when it is not selected, hence
yscp + yecp e zc c ∈ UC; p, (p + 1) ∈ Pc
(7)
Last, if a c ∈ UC ends at tp, then ycp must be one, therefore
ycp g yecp c ∈ UC; p, (p + 1) ∈ Pc
As we fixed ycp earlier, we can also fix zc given ycp for p ∈ Pc using the following two constraints
zc g ycp c ∈ UC, p ∈ Pc
yscp )
(1)
When a tank s carries a contract c, then the volume of chemical that it can store cannot exceed both the tank capacity (Vs vu or volume units) and the contract’s requested storage (Qc), therefore
ycp )
p, does not serve c during (p + 1), and then serves c again during (p + 2). To model a continuous duration of service for a c ∈ UC, we define two 0-1 continuous variables
(8)
Analogous to the above, we could write yc(p+1) g yscp for p, (p + 1) ∈ Pc, but we realize that eqs 5 and 8 ensure that already. In fact, eqs 6b and 8 make eq 4b redundant also, so we will not include it in our formulation. Now, when the operator decides to serve a c ∈ UC partially or fully, some storage volume for c must also be offered. We assume that it is not acceptable to change the agreed storage volume (qc) over the agreed duration of c ∈ UC. Of course, it is possible to imagine situations in which the used volume changes with time or even goes down to zero over time for some contracts. At present, we do not deal with such scenarios. Now, the optimizer must decide qc. Of course, qc must not exceed
Ind. Eng. Chem. Res., Vol. 44, No. 19, 2005 7439
the requested volume Qc of contract c, so qc e Qc. Also, if the operator does not serve a c ∈ UC, then qc ) 0, so
qc e zcQc c ∈ UC
(9)
Now, the actual storage volume assigned to c ∈ UC during p is
qcp )
∑ vscp
c ∈ UC, p ∈ Pc
(10)
s∈Sc
qcp must equal qc in every p in which the operator serves c ∈UC, otherwise it should be zero. We enforce this with the following three constraints
∑ vscp + (1-ycp)Qc g qc
c ∈ UC
(11a)
s∈Sc
∑ vscp e qc
c ∈ UC
(11b)
s∈Sc
∑ vscp e ycpQc
c ∈ UC
(11c)
s∈Sc
Qc )
∑
vscp c ∈ CC
(11d)
s∈Sc
A tank may be suitable for storing several contracts, and it can hold different and several contracts over time. However, there will be no change in its contract within each individual period. To model the changeovers of contracts in a tank s from a period p to (p + 1), we define the following 0-1 continuous transition variable
{
1 if tank s holds a c during p and c′ during (p + 1) Xscc′p ) 0 otherwise
0ep vscp, then the tank holdup increases at time tp, and the operator incurs a cost for pumping that much holdup into the tank. Similarly, if vsc(p+1) < vscp, then the holdup decreases, and the operator incurs the cost of pumping that much chemical out of the tank at time tp. At the start of a contract, only pump-in would occur, while at the end, only pump-out. However, at intermediate times, both pump-in and pump-out may occur. Furthermore, at these times, whatever the operator pumps out must be pumped into one or more other tanks to keep the actual storage for c constant, but the cost for both would be the same. For the discharging tank, it would be a pumpout cost, while for the receiving tank, it would be a pump-in cost. To compute the costs of pump-ins and pump-outs, we define two non-negative continuous variables vinscp and voutscp to denote the amounts of pump-in and pumpout respectively for a c during p for tank s. Clearly
vinscp g vsc(p+1) - vscp c * 0; p, (p + 1) ∈ Pc
(16a)
voutscp g vscp - vsc(p+1) c * 0; p, (p + 1) ∈ Pc
(16b)
Note that we define the above for psc < p < pec only. At STc and ETc, we know what pump-ins and pump-outs should occur, respectively. Now, if PCc is the pumping
7440
Ind. Eng. Chem. Res., Vol. 44, No. 19, 2005
cost in mu/vu for c, then we obtain the total pumping cost TPCc for a c as
[
TPCc ) PCc qc +
cleaning cost (mu) for method
1 2
∑s {vsc(ps ) + vsc(pe ) +
∑
c
c
]
(vinscp + voutscp)}
p,(p+1)∈Pc
[
TPCc ) PCc 2Qc +
1 2
∑s ∑
c ∈ UC (17a)
(vinscp + voutscp)
p,(p+1)∈Pc
]
c∈ CC (17b)
where the division by two is to eliminate the double counting of pumping costs. Equation 17a takes care of four scenarios. When a c ∈ UC begins in period psc and ends in pec, then the v terms in eq 17a contribute 2qc making it equivalent to eq 17b. When c neither begins in psc nor ends in pec, both v terms are zero. In this case, the vin and vout terms contribute 2qc via the initial pump-in and final pump-out of c. This again makes eq 17a equivalent to eq 17b. If c does not begin (end) in psc, then one of the two v terms is zero and the other is qc. In this case, the vin and vout terms contribute qc via the final pump-out (initial pump-in) of c. Again, eq 17a becomes similar to eq 17b. Using eqs 13, 14, 15, and 17, we obtained the gross profit (GP) of the operator
Maximize GP )
∑ TRc - ∑s TOCs - ∑s TCCs ∑ TPCc c∈C
c∈C
(18)
If tank cleanings are independent of the sequence in which contracts use the tank, then we can eliminate the 4-index variable Xscc′p and replace it by a 3-index 0-1 continuous variable Xscp. In this case, we can replace eqs 13a and b and 16 by
Xscp g xscp - xsc(p+1) c * 0, p∈ Pc P
TCCs )
Table 1. Tags, Capacities, and Cleaning Costs for the 27 Tanks in Example 1
∑
∑
CCscXscp
(12c) (15a)
p)0c∈Cs3p∈Pc,c * 0
The use of eqs 12c and 15a in place of eqs 12a and b and 15 seems to reduce the computation time considerably by reducing the number of variables and constraints substantially. This completes our multiperiod MILP formulation that maximizes GP (eq 18 with substitutions from eqs 13, 14, 15 or 15a, and 17) subject to eqs 1-3, 4a, 5-9, 11, 12a, b, or c, and 16. We now illustrate the use of our model with an example. 5. Example 1 A chemical logistics and storage terminal has 27 tanks with a total storage capacity of 879 vu as shown in Table 1. Table 1 also shows the tank tags and the cost of tank cleaning for various methods. The tanks possess varying characteristics and are suitable for storing several different chemicals. Presently (time zero), the terminal is serving 18 existing contracts (CC ) {c1 to c18}) and awaiting six confirmed contracts (CC ) {c19 to c24}). However, it anticipates 16 potential
tank tag
capacity (vu)
CM1
CM2
CM3
T10-(1-3) T12-(1-3) T15-(1-3) T16-(1-3) T20-(1-3) T30-(1-3) T40-(1-3) T50-(1-3) T100-(1-3)
10 12 15 16 20 30 40 50 100
148.6 148.6 180.8 180.8 218.0 255.1 287.4 324.5 649.1
297.2 297.2 361.6 361.6 436.0 510.2 574.8 649.0 1298.2
25.4 25.4 28.2 30.0 31.4 37.7 44.5 51.5 80.0
contracts (UC ) {c25 to c40}) over the next year. While Figure 1 shows the timelines of all contracts graphically, Table 2 lists their details, such as the requested storage volumes, requested durations, revenues, fixed operating costs, variable operating costs, types of cleaning methods, etc. Table 3 lists the set of tanks suitable for each contract. We assume that the fixed and variable operating cost parameters of tanks are independent of tanks and depend on contracts only. The operator wishes to decide which potential contracts to accept/reject and how to allocate tanks to various contracts over time. By gathering all the requested or confirmed start/end times from Table 2 and ordering them chronologically, we identified 39 periods of different lengths as in Table 4. We implemented our formulation in GAMS 2.25.0872 on a DELL GX 270 (2.8 GHz Pentium IV Dual-CPU, Windows XP, 1 GB RAM) workstation and used the CPLEX 8.1 solver in GAMS. Note that the simplification of the formulation using eqs 12c and 15a is not applied. Table 5 lists the details of servicing of the unconfirmed contracts, while Figure 2 gives the details of all contracts and their tank allocations. The maximum profit is 151 383.95 mu. The model has 125 239 binary variables, 46 313 continuous variables, 34 270 constraints, and 334 847 nonzeros. The solution required 8069 s, 255 nodes, and 534 936 iterations. From Table 5, we see that the optimizer rejects only two of the unconfirmed contracts, namely c34 and c36. A contract is rejected because either the contract is unprofitable or all suitable tanks are occupied and reallocation is not possible. The optimizer rejects c34, even though TK12 is available during its service duration, because the contract is unprofitable. The same reasoning goes for the rejection of c36. Even among the unconfirmed contracts that the optimizer selects, it serves many partially either in terms of duration or storage volume. Contracts c26, c27, c29, c32, c35, c38, and c39 are all assigned less storage volumes than was requested because larger tanks are unavailable and reallocation of existing contracts is not possible. On the other hand, c25, c26, c27, c28, c30, c31, and c35 are all assigned shorter durations than requested. For instance, contract c27 is offered shorter duration because it can only begin using TK25 after c7 has finished its contract term, since other alternative tanks are unavailable and reallocation is not possible. Accordingly, c26, c27, and c35 are assigned both partial volumes and shorter durations. The facility usage plan of Figure 2 also shows some interesting decisions of allocating tanks to contracts. While most contracts are assigned single tanks, some are assigned multiple tanks (e.g., five to c28 and c39, two to c26, etc.). Note that the operating cost component of the objective function minimizes the number of tanks
Ind. Eng. Chem. Res., Vol. 44, No. 19, 2005 7441
Figure 1. Timelines of contracts in Example 1. Table 2. Contract Details for Example 1 operating cost parameters contract c
type
start time (day)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old Old New New New New New New New New New New New New New New New New
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 70 45 70 98 55 30 104 187 212 123 265 165 167 283 275 300 240 320 170 140 125 260
end time (day)
storage request (vu)
365 98 210 196 100 365 270 123 365 120 150 200 30 365 40 85 365 280 314 365 240 170 290 180 365 365 365 365 310 290 290 365 365 365 365 365 350 365 250 345
10 27 96 20 34 40 110 15 47 20 10 16 35 24 16 16 20 10 40 86 30 12 36 50 30 45 130 116 30 10 15 60 46 88 145 75 36 20 162 10
used by a contract. In other words, if a single tank is available and able to hold a contract, then the optimizer does not use multiple tanks, except to accommodate new contracts. While the tank allocations for most contracts (e.g., c1, c7, etc.) do not change over time, there are several instances of tank reallocations in Figure 2. For instance, c6 first uses TK20 during [0, 70], uses TK9 and TK18 during [71, 180], and then uses TK22 during
cleaning method
revenue (mu/vu/day)
fixed (mu/day)
variable (mu/vu/day)
CM1 CM1 CM1 CM3 CM1 CM2 CM3 CM3 CM1 CM3 CM3 CM1 CM1 CM1 CM1 CM2 CM1 CM2 CM2 CM1 CM3 CM2 CM1 CM3 CM3 CM1 CM3 CM1 CM3 CM3 CM3 CM1 CM1 CM2 CM3 CM1 CM1 CM2 CM2 CM1
1.50 2.15 2.16 1.88 1.14 2.10 0.94 1.03 1.94 0.95 1.67 1.05 0.94 1.07 1.77 0.95 1.95 1.52 0.98 0.96 1.02 2.10 1.89 2.13 1.57 1.93 0.97 0.97 1.68 1.52 1.12 1.87 1.55 1.10 1.94 2.15 1.15 1.53 1.79 1.65
1.50 5.80 16.76 3.76 3.87 8.40 6.12 1.55 9.12 1.90 1.67 1.68 3.29 2.57 2.83 1.52 3.90 1.52 3.92 7.29 3.26 2.10 6.80 11.75 4.71 8.69 7.21 1.55 5.04 1.52 1.68 11.22 7.13 8.68 14.05 16.13 4.14 3.06 2.17 1.65
0.15 0.58 1.68 0.38 0.39 0.84 0.61 0.16 0.91 0.19 0.17 0.17 0.33 0.26 0.28 0.15 0.39 0.15 0.39 0.73 0.33 0.21 0.68 1.18 0.47 0.87 0.72 0.16 0.50 0.15 0.17 1.12 0.71 0.87 1.41 1.61 0.41 0.31 0.22 0.17
[181, 365]. The first switch occurs to accommodate c19, while the second occurs to accommodate c25. Interestingly, TK9 is idle after day 180, but the optimizer still shifts c6 from TK9 to TK22. This is because our operating cost model assumes a fixed operating cost for each tank used, which makes it more profitable to use one tank instead of two. Likewise for c21, it first uses TK24 during [71, 125] and switches to use TK16 during
7442
Ind. Eng. Chem. Res., Vol. 44, No. 19, 2005
Table 3. Tanks Suitable for Storing Contracts in Example 1 c
tanks suitable for storage
1 2 3 4 5 6 7
T10-2, T12-2, T15-2, T16-3, T30-3, T40-3, T100-3 T12-1, T15-3, T20-1, T30-1, T30-3, T40-2, T50-1, T50-2, T100-3 T12-1, T15-3, T20-1, T30-1, T30-3, T40-2, T50-1, T50-2, T100-3 T15-3, T20-3, T40-1, T50-1 T12-3, T20-2, T40-1, T50-1 T12-1, T15-3, T20-1, T30-1, T30-3, T40-2, T50-1, T50-2, T100-3 T10-1, T12-1, T15-1, T16-1, T16-2, T20-1, T20-2, T30-1, T40-2, T50-2, T50-3, T100-1 T15-1, T16-3, T30-2, T50-2, T100-1 T12-1, T20-1, T30-1, T40-2, T50-2 T10-1, T12-1, T15-1, T16-1, T16-2, T20-1, T20-2, T30-1, T40-2, T50-2, T50-3, T100-1 T10-3, T12-3, T30-2, T100-2 T15-1, T16-3, T30-2, T50-2, T100-1 T10-1, T12-1, T15-1, T16-1, T16-2, T20-1, T20-2, T30-1, T40-2, T50-2, T50-3, T100-1 T15-1, T16-3, T30-2, T50-2, T100-1 T16-1, T40-3, T50-3 T10-1, T12-1, T15-1, T16-1, T16-2, T20-1, T20-2, T30-1, T40-2, T50-2, T50-3, T100-1 T12-1, T20-1, T30-1, T40-2, T50-2 T10-2, T12-2, T15-2, T16-3, T30-3, T40-3, T100-3 T10-1, T12-1, T15-1, T16-1, T16-2, T20-1, T20-2, T30-1, T40-2, T50-2, T50-3, T100-1 T10-3, T12-3, T30-2, T100-2 T10-1, T12-1, T15-1, T16-1, T16-2, T20-1, T20-2, T30-1, T40-2, T50-2, T50-3, T100-1 T12-1, T15-3, T20-1, T30-1, T30-3, T40-2, T50-1, T50-2, T100-3 T16-1, T40-3, T50-3 T12-1, T15-3, T20-1, T30-1, T30-3, T40-2, T50-1, T50-2, T100-3 T10-2, T12-2, T15-2, T16-3, T30-3, T40-3, T100-3 T12-1, T20-1, T30-1, T40-2, T50-2 T10-1, T12-1, T15-1, T16-1, T16-2, T20-1, T20-2, T30-1, T40-2, T50-2, T50-3, T100-1 T10-1, T12-1, T15-1, T16-1, T16-2, T20-1, T20-2, T30-1, T40-2, T50-2, T50-3, T100-1 T10-3, T12-3, T30-2, T100-2 T10-2, T12-2, T15-2, T16-3, T30-3, T40-3, T100-3 T15-1, T16-3, T30-2, T50-2, T100-1 T15-3, T20-3, T40-1, T50-1 T10-2, T12-2, T15-2, T16-3, T30-3, T40-3, T100-3 T15-1, T16-3, T30-2, T50-2, T100-1 T12-1, T20-1, T30-1, T40-2, T50-2 T12-1, T15-3, T20-1, T30-1, T30-3, T40-2, T50-1, T50-2, T100-3 T12-3, T20-2, T40-1, T50-1 T10-2, T12-2, T15-2, T16-3, T30-3, T40-3, T100-3 T10-1, T12-1, T15-1, T16-1, T16-2, T20-1, T20-2, T30-1, T40-2, T50-2, T50-3, T100-1 T10-3, T12-3, T30-2, T100-2
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
[126, 240]. The switch is to accommodate incoming contract c39. These two instances clearly illustrate the advantage of dynamic tank shifting to accommodate new contracts. 6. Alternate Formulation The model presented earlier required 8069 s of CPU time for a 27 tank, 40 contract example. Existing storage terminals may employ more than 100 tanks and could have several tens of contracts. Let us see how we can improve the solution efficiency of the model by making some simplifying assumptions that are quite reasonable in practice. However, these assumptions do prevent this alternate model from being an exact reformulation of the first model. First, note that tank switching is not common in Figure 2, because it involves cost. Consider the two cases in which the optimizer changes tanks for contracts c6 and c21. The optimizer does this to accommodate contract c19 in the first case, and contract c39 in the second. In both cases, a contract begins somewhere in the facility. It makes sense to say that the optimizer will have an incentive to switch a tank for a
Table 4. Periods, Their Start Times, and Lengths in the Original and Modified Models for Example 1 example 1
example 1a
period p
start time (day)
length (day)
start time (day)
length (day)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
0 30 40 45 55 70 85 98 100 104 120 123 125 140 150 165 167 170 180 187 196 200 210 212 240 250 260 265 270 275 280 283 290 300 310 314 320 345 350
30 10 5 10 15 15 13 2 4 16 3 2 15 10 15 2 3 10 7 9 4 10 2 28 10 10 5 5 5 5 3 7 10 10 4 6 25 5 15
0 30 45 55 70 98 104 123 125 140 165 167 170 187 212 240 260 265 275 283 300 320
30 15 10 15 28 6 19 2 15 25 2 3 17 25 28 20 5 10 8 17 20 45
Table 5. Unconfirmed Contracts and Their Storage/Time Allocations from the Two Formulations for Example 1
contract (c ∈ UC) 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
storage volume (vu/vu) allotted/ requested by model M1 M2 M2-1 30/30 42/45 100/130 116/116 12/30 10/10 15/15 20/60 46/46 0/88 40/145 0/75 36/36 15/20 117/162 10/10
30/30 40/45 100/130 116/116 12/30 10/10 15/15 20/60 46/46 0/88 0/145 0/75 36/36 15/20 86/162 10/10
0/30 0/45 0/130 116/116 30/30 10/10 0/15 60/60 46/46 0/88 0/145 0/75 36/36 0/20 0/162 10/10
service duration (day/day) allotted/ requested by model M1 M2 M2-1 185/261 125/178 95/153 115/242 45/45 65/125 90/123 82/82 90/90 0/65 51/125 0/45 180/180 225/225 125/125 85/85
261/261 178/178 90/153 125/242 45/45 63/125 78/123 82/82 90/90 0/65 0/125 0/45 180/180 225/225 115/125 85/85
0/261 0/178 0/153 242/242 45/45 125/125 0/123 82/82 90/90 0/65 0/125 0/45 180/180 0/225 0/125 85/85
contract, only when it wants to accommodate a new contract. In fact, Figure 2 has no situation in which a tank switch occurs, when a contract terminates. In a practical situation, even when a contract finishes, the operator has minimal incentive to switch tanks for another contract, unless it wants to make room for another new contract. Thus, we can safely assume that
Ind. Eng. Chem. Res., Vol. 44, No. 19, 2005 7443
Figure 2. Facility usage plan for Example 1 from M1.
no tank switch should occur at a time when it is not possible for a new contract to start. If a contract finishes at some time and no new contract can start at that time, then we can simply assume that the ending contract simply continues to use those tanks at no additional charge. In reality, the tanks would be just empty. The main conclusion of this entire discussion is that we need not define new periods, when contracts end. New periods should only begin, when contracts could start. In other words, both STc and ETc should not trigger new periods, only the former should. This could reduce the number of periods drastically almost by a half and reduce the binary variables considerably in the model, making the model easier to solve. Let us now see how we can modify our model to exploit this new simplification. First, we revise our strategy of period formation. Earlier, we gathered all start and end times of contracts to form periods. Now we gather only the start times STc. However, for continuity, we keep the same notation. In other words, we still have p ) 1, 2, ..., P periods. In contrast to the first model, where contracts always end at period boundaries, now some may end within periods. In other words, a contract may not utilize its last period fully. To accommodate this situation, we define ∆tpc as the time for which a contract c requests the use of a period p. For all except the last period (pec), ∆tpc ) tp t(p-1) for each c. Once we identify the periods, we can easily compute ∆tpc for all p ∈ Pc for each c. Now, we simply use ∆tpc in place of tp - t(p-1) in eqs 13 and 14 to get
TR )
∑ Rc∆tpcs∈S ∑ vscp
p∈Pc
TR )
c ∈ UC
(13c)
c
∑ Rc∆tpcQc
c ∈ CC
(13d)
p∈Pc
TOCs )
∑p ∑
(c∈Cs)3p∈Pc
∆tpc[FOCscxscp + VOCscvscp] (14a)
Thus, the new model uses eqs 13c and d and 14a ins place of eqs 13a and b and 14. Except for these changes, all other elements of the entire model remain the same. However, because it has fewer periods and binaries, this model should be much faster than the original model. We revisit Example 1 with the new model to show its performance relative to that of the original model. 7. Example 1a Let us call the original or first model M1 and the new model M2. By gathering all the requested or confirmed start times and ordering them chronologically, we get 22 periods for M2 (Table 4) as compared to 39 for M1. Table 6 lists ∆tpc for the last periods of contracts. Using the same solver (GAMS/CPLEX 8.1) on the same workstation, M2 required only 1437 s instead of 8069 s for M1, so it is much faster than M1 and more suited for solving larger industrial problems. Note that we did not apply the simplification of the formulation using eqs 12c and 15a. M2 required 74 509 binary variables, 26 719 continuous variables, 19 654 constraints, 196 501 nonzeros, 310 nodes, and 144 007 iterations. In contrast to M1, this represents reductions of 40.5% in binary variables, 42.3% in continuous variables, 42.6% in constraints, 41.3% in nonzeros, and 73.1% in iterations. These all contribute to the significant reduction of 82.2% in solution time for M2 vs M1. Table 7 gives a comparison of the statistics of M1 and M2. However, the gain in the efficiency of M2 comes at the expense of profit. M2 gives a lower maximum profit of 150 642.64 mu vs 151 383.95 mu for M1 and exhibits a slightly lower integrality gap of 2.38% vs 2.91% for M1. The reason for an inferior solution is obvious. M2 uses fewer periods than M1, hence it offers less flexibility and may give an inferior solution. However, in this example, the difference between the two solutions is not great and hence the faster solution from M2 can
7444
Ind. Eng. Chem. Res., Vol. 44, No. 19, 2005
Table 6. Start and End Periods of Contracts and Their Actual Usage Durations, ∆tpc, in Their Last Periods for Example 1a
Table 8. Comparison of Results for Unconfirmed Contracts
contract (c)
start period (psc)
end period (pec)
duration (∆tpc, day)
contract (c ∈ UC)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 5 3 5 6 4 2 7 14 15 8 18 11 12 20 19 21 16 22 13 10 9 17
22 5 14 14 6 22 18 7 22 7 10 14 1 22 2 5 22 19 21 22 15 12 20 13 22 22 22 22 21 20 20 22 22 22 22 22 22 22 16 22
45 28 23 9 2 45 5 19 45 16 10 13 30 45 10 15 45 5 14 45 28 3 7 10 45 45 45 45 10 7 7 45 45 45 45 45 30 45 10 25
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
Table 7. Comparison of Statistics for the Three MILP Models binary variables continuous variables constraints nonzeros nodes iterations CPU time (s) RMIP objective MIP objective RMIP gap (%)
M1
M2
M2-1
125 239 46 313 34 270 334 847 255 534 936 8069 155 790.50 151 383.95 2.91
74 509 26 719 19 654 196 501 310 144 007 1 437 154 223.09 150 642.64 2.38
74 166 26 075 18 934 192 210 49 203 30 291 402 150 952 142 973.10 131 384.61 8.82
be equally acceptable. Table 5 compares the details of unconfirmed contracts for the two models, while Figure 3 gives the details of all contracts and the tank allocations of M2. Table 5 shows that c26 and c39 are offered less storage volume because of the unavailability of larger tanks or extra suitable tanks. Other contracts c27, c30, and c31 are allotted shorter storage duration compared to M1. For instance, in TK25, contract c7 ends within a period and the next contract c27 cannot commence occupying the tank immediately but only at the start of the next period. Since each period is defined by the contracts’ start times only, any contract that ends within a period will result in an empty tank until the
storage volume (vu/vu) allotted/requested M1 PAT CAT 30/30 42/45 100/130 116/116 12/30 10/10 15/15 20/60 46/46 0/88 40/145 0/75 36/36 15/20 117/162 10/10
30/30 42/45 100/130 52/116 0/30 10/10 15/15 60/60 40/46 0/88 0/145 75/75 36/36 20/20 12/162 10/10
30/30 42/45 0/130 52/116 12/30 10/10 15/15 60/60 46/46 0/88 0/145 75/75 36/36 20/20 52/162 10/10
service duration (day/day) allotted/requested M1 PAT CAT 185/261 125/178 95/153 115/242 45/45 65/125 90/123 82/82 90/90 0/65 51/125 0/45 180/180 225/225 125/125 85/85
261/261 115/178 95/153 242/242 0/45 80/125 123/123 82/82 75/90 0/65 0/125 45/45 180/180 165/225 80/125 85/85
261/261 115/178 0/153 242/242 45/45 80/125 123/123 82/82 75/90 0/65 0/125 45/45 180/180 165/225 70/125 85/85
next period. This results in a waste of resources and loss of profit. Similarly for both c30 and c31 in TK27 and TK12, respectively, the earlier contracts c3 and c12 end within a period, hence c30 and c31 can only start using the tanks at the beginning of the next period. In addition, while c34 and c36 are rejected in both M1 and M2, contract c35 is not accepted in M2 because all the tanks suitable for c35 are occupied at the time of service and reallocation is not possible. Although some contracts (c25, c26, and c28) are offered longer durations than those in M1, the loss in profits from both the smaller volume and the shorter duration contracts allotted, still outweigh the gain in profit from longer duration contracts. From the facility usage plan in Figure 3, there are also a few contracts allotted multiple tanks for storage (e.g., five to c28, three to c39, etc.). We also observe reallocation of tanks for c2, c6, and c21. For instance, c6 first uses TK20 during [0, 187] and uses TK22 during [188, 365] to accommodate c26 in TK20. In the same way, c21 first uses TK24 during [71, 125], then switches to TK7 and TK10 during [126, 240] to accommodate c25. 8. Simpler Scenario In our discussion so far, we assumed that the operator had the freedom to offer partial service (both volume and duration) to a c ∈ UC. This flexibility allows the operator to know the extent to which a potential contract can be served. However, the customer may not agree to such flexibility. In other words, the customer may demand that the operator must serve the contract fully in both volume and duration, if it is accepted. This is often the case because it may cost more for the customer to engage two storage vendors. Clearly, this is a much simpler situation than the earlier one in which both storage volume and duration for a c ∈ UC were variable. The assumption that the operator cannot offer partial service to a c ∈ UC simplifies models M1 and M2 considerably. We now detail this simplification. First, we need not decide if the operator should serve a c ∈ UC in a given period. The operator serves either all the requested periods or none, therefore we do not need the ycp, yscp, and yecp variables any more. Moreover, zc variables now cannot include the possibility of a partial acceptance, so they must model the full acceptance or rejection of a c ∈ UC. With these, eqs 3a
Ind. Eng. Chem. Res., Vol. 44, No. 19, 2005 7445
Figure 3. Facility usage plan for Example 1 from M2.
and b, 4a and b, 5, 6a and b, 7, and 8 all disappear. Instead, we get
zc g xscp c ∈ UC, s ∈ Sc zc e
∑ xscp
(3c)
c ∈ UC
(3d)
s∈Sc
Note that zc is still a 0-1 continuous variable. Second, we do not need the qc variable any more, because the operator provides either full storage Qc or zero. Thus, we do not need eqs 9, 10, and 11a-c any more, and eq 11d for c ∈ UC becomes
∑ vscp
zcQc )
c ∈ UC
(11e)
s∈Sc
The computation of the scheduling objective also simplifies considerably. For instance, in place of eq 13a, we get
TR )
∑ Rc(tp - tp-1)Qczc
c ∈ UC
(13c)
p∈Pc
While eqs 14, 15, 16a and b, and 18 remain unchanged, we can replace eq 17a by
[
TPCc ) PCc 2Qczc +
1 2
∑s ∑
(vinscp + voutscp)
p,(p + 1)∈Pc
]
c ∈ UC (17c)
This completes our formulation for the simpler scenario. It is composed of eqs 1, 2, 3c and d, 11d and e, 12a, b, orc, 13b and c, 14, 15 or 15a, 16a and b, 17b and c, and 18. 8.1 Revisit Example 1a We solved Example 1a again for the simpler scenario using the same software and hardware. We call this
model, used in Example 1a, M2-1. We did not solve Example 1 for a reason, which we discuss later. Figure 4 and Table 5 give the final tank-allocation plan and contract selection details, respectively. For Example 1a, the optimizer gave a maximum profit of 131 384.61 mu and rejected nine contracts (c25, c26, c27, c31, c34, c35, c36, c38, and c39). As expected, because of the less flexible nature of M2-1, the profit is lower and the optimizer rejects nine contracts as compared to two for M2. The simpler M2-1 model used 74 166 binary variables, 26 075 continuous variables, 18 934 constraints, and 192 210 nonzeros. It required 49 203 nodes, 30 291 402 iterations, and 41.93 h of CPU time. For a relatively simpler and smaller model, it is surprising to see the tremendous increase in solution time compared to that of M2. The reason is that the simplified model has a higher gap because of the fully integral nature of its decisions. In contrast to M2-1, M2 allowed partial service of orders, which makes it easy to accept contracts. Thus, its decisions are more continuous in nature and reduce the integrality gap. This is clear when we compare the model statistics of M1, M2, and M2-1 in Table 7. The integrality gap for M2-1 is 8.82%, which is larger than those for M2 and M1. This confirms that the problem addressed by M2-1 is inherently more difficult. This is why we did not solve Example 1 using the simpler model. Table 5 shows that all accepted contracts get their requested storage volumes and durations. From the facility usage plan in Figure 4, a few contracts are allotted multiple tanks (e.g., four to c28, two to c32, etc.). Reallocation of tanks occurs for c6, c14, and c21. In practice, a storage and terminaling facility may have a few hundred tanks and tens of contracts for selection and allocation. The models presented earlier are unable to solve such a problem even with the best MILP software available today. In many cases, a 3PL company needs to answer a request-for-quote (RFQ) as
7446
Ind. Eng. Chem. Res., Vol. 44, No. 19, 2005
Figure 4. Facility usage plan for Example 1 from M2-1.
quickly as possible, mostly in a matter of minutes or hours. Thus, a fast and efficient substitute to the MILP models presented earlier becomes essential. We now present two heuristic algorithms and compare their performances against M1 for Example 1. 9. Heuristic Methods We propose two heuristics that select and allocate contracts in three main steps: (1) generate periods and initialize the plant state, (2) assign tanks to all of the confirmed contracts, and (3) select unconfirmed contracts according to their profitability and allocate storage (fully or partially). The main difference between the two heuristics is Step 3, which one heuristic does one period at a time, while the second does one contract at a time. We now describe each step in more detail in the context of each heuristic. Since the first two steps are the same for both heuristics, we describe them only once. Since the two heuristics mainly differ in the selection process of unconfirmed contracts and assign tanks to contracts repeatedly, we first describe a common procedure for allocating tanks to a given contract. 9.1. Tank Allocation Procedure. We use this procedure only for the new contracts entering the facility. Once they assign a tank to a contract, both heuristics attempt to continue keeping that contract in the same tank. For any contract c, we consider only the suitable and available tanks and allocate tanks on the basis of their sizes. While we assign full storage to all confirmed contracts, the unconfirmed contracts begin only when tanks become available and need not receive the full requested storage or duration. The steps described below apply to a given contract c, to which tanks are to be assigned at certain steps of the two heuristics. Step 1. Assign a Single Free Tank. Determine if we can meet the unassigned space request for contract c by a single free tank for the entire requested duration.
If so, assign the smallest possible free tank to contract c. The rationale for this is that multiple smaller tanks will incur higher fixed operating costs, and possibly higher cleaning and maintenance costs. Confirm all the tank allocations for this contract and exit the tank allocation procedure. If no single tank can hold the unassigned storage for the contract or there is no single tank free, then contract c needs more tanks, proceed to Step 2. Step 2. Assign Multiple Free Tanks (for CC). If no suitable tank is available for the entire required duration, proceed to Step 3. Otherwise, assign the largest possible free tank and reduce the contract’s unassigned storage request by the capacity of the assigned tank. Repeat Step 1. Step 2. Assign Multiple Free Tanks (for UC). If no suitable tank is available for any interval of the required duration, go to Step 3. Otherwise, assign the largest possible free tank for the longest possible duration of the contract. The new duration required for the contract would be the time allocated to the contract for this free tank. Repeat Step 1, with the contract’s new required duration. Note that multiple tanks allocated to the same contract should start and end at the same time. Step 3. Switch Single Tank. Dtermine if we can meet the unassigned space request for contract c by a single tank that is serving another contract. If so, consider all possible tanks that could serve contract c but are serving other contracts. Examine these tanks one by one in the increasing order of size. For a given tank, check if it is possible to switch the current contract in the tank under examination to one or more available tanks using Steps 1 and 2 without allowing the tank switching. If successful, then assign the current tank to contract c, confirm all tank allocations, and exit the tank allocation procedure. If even the tank switching fails to meet the space demand for a confirmed contract
Ind. Eng. Chem. Res., Vol. 44, No. 19, 2005 7447
fully, then we conclude that the facility is unable to serve its obligation. If the same happens for an unconfirmed contract, then we conclude that the facility cannot accommodate this contract fully. Therefore, the amount of storage allocated would be the summation of all storage allocated so far for this contract. With the above tank allocation procedure, we now describe the two heuristics. 9.2. Heuristic 1. Period-At-a-Time (PAT). This heuristic proceeds one period at a time. It gives priority (assigns storage first) to confirmed contracts, as the company is obligated to serve them. For selecting unconfirmed contracts, allocation is done in a periodby-period fashion, using a rough profit guide. Step 1. Identify the various periods as before. Initialize all tanks to be empty. Step 2. Consider each confirmed contract one by one in the decreasing order of requested storage space and assign tanks using the tank allocation procedure for the entire duration of each contract. For contracts that continue at time zero, assign them their respective current tanks. Note that these tank allocations might change later, if any tank switches occur during the subsequent steps of the algorithm. Step 3. Compute a profit guide for each unassigned unconfirmed contract c in period p as
[
PRcp ) LpQc Rc -
∑ s∈ST
(
c
)]
FOCsc + VOCscQc |STc|Vs
(18)
where |STc| is the number of tanks suitable for contract c. Initialize period p ) 1. Step 4. If no unconfirmed contract starts in period p, then go to Step 5. Otherwise, consider one-by-one in the decreasing order of the profit guide, each unconfirmed contract c that begins in period p. Use the tank allocation procedure to allocate tanks to contract c for the longest possible duration. If the tank allocation procedure fails to assign a tank, then we compare PRcp with those of the unconfirmed contracts in all the suitable tanks. If the profit of the occupant with the lowest profit is lower than that of contract c, then we terminate the occupant contract and store the new contract in the tank. On the other hand, if PRcp is lower than those of the occupants, then we reject the new contract. Once we accept a contract, we assign the tanks using the tank allocation procedure. Similarly, once we terminate a contract, then we remove it totally from further consideration. Step 5. If p is the last period in the horizon, then stop. Otherwise set p ) p + 1 and return to Step 4. Clearly, eq 18 gives only a rough profit guide for several reasons. First, it ignores the cleaning and pumping costs. We could not include these costs, because predicting cleaning costs a priori (as they depend on the types of tanks and tank switching) is not possible and counting pumping costs in each period is inappropriate. A contract with a high profit guide may have high cleaning and pumping costs. For instance, as we see later for Example 1, c34 has a positive profit guide in each period, but negative actual profit after we consider the cleaning and pumping costs. Second, eq 18 assumes a single hypothetical tank for each contract, uses an average estimated operating cost for that tank, and uses requested storage volume. In reality, a contract
may use multiple tanks with varying operating costs and may be allotted storage lower than the requested amount. 9.2.1. Illustration of PAT. We apply PAT to Example 1 and illustrate a few key steps. First, we allocate their respective tanks to the contracts continuing at time zero. We now proceed to allocate storage tanks to each of the confirmed contracts. We start the allocation with c20 because it has the largest storage demand of 86 vu. We are able to meet this demand with TK26, and so, we allocate TK26 to c20 and exit the tank allocation procedure. Next, we use eq 18 to compute the profit guides (PRcp) for all unconfirmed contracts. The earliest unconfirmed contract (c25) begins at t9, so we start the allocation from period 10. Since only one contract begins at t9, we allocate tanks to c25 using the tank allocation procedure. No contracts begin at t10, so we move to period 12, where only one contract (c28) starts. This contract requests a storage of 116 vu from p12-22. Since no single tank can hold this contract fully, we move to Step 2 of the tank allocation procedure. The largest suitable and available tank is TK14 with a capacity of 20 vu, so we assign TK14 to c28 for periods 12-22, since we always try to assign the longest possible duration to each contract. If another contract is seems more profitable than c28 later, then we will terminate c28. Then, we repeat Step 1 of the tank allocation procedure. After a few repetitions of Steps 1 and 2, we assign TK10, TK11, and TK14 to c28, but 64 vu of storage remains unassigned, as no tanks are available. We now proceed to Step 3 of the tank allocation procedure to see if we can switch a tank. The largest available tank is TK25, but it is not possible to shift c20 to any other tanks. Therefore, we examine the next smaller tank for a possible switch. However, no tank switch is possible, so we exit the tank allocation procedure and conclude that we can serve c28 with partial storage of 52 vu only. We now proceed to the next period (13) and repeat the process, until we reach period 39 or the last period in the planning horizon. For some contracts, all the steps in the tank allocation procedure fail. For instance, we find that no single or multiple tanks are free to accommodate the 145 vu request of c35 for the required duration from periods 25-39. So, we proceed to Step 3 of the tank allocation procedure. After examining all the suitable tanks TK4, TK13, TK16, TK20, and TK23, we find that it is not possible to switch their occupants to other tanks. Therefore, we then compare its profit margin with those of other contracts and find that its profit margin is lower than those of others. Hence, we reject c35. PAT rejects c29, c34, and c35, assigns less-thanrequested storage to c26, c27, c28, c33, and c39, and assigns shorter-than-requested durations to c26, c27, c30, c33, c38, and c39. In all, four contracts (c26, c27, c33, and c39) get both partial storage and durations. In this example, only one tank switch occurs. Contract c2 switches from TK16 to TK18 to accommodate c21. Some contracts get multiple tanks. For instance, c7, c26, c32, and c38 get two tanks each, while c28 gets three. PAT generates a final profit of 137 749 mu, which is 9.0% lower than that from M1. Figure 5 shows the final facility usage plan. The main problem with PAT is that it prioritizes unconfirmed contracts on the basis of their profit guides in each period. This may lack an overall perspective for
7448
Ind. Eng. Chem. Res., Vol. 44, No. 19, 2005
Figure 5. Facility usage plan for Example 1 from PAT.
an unconfirmed contract, and thus can be myopic. The next heuristic (CAT) improves on this deficiency. 9.3. Heuristic 2. Contract-At-a-Time (CAT). In contrast to PAT, CAT selects unconfirmed contracts on the basis of a profit guide for the entire contract duration rather than each period separately. This should enable CAT to have a better overall picture, and it may obtain a better solution. Steps 1 and 2 of PAT and CAT are identical. Step 3. Compute an overall profit guide for each unconfirmed contract c as
[
PRc ) TcQc Rc -
∑ s∈ST
(
c
)]
FOCsc + VOCscQc |STc|Vs
(19)
where Tc is the requested length of contract c. Step 4. Consider all unconfirmed contracts one-byone in the decreasing order of PRc and assign tanks using the tank allocation procedure. If all tank allocation procedures fail, then reject the unconfirmed contract. 9.3.1. Illustration of CAT. We now apply CAT to Example 1. Since Steps 1 and 2 are the same for PAT and CAT, all the confirmed contracts get the same tanks initially. As noted earlier, these allocations will change, if any tank switches occur. Table 9 shows the profit guides for all unconfirmed contracts. Thus, we consider contracts in the order c38, c25, and so on. Contract c38 requests 20 vu from t13 to t21. Because it is not possible to use a single tank for this request, we proceed to Step 2 of the tank allocation procedure. We first assign TK12 with a capacity of 16 vu. Then, we repeat Step 1 again to allocate a tank to the remaining storage demand. Finally, we assign TK12 and TK8 to c38 for the entire contract duration and exit
Table 9. Overall Profit Guides of Unconfirmed Contracts for CAT in Example 1 contract (c ∈ UC)
profit margin
38 25 37 31 30 40 29 28 39 26 33 32 36 34 27 35
4637.54 4267.46 1950.19 1768.06 1693.26 1243.55 725.76 578.99 -493.31 -747.51 -2576.21 -6417.28 -10310.30 -12440.80 -78303.10 -131934.00
the tank allocation procedure. We repeat this process with c25, and so on until c35, which is the last contract in Table 9. In all, CAT rejects c27, c34, and c35, all with the lowest profit guides in Table 9, assigns less-thanrequested storage space to c26, c28, c29, and c39, and assigns shorter-than-requested durations to c26, c30, c33, c38, and c39. Two tank switches occur in this method. Contract c6 switches from TK20 to TK22 to accommodate c39 at day 180 and switches back to TK20 at day 250 to accommodate c32. Contract c2 switches from TK16 to TK18 to accommodate c21 at day 70. Six contracts get multiple tanks. For instance, c7, c26, c32, c33, and c38 get two tanks each and c28 gets three. Figure 6 shows the final facility usage plan, which gives a total profit of 139 629 mu. This is 7.8% lower than that of M1. 9.4. Analysis of Heuristics. The percent utilizations of unused facilities in the entire planning horizon are
Ind. Eng. Chem. Res., Vol. 44, No. 19, 2005 7449
Figure 6. Facility usage plan for Example 1 from CAT.
12.3%, 15.7%, and 17.3% for M1, PAT, and CAT, respectively. Thus, M1 clearly has the highest utilization. Interestingly, CAT gives a better profit, even though its utilization is the worst. This shows that selecting more contracts does not always mean higher profit. Significant differences do exist between the selections and allocations of the heuristics and M1. Most importantly, the heuristics reject fewer contracts and allocate more storage to some contracts. They fail to consider the profitability of a given contract as accurately as M1 does. This is why they give lower profits. Note that there might be instances where a contract is switched from one tank to another in the heuristics, but the switching cost is fictitious. For example, consider a case where tanks A, B, and C are suitable for storing a contract 1 and only tank A is suitable for a contract 2. If tanks A, B, and C are of the same storage capacity and a heuristic assigns tank A to contract 1, then to accommodate contract 2 at a later period, it would have to switch contract 1 to tank B, even though tank B was empty even when contract 1 entered the facility. In other words, if the heuristic had assigned tank B to contract 1 in the first place, the tank switching would be unnecessary, as tank A would be available for contract 2. Although this scenario does not occur in our example, it can happen in a practical situation. In such cases, we would ignore such fictitious switching costs. Alternately, one could develop a priority for tanks so that the more versatile tanks would be used preferentially over the less versatile. As discussed earlier, the profit guides (eqs 8 and 9) used for PAT and CAT have some drawbacks and improvements may be possible. For larger problems, the solutions from the heuristics could be much lower than the optimum. If one were to adopt the more stringent policy of no partial acceptance of contracts, then the
difference could be even greater. Therefore, further work in improving the quality of results from the heuristics or the efficiency of the MILP approach would be quite desirable. At present, however, M2 seems to be the best choice for solving this important logistics problem. It should also be possible to develop another procedure that would solve M2 repeatedly to get a very good solution for the more difficult problem of no partial acceptance of contracts. 10. Conclusion We have presented a new and important problem in third-party chemical logistics. Of the three multiperiod MILP formulations presented, M2 offers the best compromise in terms of quality and speed of solution. The heuristics perform nearly the same, but CAT would be a better choice than PAT. However, the loss in profit could be as high as 9%, if we use a heuristic such as PAT. This loss could be even larger for bigger facilities commonly found in practice. To our knowledge, the chemical 3PL industry does not use any optimization procedures for managing their storage facilities in practice. The facility manager usually makes decisions in a deal-when-you-face-it manner. In that sense, PAT could crudely mimic the manual procedure that a facility manager might use, but it would still be better. Clearly, M2 offers an attractive option for managing storage and terminaling facilities and could offer substantial improvements in profits in light of the intense competition that the chemical 3PL companies face in Asia and elsewhere. Switching of tanks is a critical issue in managing these facilities. Most 3PL companies avoid switching tanks for the fear of contamination. However, when a manager makes a tank allocation decision as and when
7450
Ind. Eng. Chem. Res., Vol. 44, No. 19, 2005
required over time, it is impossible to do it right for all time to come. Thus, there will definitely be scenarios in which the switching of tanks could make it possible to accommodate a contract that would otherwise not be accepted. This would represent a lost opportunity for a 3PL, and the models and heuristics in this paper would be quite useful for a facility with many short-term contracts. Our present formulation assumes that all tanks in the facility are available at all the time and none go out of service. In practice, storage facilities must do routine maintenance on tanks for safety, and hence, a tank may not be available throughout the entire planning horizon. As such, it is necessary to provide a flexible maintenance window for each tank. This would represent a practically useful extension of the present formulations. We are currently working on such an extension and hope to report it in future. Acknowledgment The authors wish to acknowledge the financial support for this work from The Logistics Institute-Asia Pacific, Vopak Logistics Asia Pte Ltd., and the Agency for Science, Technology and Research (A*STAR), Singapore, under SRP Grant No. 00221050030. The authors are also grateful to Vopak Logistics Asia Pte Ltd for its invaluable comments on and suggestions for this work. Nomenclature Indices c ) contracts s ) storage tanks p ) time periods Sets P ) time periods Pc ) time periods requested by contract c ST ) storage tanks STc ) tanks suitable for contract c CC ) confirmed contracts UC ) unconfirmed contracts C ) all contracts Cs ) contracts suitable for tank s Parameters Lp ) length of period p tp ) time at which period p ends ∆tpc ) time for which contract c requests storage in period p STc ) requested/confirmed start time of contract c ETc ) requested/confirmed end time of contract c Vs ) storage capacity of tank s Qc ) storage volume requested by contract c Rc ) expected revenue from contract c FOCsc ) fixed operating cost for tank s holding contract c VOCsc ) variable operating cost for tank s holding contract c
PCc ) pumping cost for contract c CCsc ) cleaning cost for tank s holding contract c TR ) total revenue TOCs ) total operating cost for tank s over the entire horizon TCCs ) total cleaning cost for tank s over the entire horizon TCCs ) total pumping cost for contract c GP ) total gross profit Variables qc ) storage volume assigned to contract c qcp ) storage volume assigned to contract c during period p xscp ) 1, if tank s holds contract c during period p, zero otherwise ycp ) 1, if operator serves unconfirmed contract c during period p, zero otherwise zc ) 1, if operator serves unconfirmed contract c partially or fully, zero otherwise yscp ) 1, if operator begins serving unconfirmed contract c at time tp, zero otherwise yecp ) 1, if operator ends serving unconfirmed contract c at time tp, zero otherwise Xscc′p ) 1, if tank s holds contract c during p and c′ during (p+1), zero otherwise vscp ) volume of contract c in tank s during period p vinscp ) volume of contract c pumped into tank s at the start of period p voutscp ) volume of contract c pumped out of tank s at the start of period p
Literature Cited (1) Bhatnagar, R.; Sohal, A. S.; Millen, R. Third Party Logistics Services: A Singapore Perspective. Int. J. Phys. Distribution Logistics Manage. 1999, 29, 569-587. (2) Brooke, A.; Kendrick, D.; Meeraus, A.; Raman, R. GAMS: A User’s Guide. GAMS Development Corporation: Washington, DC, 1998. (3) Choueiry, B. Y.; Faltings, B. Interactive Resource Allocation by Problem Decomposition and Temporal Abstractions. In Current Trends in AI Planning, Proceedings of the 2nd European Workshop on Planning, Frontiers in AI and Applications, Vadstena, Sweden 1993; Backstrom, C., Sandewall, E., Eds.; IOS Press: Amsterdam, The Netherlands, 1994. (4) Marchiori, E.; Steenbeek A. An Evolutionary Algorithm for Large Scale Set Covering Problems with Application to Airline Crew Scheduling. In Real-World Applications of Evolutionary Computing; Boers, E, Cagnoni, S., Go¨ttlieb, J., Hart, E., Lanzi, P., Raidl, G., Smith, R., Tijink, H., Eds.; Springer: New York, 2000; p 367. (5) Sohail, M. S.; Sohal, A. S. The Use of Third Party Logistics Services: A Malaysian Perspective. Technovation 2003 23, 401408.
Received for review February 9, 2005 Revised manuscript received June 22, 2005 Accepted July 13, 2005 IE0501632