An inventory model for deteriorating items with varying demand pattern and unknown time horizon

Article history: Received 24 June 2010 Received in revised form 22 August 2010 Accepted 23 August 2010 Available online 24 August 2010 The primary assumptions with many multi-period inventory lot-sizing models are fixed time horizon and uniform demand variation within each period. In some real inventory situations, however, the time horizon may be unknown, uncertain or imprecise in nature and the demand pattern may vary within a given replenishment period. This paper presents an economic order quantity model for deteriorating items where demand has different pattern with unknown time horizon. The model generates optimal replenishment schedules, order quantity and costs using a general ramp-type demand pattern that allows three-phase variation in demand. Shortages are allowed with full backlogging of demand and all possible replenishment scenarios that can be encountered when shortages and demand pattern variation occur in multi-period inventory modeling are also considered. With the aid of numerical illustrations, the advantages of allowing for variation in demand pattern within replenishment periods, whenever they occur, are explored. The numerical examples show that the length of the replenishment period generated by the model varies with the changes in demand patterns. © 2010 Growing Science Ltd.  All rights reserved.


Introduction
The inventory lot-sizing problem for deteriorating items is prominent in the literatures due to its important connection with commonly used items in daily life.Fruits, vegetables, meats, photographic films, electronic products etc, are examples of deteriorating products.Deteriorating items are often classified in terms of their lifetime or utility as a function of time while in stock.The study of this paper focuses on the deteriorating items classified as decreasing-utility with random lifetime.Fruits, vegetables, fish etc are some of the examples which are classified in this category.Since the utility of such items are time dependent, their demand is more likely to be time dependent as the customers may be willing to buy more when the utility is high and less when the utility is low.
The ramp-type demand pattern adopted in this study is motivated by the observation that the demand for this class of deteriorating items increases with time at the beginning of its season.It attains a peak and becomes steady at the middle of the season and it finally decreases when the time reaches to the end of the season.This increasing-steady-decreasing demand pattern can be represented by a general ramp-type function.This function allows a three-phase variation in demand representing the growth, the steady and the decline phases of demand during the entire period.This type of demand behavior can also be observed in some fashion or seasonal products in general.
In this paper, the inventory lot-sizing problem for these kinds of deteriorating items is studied under unknown time horizon.Traditionally in multi-period inventory modeling, the time horizon over which the inventory will be controlled is often assumed to be either finite or infinite.However, the infinitive time horizon assumption is considered to be unrealistic due to several reasons such as variation in inventory costs, change in product specification and designs, technological changes, etc.According to Roy et al. (2007), the business period for some products like fruits and vegetables cannot be infinite due to the nature of the items.Another common approach in multi-period inventory modeling of deteriorating items is to assume that the time horizon over which the inventory will be controlled is finite and fixed.The total inventory cost is often obtained by summing up various cost components over the entire horizon.Most often, however, the demand for the product will not be terminated at the end of the time horizon.A well-defined termination point of demand is usually an artificial device often used in order to obtain an optimal solution (Silver 1979).In many inventory situations, the period over which the inventory will be controlled is difficult to predict with certainty, as the inventory problems may not live up to or live beyond the assumed time horizon.Time horizon in several real life situations may be unknown, uncertain or imprecise in nature.
In this paper, we develop a multi-period lot-sizing model for deteriorating items with varying demand patterns when the time horizon is unknown or unspecified.There are three main reasons for our assumptions.(i) The first reason is to present a multi-period inventory model for deteriorating items using a general ramp-type demand pattern with full backlogging of shortages.The general ramp-type demand function allows three-phase variation in demand, representing the growth, the steady and the decline phases of demand commonly experienced by many products.This will be more suitable for practical applications than single period models that assume a single replenishment to cover all phases of demand.(ii) The second reason is to make the developed model suitable for unknown time horizon by extending the Silver-Meal approach to a general ramp-type demand pattern.This makes the model to be suitable for situations, discussed earlier, when the time horizon is neither fixed nor infinite.(iii) Finally, the third reason is to examine various possible replenishment patterns when shortages and demand pattern variation occur in a multi-period inventory model.The replenishment intervals are allowed to vary from one period to another along the cycle and a replenishment policy to generate optimal replenishment schedules, order quantity and costs is proposed.An additional solution procedure based on trust region methods is also presented to complement the usual direct implementation of derivatives.This paper is organized as follows: Section 2 contains a brief literature review and the proposed model of this paper is presented in section 3. Solution procedure to obtain the optimal replenishment policy, numerical illustrations and conclusions are also presented in sections 4 to 6. Ghare and Schrader (1963) extended the classical economic order quantity (EOQ) model to include exponential decay, wherein a constant fraction of on-hand inventory is assumed lost due to deterioration.Covert and Philip (1973) and Shah (1977) extended this model by considering deterioration of Weibull and general distributions, respectively.Dave and Patel (1981) developed the first inventory model for deteriorating items with time dependent demand using a linear function.This model was later improved by Sachan (1984), Bahari-kashani (1989), and Hariga (1995).There are various forms of time dependent demand patterns such as linear, exponential, quadratic, and logconcave functions (e.g.Chu & Chen 2002, Khanra & Chaudhuri 2003, Dye et al. 2005, Rau & Ouyang 2008).

Literature review
Apart from the unidirectional time-varying patterns mentioned above, Hill (1995) proposed a ramptype demand pattern for items whose demand pattern changes during their lifetime in inventory.The demand pattern consists of two phases namely the growing and the stability phases.Subsequent researches on the ramp-type demand focused mainly on models with this type of demand patterns.The works of Mandal and Pal (1998), Wu and Ouyang (2000), Wu (2001), Giri et al. (2003), Manna and Chaudhuri (2006) and Deng et al. (2007) are notable contributions in this direction.Panda et al. (2008) developed an inventory model for deteriorating seasonal products using ramp-type demand pattern with a three-phase variation in demand.The ramp-type pattern in this case is assumed to increase exponentially with respect to time up to a point.Then it becomes steady and finally decreases exponentially and becomes asymptotic.Another form of this pattern, called trapezoidal demand pattern, was used by Cheng and Wang (2009), in developing an EOQ model for deteriorating items.Chung and Ting (1993) were the first to propose a heuristic model for deteriorating items with timevarying demand irrespective of the existence of a time horizon (Goyal and Giri 2000).By extending Silver-Meal heuristics (see Silver and Meal 1973) approach to deteriorating items having deterministic demand with linear and positive pattern, they proposed a model to obtain multi-period replenishment schedules for perishable items without the assumption of a fixed time horizon.Kim (1995) developed a similar heuristic solution procedure to obtain replenishment schedules for items with linearly changing demand rate and constant rate of deterioration when the time horizon is unknown.Giri and Chaudhuri (1997) developed a model along the same line with varying deterioration rates and shortages.An inventory model incorporating constant rate of deterioration, time dependent demand and shortages over fuzzy time horizon was developed by Kar et al. (2006).Roy et al. (2007) developed a model for an item with stock dependent demand over an uncertain time horizon which follows exponential distribution.The demand patterns used for all explained models are represented by single, non-decreasing function of time or stock depending on their case-study.
In real market situation, the demand for some items may not increase continuously with either time or stock.For items like fruits and some farm products whose ripeness and nutritional value are known to attain their peak at certain period of time, their demand is also likely to rise steadily to the peak at some time and fall afterwards.The demand for some products also falls due to the emergence of a better or similar alternative in the market.These possible changes in pattern of demand can be accurately captured by good forecasting techniques that are available (e.g. the electronic forecasting system (EFS)) and it is possible for this change in pattern to fall within a particular replenishment duration.The proposed model of this paper allows such changes in demand pattern within a replenishment period.
Many inventory models usually depend on the direct implementation of the derivatives in optimizing their objective functions.However, some problems are often encountered with this method due to the difficulties in obtaining the second derivatives of these objective functions.Since most of these objective functions are nonlinear in nature, the problems can be easily surmounted with the aid of nonlinear programming software packages which are based on trust region algorithms.The trustregion methods define a region around the current iterate within which the model is trusted to be an adequate representation of the objective function, and then choose the step to be the approximate minimizer of the model in this trust region (Nocedal and Wright 1999).The methods have many attractive features which include the ability to deal with curvature information, robustness, and a comprehensive and elegant convergence theory (Conn et al. 2009).Sadjadi and Ponnambalam (1999) presented a survey of advances in trust region algorithms and its application in solving several largescale constrained optimization problems.Extensive research on solving trust-region sub-problems has led to the popularity of the methods and its incorporation into some commercial nonlinear programming software packages.In this paper, a procedure that obtains optimal solutions using trust region methods is developed to serve as an additional solution procedure for the model.

Model formulation and analysis
The inventory system consists of several replenishment periods.The i th replenishment period begins with full inventory at time 1 − i t , consumption due to demand and deterioration brings the inventory level to zero at time i s , shortages occur from time i s to time i t and instantaneous replenishment follows at time i t .The following assumptions and notations are used in formulating the model: 1) Demand rate f (t) is a general time dependent ramp-type function which has the following form: ( ) 0, 0, 0 , .
The function g(t) can be any continuous, non-decreasing function of time, while h(t) is any continuous, non-increasing function of time in the given interval.μ and γ also represent the parameters of the ramp-type demand function.The demand pattern is as shown in Fig. 1.

Fig. 1. A typical ramp-type demand pattern
2) A single item inventory is considered.
3) There is a constant fraction, θ, of on-hand inventory deteriorates per unit time.4) Replenishment rate is infinite.5) Shortages are allowed and completely backlogged.6) No repair or replacement of deteriorated items during the period under review is allowed.7) Inventory holding cost per unit per unit time (H), cost of deteriorated items per unit (P), shortage cost per unit per unit time (G), and replenishment cost per order (S) are known and constant during a replenishment period.8) Total inventory cost per unit time for the i th replenishment period is TC i while the length of the i th replenishment period is given by ( ) The objective is to determine the optimal replenishment schedules, costs and order quantities ( )

, , ,
i i i i s t TC Q for the first and all other subsequent periods by minimizing the total inventory cost per unit time for each replenishment period.Three different scenarios may arise during a replenishment period according to the demand pattern exhibited by the item during the period.These scenarios are examined below: No change in demand pattern occurs during a replenishment period.This implies that each replenishment period begins and ends with a single demand pattern which may be g (t), g (μ), or h (t).This behavior is considered in Case I below.
Change in demand pattern occurs only once during a replenishment period.The change in pattern can occur in either of two ways: a. Stabilization of demand: This is when demand pattern changes from non-decreasing pattern to a constant pattern.The equation of the system in this case depends on whether this change in pattern occurs before or during shortages.The optimal replenishment schedules in these cases are considered under Case 2 and Case 3. b.Declining demand: This is when the transition of demand pattern is from constant to declining pattern within a single replenishment period.The equation of the system will also depend on whether this transition in pattern occurs before or during shortages.The optimal replenishment schedules are considered under Case 4 and Case 5.

Scenario III:
In this scenario, the change in demand pattern occurs twice during a replenishment cycle.The demand pattern changes from non-decreasing pattern to steady and later non-increasing pattern during the replenishment period.This is quite possible when it is considered more economical to order once to cater for the demand throughout a season.Three possible cases arise here, depending on when the changes in demand occur.Both changes can occur before commencement of shortages (Case 6), or during shortages (Case 7).The third case in this scenario is when a single change in pattern occurs both before and during shortages (Case 8).Detailed analyses of each case are considered below.

Case 1: Replenishment period with single demand pattern
The demand pattern may be any of the patterns given in f (t).As stated earlier, a replenishment period begins with full inventory at time 1 i t − , consumption brings the inventory level to zero at the time i s and shortages occur from time i s to time i t .The equation of the inventory system for any replenishment period under this case is as follows: In Eq. (1) ( ) I t is the inventory level and ( ) I t is the shortage level at any time within the given time range for the i th replenishment period.Since the inventory and shortage levels are zero at s i , the solutions to Eq. ( 1) are as follows: The amount of shortage during the i th replenishment period is given by ( ) The number of units in inventory during the i th replenishment period is given by (3) Substituting I I and S I in Eq. (3) yields the following expression for ( ) ( ) The necessary conditions for the minimization of ( ) Taking the first derivatives of ( ) TC s t with respect to i i s and t and equating the result to zero yields, ( ) The optimal replenishment schedules for the i th replenishment period * * ( . ., ) i i i e s t can be obtained by solving Eq. ( 5).The optimal order quantity, Q i *, for the i th replenishment period are given by the sum of maximum order level (i.e.inventory level at time 1 i t − ) and total back order, Theorem 1: The condition for convexity is always satisfied when the demand rate is a non-decreasing function of time.

Case 2: Replenishment period with demand pattern varying once during shortages
The replenishment period begins with full inventory at time 1 while the demand pattern is represented by ( ) g t .This is followed by shortages and the period ends at time i t ( i t μ γ < < ).The demand pattern changes during shortages from ( ) g t to ( ) g μ .The behavior of the inventory level in this case is described by the following equations, .
( ) 3i I t represent the shortage levels at any time during the given time range while ( ) I t is the inventory level.The solutions to Eq. ( 7) are as follows, .
The number of units in inventory during the i th replenishment period is given by 1 1 ( ) .The amount of shortage during the same period is also given by .

TC s t S P H I GI T S P H I t dt G I t dt I t dt t t
The necessary conditions for the min of ( ) Taking the first derivatives of ( ) TC s t with respect to i i s and t and equating the result to zero yields, ( ) The optimal replenishment schedules for the i th replenishment period * * ( . ., ) i i i e s t can be obtained by solving Eq. ( 10).The optimal order quantity, Q 2i *, for the i th replenishment period under this case is given by: ( ) Theorem 2: Proof: See Appendix B. ■

Case 3: Replenishment period with demand pattern varying once before shortages
The inventory behavior in this case is similar to Case 2, except that, in this case the inventory is brought to zero while the demand is constant (i.e. 1 0 , , The demand pattern also changes from ( ) g t to ( ) g μ before commencement of shortages.The equation of the system is as follows, 1 ( ) i I t and 2 ( ) i I t represent the inventory levels while 3 ( ) i I t represents the shortage level at any time during the given time range.The solutions to Eq. ( 12) are as follows, x dx e g dx t t I t e e g dx The number of units in inventory during the i th replenishment period is The amount of shortage during the i th replenishment period is also given by 3 ( ) .
The total inventory cost per unit time for the i th replenishment period, ( ) )

TC s t S P H I GI T S P H I t dt I t dt G I t dt t t
The optimal values of i s and i t for minimization of the total cost per unit time for the i th replenishment period is achieved by . Taking the first derivatives of ( ) with respect to i i s and t and equating the result to zero yields, ( ) The optimal order quantity for the i th replenishment period is given by the following, ( ) ( ) x dx e g dx g dt .
In Eq. ( 17), I t is the inventory level.The solutions to Eq. ( 17) are as follows, The number of units in inventory in the i th replenishment period is 1 1 ( ) .The amount of shortage in the i th replenishment period is also given by 2 3 ( ) ( ) .Total inventory cost per unit time for the i th replenishment period in this case is given by:

TC s t S P H I GI T S P H I t dt G I t dt I t dt t t
Applying the conditions to Eq. ( 19) yields the following, ( ) ( ) Eq. ( 20) gives the optimal values of i s and i t that satisfy the first order necessary conditions for minimization of ( ) TC s t .The optimal order quantity, * 4i Q , for the i th replenishment period in this case is as follows, ( ) Theorem 3: Proof: See Appendix C. ■

Case 5: Replenishment period with demand pattern varying (declining) once before shortages
The inventory behavior in this case is similar to Case 4, with the exception that inventory is brought to zero while the demand is decreasing (i.e. 1 , , The demand pattern also changes from ( ) g μ to ( ) h t before commencement of shortages which yields the following, In Eq. ( 22), 1 ( ) i I t and 2 ( ) i I t represent the inventory levels while 3 ( ) i I t represents the shortage level at any time during the given time range.The solutions to Eq. ( 22) are as follows, ( ) .

I t e e g dx e h x dx t t I t e e h x dx t s I t h x dx s t t
The number of units in inventory during the i th replenishment period is given by The amount of shortage during the i th replenishment period is also given by 3 ( ) .
The total inventory cost per unit time for the i th replenishment period, ( )

TC t T S P H I GI T S P H I t dt I t dt G I t dt t t
Similar to previous cases, the simultaneous equation to determine the optimal values of i s and i t is as follows, ( ) The optimal order quantity, * 5i Q , for the i th replenishment period in this case is as follows, The number of units in inventory during the i th replenishment period is given by 1 1 ( ) .The amount of shortage during the i th replenishment period is also given by The total inventory cost per unit time for the i th replenishment period in this case can be obtained as follows, The optimal order quantity, * 6i Q , for the i th replenishment period in this case is given by: h t during shortages.The equation of the system is as follows, In Eq(32),  ( ) The number of units in inventory during the i th replenishment period is given by: 1 1 2 ( ) ( ) .

∫ ∫
The amount of shortage during the i th replenishment period is also given by: 3 4 ( ) ( ) The total inventory cost per unit time for the i th replenishment period in this case is given by: The optimal order quantity, * 7i Q , for the i th replenishment period is given as follows, ( )

t e e g x dx e g dx g dt h t dt
Using similar procedure to Case 6 shows that ( )

Case 8: Replenishment period with twice variation in demand pattern before shortages
In this case the inventory gets depleted and shortage commence at time i s when demand is declining and continues till the end of the period at time i t ( 1 0 , , The demand pattern changes first from ( ) g t to ( ) g μ and later from ( ) g μ to ( ) h t before the commencement of shortages.The equation of the system is as follows, ( ) The solutions to Eq. ( 37) are as follows, ( ) ( ) .

I t e e g x dx e g dx e h x dx t t I t e e g dx e h x dx t I t e e h x dx t s I t h x dx
The number of units in inventory during the i th replenishment period is as follows, The amount of shortage during the i th replenishment period is also given by: ( ) and the total inventory cost per unit time for the i th replenishment period in this case is given by: The optimal order quantity, * 8i Q , for the i th replenishment period is as follows, ( )

t e e g x dx e g dx e h t dx h t dt
Applying similar procedure to Case 6 shows that ( )

Solution procedure
As we explained earlier, the optimal values of i s (the time when the inventory level reaches zero during the i th replenishment period) and i t (time at which the i th replenishment is made) for all replenishment periods and their corresponding costs and order quantities can be obtained throughout the lifetime of the product in the market without the need of a specific (fixed) time horizon.Before presenting the solution algorithm which leads to the optimal replenishment policy, the summary of the result for each scenario is outlined in different scenarios.

Scenario I
Optimal values of i s and i t (s i * , t i * ) are given by Eq. ( 5).Optimal inventory cost in period, ( ) , is given by Eq. ( 4) while the optimal order quantity, ( ) Q s t , is obtained using Eq. ( 6).

Scenario II (a). Stabilization of demand:
Two sets of possible optimal values of i s and i t can be obtained using Eq. ( 10) and Eq. ( 15).Let

( )
# # , i i s t and ( ) represent the optimal values of i s and i t obtained from Eq. ( 10) and Eq. ( 15), respectively.In accordance with initial assumptions and the convexity of the cost functions, it follows that if # 0 i s μ < < , then the optimal total inventory cost per unit time of the period is , the optimal total inventory cost per unit time is ( ) Likewise the optimal order quantity for the period is as follows, ( ) ( ) Let, ( ) s t ⊗ ⊗ represent the optimal values of i s and i t obtained from Eq. ( 20) and Eq. ( 25), respectively.It follows from the initial assumptions and the convexity of the cost functions that if i s μ γ • < < , then the optimal total inventory cost per unit time of the period is ( ) The optimal order quantity for the period is as follows, ( ) ( ) , , .
and ( ) represent the optimal values of i s and i t obtained from Eq. ( 30), Eq. ( 35), or Eq. ( 40), respectively.The optimal total inventory cost per unit time and the optimal order quantity for the period is as follows, ( ) ( ) ( ) The following algorithm outlines the procedure to be used to determine the replenishment policies for the first and the subsequent periods which makes up the inventory system.

Optimal replenishment policy (Policy A):
Under this policy, all replenishment periods are solved using the procedure for Case 1 except at the points when changes in demand pattern occur.The periods incorporating the change points are identified and the optimal values for those periods are recalculated using the appropriate equations.
The following algorithm summarizes the policy.

Algorithm 1
Step 1: Determine all the optimal values ( ) s t TC Q for the first and the subsequent replenishments using Eq. ( 4), Eq. ( 5) and Eq. ( 6) with appropriate demand function.
Step 2: Check for change points by comparing two successive values of t i (i.e.t i and t i-1 ).
Step 3: < ≤ for a given i th replenishment period, then a change in demand pattern has already occurred during that period.Recalculate the set of optimal values ( ) * * , i i s t for that period using Eq. ( 10) and Eq. ( 15), then use Eq. ( 42) and Eq. ( 43) to determine the optimal cost and order quantity.
Step 4: > for a given i th replenishment period, then a change in demand pattern has already occurred during that period.Recalculate the set of optimal values ( ) s t for that period using Eq. ( 20) or Eq. ( 25).Use Eq. ( 44) and Eq. ( 45) to determine the optimal cost and order quantity.
Step 5: < and i t > γ for a given i th replenishment period, then a change in demand pattern has already occurred twice during that period.Hence, recalculate the set of optimal values ( ) s t for that period using Eq. ( 30), Eq. ( 35), and Eq. ( 40).Use Eq. ( 46) and Eq. ( 47) to determine optimal cost and order quantity.

Alternative replenishment policy (Policy B):
In this situation, we assume all replenishment periods have single demand pattern by deliberately avoiding change of demand pattern within replenishment periods and the following algorithm summarizes the algorithm used for this case.

Algorithm 2
Step 1: Determine all the optimal values ( ) s t TC Q for the first and subsequent replenishments using Eq. ( 4), Eq. ( 5) and Eq. ( 6), respectively with appropriate demand function.
Step 2: Check for demand change points by comparing two successive values of t i (i.e.t i and t i-1 ).
Step 3: < ≤ for a given i th replenishment period, then a change in demand pattern occurred during that period.Set * i t μ = for that period and recalculate * i s using the Eq. ( 5).Use Eq. (4) and Eq. ( 6) to determine the optimal cost and the order quantity.
Step 4: > for a given i th replenishment period, then a change in demand pattern occurred during that period.Set * i t γ = for that period and recalculate * i s using the Eq. ( 5).Use Eq. (4) and Eq. ( 6) to determine optimal cost and order quantity.
Using the algorithm 1 or 2 the replenishment schedules, order quantities and costs can be obtained for all replenishment periods that make up the inventory system when the time horizon is unknown or unspecified.Any of the above policies can be adopted by managers depending on various circumstances.Apart from the optimal policy (Policy A) other policies have their associated penalties in terms of higher total inventory cost which have to be weighed against other benefits to be derived from adopting such policies.

Additional solution procedure
The model formulated in section 3 can handle different forms of time dependent demand pattern as well as differences in demand pattern for the non-decreasing and non-increasing phases.However, the existence of unique optimal solutions can only be guaranteed under the conditions stated in the theorems given in Section 3.These conditions may not hold in some cases due to certain factors.The factors may include very high shortage costs, low rate of deterioration of products, high rate of decline in demand etc.In such cases, the simultaneous equations obtained through direct implementation of the derivatives cannot guarantee the optimality.One alternative is to use trust region method which guarantee to reach a local optimal solution for all possible circumstances.The following summarizes the details of our implementation.

Scenario 1, Case 1:
The constrained nonlinear optimization problem (CNLOP) for this case is formulated as follows, ( ) The equation for 1 ( , ) TC s t is as given by Eq. ( 4), and the constraints equations are obtained from the characteristics of the system as described in Section 3.1.Equation ( 48) can be solved using trust region methods incorporated in the optimization toolbox of software packages like LANCELOT or MATLAB to give the optimal values of * * * 1 , i i i s t and TC .

Scenario 2:
Using the same approach as in scenario 1 above, the CNLOP for the several discussed cases under this scenario are formulated as: Case 2: ( ) Case 3: ( ) Case 5: ( ) The CNLOP for the cases under this scenario are as follows: Case 6: ( ) Case 7: ( ) The algorithm 1 to obtain the optimal replenishment schedules for the first and the subsequent periods can be used with the following modifications: Algorithm 3 Step 1: Determine all the optimal values ( ) s t TC for the first and the subsequent replenishments by solving problem P 1 with the appropriate demand function.Use Eq. ( 6) to obtain the value of * i Q Step 2: Check for change points by comparing two successive values of t i (i.e.t i and t i-1 ).
Step 3: < ≤ for a given i th replenishment period, then a change in demand pattern occurred during that period.Recalculate the set of optimal values ( ) s t TC for that period by solving problems P 2 and P 3 .Determine the optimal cost for that period by using , where TC and TC are the optimal values obtained from the solution to problems P 2 and P 3, respectively.
Step 4: > for a given i th replenishment period, then a change in demand pattern occurs during that period.Recalculate the set of optimal values ( ) s t TC for that period by solving problems P 4 and P 5 .Determine the optimal cost for that period by using TC and TC are the optimal values obtained from the solution to problems P 4 and P 5, respectively.
Step 5: > for a given i th replenishment period, then a change in demand pattern have already occurred twice during that period.Hence, recalculate the set of optimal values ( ) for that period by solving problems P 6 , P 7 , and P 8 .Determine the optimal cost for that period by using TC TC and TC are the optimal values obtained from the solution to problems P 6 , P 7 , and P 8 , respectively.Similar modifications can be applied to algorithm 2 to obtain the alternative replenishment schedules.The additional procedure given in section 4.3 can be used to obtain the optimal solutions even when the conditions stipulated in the theorems 1 -4 fail to hold.This is due to the robustness and strong convergence property of the trust region methods to be used in solving the optimization problem.Illustrative examples are presented next.

Numerical Example
To demonstrate the application of this model to inventory situation of items with varying demand pattern and shortages over various phases in their life cycle in the market, three numerical examples are considered in this section.In Example 1, the demand of the item varies from an exponentially non-decreasing pattern at the beginning through a uniform pattern during the stability stage and later decreases exponentially at the later part of its life cycle in the market.Example 2, however, involves different time dependent demand pattern during the growing and the declining phase of demand.Example 3 represents special cases where the conditions stipulated in theorems 1-4 do not hold.The time horizons in all examples are unknown and the optimal replenishment schedules, cost and order quantities for the first and some of the subsequent periods were obtained using the algorithm outlined in the previous section.Example 3 was solved by using the additional solution procedure given in section 4.3.
The alternative replenishment schedules were also obtained with the corresponding cost and order quantities.The last period in the alternative schedules was adjusted to end at the same time as that of the optimal schedules for ease of comparison.The results are given in Tables 1 -6.  2 show that, using the optimal replenishment policy, the length of the i th replenishment period ( * i T ) reduces with increasing demand, remains constant when the demand is stable and increases as the demand reduces.This shows that the length of the replenishment period generated by the model varies with the variation in demand patterns.This is better than the traditional assumption of constant replenishment period irrespective of demand fluctuations.Increase in demand often results in more frequent ordering and, consequently, reduction in the replenishment period while decrease in demand should naturally lead to reduce the ordering frequency (increase in replenishment period).Tables 1-3 also show that the optimal order quantity increases with increasing demand and vice versa.This is in line with the findings of Hariga (1996) for perishable items with log-concave demand functions.The examples also show that the total inventory cost generated using the optimal replenishment policy is less than the one given by the alternative policy.The differences between the order quantity generated by the optimal policy and the one generated by the alternative policy are quite small and negligible.The examples also demonstrated the ability of the model to handle different forms of time dependent demand pattern as well as differences in demand pattern for the non-decreasing and non-increasing phases.Apart from solving Example 3 that represents special cases, the additional solution procedure given in section 4.3 was also used to satisfactorily confirm the validity of the results obtained for Example 1 and Example 2 using the algorithms one and two given in section 4.1 and 4.2.

Conclusion
The inventory lot-sizing problem for deteriorating items with varying demand pattern and unknown time horizon has been considered in this paper.A multi-period model was developed to obtain optimal replenishment schedules for such items using a general ramp-type demand pattern that allows for three-phase variation in demand pattern.This variation represents the growth, the steady and the decline phases of demand commonly experienced by some products in the market.By extending the Silver-Meal heuristic approach to a general ramp-type demand pattern, the developed model was made suitable for inventory situations when time horizon is unknown or unspecified.Such a situation is common in practice, especially regarding many perishable items like fruits, vegetables, fish etc.As noted by Donaldson (1977), the demands for such items does not usually cease at the end of a fixed time horizon.Also, their perishable nature does not usually allow for a single replenishment to cater for demand over a considerable length of time.
The numerical illustrations showed that allowing for changes in pattern of demand variation within replenishment periods, whenever they occur, lead to lower total inventory cost on the long run.It was also shown that the length of a replenishment period and the optimal order quantity for the period varies with the changes in demand patterns.
This model is a generalization of some previous EOQ models incorporating ramp-type demand (e.g.Deng et al. 2007, Panda et al. 2008and Cheng & Wang 2009).It can be extended to cater for wider range of products by consideration of varying deterioration rates and varying inventory holding cost.
Another future research direction is to incorporate the effect of inflation and time value of money in modeling to make it suitable for long time application.

Appendix A
First we obtain the derivatives of ( ) The second derivatives of ( ) TC s t at the minimum points are as follows, The second derivatives of ( ) The second derivatives of ( ) the shortage levels at any time during the given time range while ( ) 1i represent the shortage levels at any time in the given time range.Solutions to Eq. (27) are as follows, the shortage levels at any time during the given time range.The solutions to Eq. (32) are as follows, t ) when shortages start.The equation of the system during this period is as follows, 16) It can be easily shown, as in Case 2, that ( ) 3 , h . .
Replenishment period with variation in demand pattern before and during shortagesIn this case the inventory at the beginning of the period ( g t to ( ) g μ and later from ( ) .
the optimal total inventory cost per unit time is

Table 2
Optimal replenishment schedules, order quantity and cost for Example 2 n

Table 4
Alternative replenishment schedules, order quantity and cost for Example 1 n Note that it is always better to consider changes in the demand pattern that may occur within replenishment periods.The cost penalties may be small, as shown by Example 1 (compare total cost in Table1 and Table 4) or substantial, as shown by Example 2.

Table 5
Alternative replenishment schedules, order quantity and cost for Example 2 n The determinant of the Hessian matrix in this case is given by the following, It is clear from the expression in Eq. (B4) above, that det ( ) 0 The determinant of the Hessian matrix in this case is given by, The determinant of the Hessian matrix in this case is given by: