Вы находитесь на странице: 1из 95

1

CHAPTER 1: Introduction

Sufficient materials are needed to be kept as inventory to avoid shortages in future

demand in any firm. There should be an optimum investment in inventories; neither in

excess nor inadequate. A high cost is added to the company because of inventory. At the

same time, the enterprise may face stock-out problems due to insufficient inventory. As

a result, the company may lose customers. Many techniques can be applied to solve the

inventory management problem which are, linear and non-linear programming, network

flow models, queuing, etc. Most of these packages of inventory control depend on

inventory theory. When and how much an order is placed are some important questions

which are solved in Inventory theory. One of the basic concepts of Inventory theory is

EOQ formula which was discovered by Harris (1915). Several studies have been done

in the past on inventory management but all of those have not considered the concept of

definite lifetime and varying utility level of the products.

Inventories are primarily classified as two types: perishable and non-perishable. Non-

perishable items have an infinite lifetime and so can be used for demand fulfilment for a

long time. But management of perishable items with limited lifetime is a challenge. The

classical inventory management principal work significantly well when we assume that

the demand is deterministic. But in real life situation, the demand is a random variable

and the items are perishable. The study of traditional approaches indicates scope for

model improvement. In this thesis we attempt to modify the traditional inventory

management for seasonal perishable products applying dynamic programming

techniques.
2

1.1. Perishable products:


Products that are degraded in quality and utility with time are called perishable

products. Mainly Perishable products are of two categories: one which maintains

constant utility throughout the lifetime, for example, blood has a fixed lifetime of 21

days with constant utility, medicines, etc. And other with exponentially decaying utility,

for example, vegetables, fruits, fish, etc.

1.2 Transfer Function:

For stochastic demand when the product lifetime is more than one period, it is difficult

to find an optimal ordering policy. The state vector must be formed by considering the

stock level of each possible category of remaining lifetime because it will not be

possible to get a non-perishing order policy. Let us assume that stock levels are

reviewed periodically and useful lifetime of products is exactly periods. Then the

state vector which gives starting stock levels of each lifetime category is

where = quantity of stock on hand which is scheduled to perish after i periods.

Let , be the total starting stock of all age categories.

It is the one period transfer equation which expresses the process dynamics.

Let vector represents the

levels of stock of each age category one period into the future when y is the quantity of

fresh stock ordered

Let X is the vector of stocks currently on hand

and t is the realization of demand in the current period.


3

Then,

(assuming FIFO issuing)

And
If excess demand is backlogged

If sales are lost

Where,

1.3 FIFO policy:

FIFO (First-In, First-Out) is one of the most widely used method which is used to

calculate the value of inventory on hand at the end of a period and the cost of goods

which are sold during the period. This policy says that the inventory bought or made

first is sold first. The newer ones are kept unsold. For perishable inventory management

at each period we have inventory with deferent remaining lifetime.

is the state vector which gives starting stock levels of each

remaining lifetime category, where = quantity of stock on hand which is scheduled to

perish after i periods. Let , be the total starting stock of all remaining

lifetime categories. So, which products have less remaining life time then other such

products are given first priority for using them for demand fulfilment to minimize

outdating of products.
4

1.4 Dynamic programming:

The technique which solves optimization problems involving making a sequence of

decisions is called Dynamic programming. For each decision and sub problems, the

dynamic programming determines the optimal solution of the original problem from the

solutions of the sub problems. The basis of dynamic programming is optimal policy.

According to this policy, regardless of the initial state and decisions, the remaining

decisions always constitute an optimal policy. In many applications, the solutions of

dynamic programming are obtained by working backwards from the end to the initial

point of a problem. This breaks up a large, complicated problem to tractable ones.

To solve a dynamic programming problem, different sub problems which are parts of

the problem are solved and then solutions of each sub problem combined together gives

an overall solution. When more naive methods are used, then the sub problems are to be

solved many times. The dynamic programming approach looks forward to solve each

sub problem only one time which reduces the computational length. The solution to one

sub problem is stored and then simply looked up in the next sub problem. This approach

is really helpful when there are a number of sub-problems of a problem to be solved.

The basic form of a dynamic programming functional equation is:

Where, S is a state in some state space s

d is a decision chosen from a decision space

is a reward function

is a next-state transformation (or transition) function


5

and * is a binary operator.

I. State: The state S, in general, incorporates information about the sequence of

decisions made so far. In some cases, the state may be the complete sequence,

but in other cases only partial information is sucient; for example, if the set of

all states can be partitioned into equivalence classes, each represented by the last

decision. In some simpler problems, the length of the sequence, also called the

stage at which the next decision is to be made, success. The initial state, which

reects the situation in which no decision has yet been made, will be called the

goal state and denoted .

II. Decision Space: The decision space is the set of possible or eligible

choices for the next decision . It is a function of the state S in which the

decision is to be made. Constraints on possible next-state transformations

from a state can be imposed by suitably restricting If , so that

there are no eligible decisions in state , then is a terminal state.

III. Objective Function: The objective function which is the optimal profit or cost

results by making a decision of variables. It is a function of and the sequence

of decisions are obtained when the sequence of decisions associated with S are

made, also called as state S. The main aim of a Dynamic Programming problem

is to nd for the goal state .

IV. Reward Function: The reward function R, a function of S and d, is the prot or

cost that can be attributed to the next decision d made in state S. The reward

must be separable from the prots or costs that are attributed to all other

decisions. The value of the objective function for the goal state is the

combination of the rewards for the complete optimal sequence of decisions

starting from the goal state.


6

V. Transformation Function(s): The next-state which results from decision making

in decision d in state S is specified by the transformation (or transition) function

T. The transformation function T is a function of S and d. (Lew, 2006)

1.5 Research Objective


The main objective is to maximum profit. So to attain this, following measure are to be

taken into consideration:

(i) Reducing the outdating of products.

(ii) Minimization of cost like holding cost, outdating cost, set-up cost.

To achieve the above stated objective, a model is to be developed depending on factors

like demand, inventory, utility of product and costs associated with the product in order

to order quantity at each ordering point and determine optimal price depending on

available stock and product utility.


7

Chapter 2: Literature review

Application of operations research in operation management involves solution to

problems like what should be the review interval of inventory, when to place a

replenishment order and size of replenishment order. As described by Silver (1979) that

there exists a serious gap between theory and real world problem. Suggestions were

made by him for bridging this gap which study of various problems, objectives and

constraints.

Nahmias (1975), dealt with the problem of computing optimal ordering policies for a

single type of product in order to take perishability into account. So a cost is substituted

to be incurred at the time of outdating. For multi-period case, functional equation

approach of dynamic programming is used. Nahmias (1976) is further work on the

perishable inventory items with myopic approximations. Also, Nahmias (1982)

reviewed the literature for perishable inventory with fixed life as well as continuous

exponential decay. Both deterministic and stochastic demand is considered for both

single and multiple products. Application of these models to management of blood bank

is also included. Sub-optimal order policies and optimal order policies are reviewed

with a discussion of problem.

As Winston described in Chapter-18 of his book on operations research (2003),

dynamic programming breaks up a large, cumbersome problem into a series of smaller,

more tractable problems by working in backward direction from end towards the

beginning. A dynamic lot-size model is a periodic review inventory model whose

periodic demand is known beforehand. Ordering policy for cost minimization may be

found by backward or forward recursion i.e. via Wagner-Whitin Algorithm or Silver-


8

Meal Heuristic. In chapter-19 of Winston (2003), the problems in which the cost of

current period and state of next period are random are discussed as probabilistic

dynamic programming problem.

Padmanabhan and Vrat (1993) considered more realistic parameters like dependence of

stock on selling rate and perishability. Also, a function of amount of already backlogged

orders is defined by considering a different type of backlogging. Therefore, impact of

dependence of stock on selling rate, parameters of partial backlogging on order

quantity, perishability, maximum safety stock and profit are reported.

Then following the above work, Kun-Jen Chung et. al. (1999) develops the necessary

and sufficient conditions of existence and uniqueness of the optimal solutions without

and with complete backlogging of the profit per unit timefunctions. It also explains the

appropriateness of the profit functions in both situations.

Chung-Yuan Dye et. al. (2003) also extends the work of Padmanabhan and Vrat (1993)

by proposing a time-proportional rate of backlogging for practical applicability of the

theory.

S. Panda et. al. (2007) discusses a single item order level inventory model for a seasonal

perishable product where the demand rate is represented by a ramp-type function. An

algorithm to find the solution to the problem when the shortages are not allowed is

developed. Sensitivity analysis of the model is also carried out.

Kuo-Lung Hou(2004) derives an inventory model for deteriorating items with stock-

dependent consumption rate and shortages under inflation and time discounting over a

finite planning horizon. The total cost function is considered to be convex. The results

are discussed along with sensitivity analysis of the optimal solution.


9

Pasternack (2008) shows the models to examine return and pricing policies. This

includes those where no returns of goods which are not sold are permitted. It also

involves channel coordination for partial return of goods but it will be a function of

retailer demand. Optimality cannot be obtained in a multi-retailer environment.

Abad (1996) formulated a generalized model by a reseller of dynamic pricing and lot-

sizing. The assumption is that, for periods of shortage, the reseller can plan for shortage

periods to attain economy. The reseller may be required to backlog demand the goods

which are highly perishable in order to sell it in reasonable price. A simple solution for

single non-linear equation of model is solved.

A Chande et. al. (2005) describes an integrated framework for inventory management

of perishable products and pricing in a discrete time (periodic review and ordering)

framework. It also describes an efficient algorithm in a dynamic-pricing environment,

for the related optimization problem with new approximations included.

Guillermo Gallego et. al. (1994) investigates the problem of dynamically pricing the

perishable type of inventories when demand is price sensitive and stochastic and the

firm's objective is to maximize expected revenues. Exponential family and compound

Poisson distribution of demand functions is considered. Holding costs are incurred and

cash flows are discounted.

Chen and Sapra (2013) consider a periodic review model for a perishable product over a

finite horizon, with fixed lifetime of two periods with excess demand backlogged. The

FIFO system is compared with two widely analyzed inventory systems that correspond

to non-perishable and one-period lifetime products to understand if demand

management would modify our understanding of the relationship among the three
10

systems. We also find that it is more likely that bigger orders are placed in the FIFO

system than for a non-perishable product when demand is managed.


11

CHAPTER 3: Mathematical formulation

In this chapter we discuss the development of a mathematical model for the inventory

management problem of perishable products, with probabilistic demand. Dynamic

Programming techniques are used in the model development. We first discuss the

traditional model discussed in the literature where products utility and price of products

is same throughout its life time then discuss the problem statement. Next we discuss a

model where we divide product life time in two parts: First part of the product has more

utility and in second part product utility is decreased and also price is decreased. After

that, second model is illustrated through an example.

3.1. Traditional model:

In this model the seasonal products is assumed to have a specific life time. Orders are

placed during predefined points on a time interval. Demand is stochastic. Cost includes

setup cost, holding cost, outdating cost and purchase cost. The model determines the

optimal strategy in terms of the number of items to be ordered in each period to

maximize the total profit. We next introduce the regarding notations and assumption

and discuss the model development.

3.1.1. Notations:

t : Total life time of the product (in periods)

N : Maximum numbers of periods of sales

C : Unit cost of the product


12

S : Setup cost

O : Unit outdating cost of the product

H : Holding cost period product

P : Unit selling price of the product

Minimum demand

Maximum demand

: Random variable which represents the number of units of demand where,

: Probability of having demand as units

: The order quantity at period n where,

: Total inventory on hand at the beginning of period n with remaining life

time of i periods where, and

i.e.

: Expected profit earned at period n when order quantity is Yn and

inventory on hand is

: Expected cumulative profit for period


13

3.1.2 Assumptions:

At the beginning of any period, all order are placed and received instantaneously

i.e. lead is zero

All products received are have life-time t

First in first out (FIFO) policy is used for demand fulfilment

If product is unsold beyond its life time, then it perishes and has to be discarded

at the rate of outdating cost

If Maximum numbers of periods of sales is N then we will order at periods

The products are seasonal products. Therefore, if period then

. It means after periods we will not order because there will be

no seals after period N.

If then = 0 . Because is the last sealing period of

the session.

If then means when we are not ordering product the setup cost

will be zero.

3.1.3. Model development:

The expected revenue for a given period n is given by:

Where,
14

represents demand which remains unsatisfied at period . When

then the demand is more than the products in hand and so a

positive non-zero value of the above term is obtained. But in other case when

, the demand is satisfied and so the value of demand which remains

unsatisfied at period becomes zero (negative value is also set to zero).

represents demand which gets fulfilled at period .

is price of the fulfilled demand at period

The expected holding cost for a given period n is given by:

Where

represents products remaining after demand fulfilment at the end

of period . When , there will be products remaining after

fulfilment of demand but when , there will be no products left after

demand fulfilment.

is holding cost of products remaining at the end of period

Total inventory on hand at the beginning of period n is:


15

Where, is the inventory at the beginning of period n which has life time of one

period. If ,then products will perish after period n and must be

discarded at the rate of unit outdating cost.

Then, the expected outdating cost for a given period is given by:

Where

The expected profit during any period n is given by:

From equation number (3.1), (3.2) and (3.3),


16

Applying dynamic programming principal as explained by Bellman (1954), the

expected cumulative profit at period is given by:

As in dynamic programming we start from last period, so the cumulative profit from

period last period of season to period is given by

where, represents the inventory left at the end of period

or at the beginning of period . If , then non-zero

inventory level exist at end of period and if then no

inventories will be carried over to next period. When is zero then, the

demand is being fulfilled by inventories with remaining lifetime . But positive

non-zero value of shows that demand is not being fulfilled by inventories

with remaining lifetime and is to be fulfilled by the inventory which are having

life time more than one period.


17

3.2. Problem Statement:

As we know, perishable products have a definite lifetime, it may happen that a

significant amount of products get outdated and wasted if they are not being sold before

the life time ends. When such products are not sold within the products life-time an

additional cost such as outdating cost often occurs. The objective of this study is to

determine an optimal strategy to maximize the total profit. The above traditional model

can be modified by reducing the price of products with lower remaining lifetime. This

will reduce the outdating of products due to increase in demand of products having

lower price.

To achieve this, the life time of products are divided into two parts with different

utilities such that second part has lesser utility with lesser price. Thus in second part,

demand will increase which will result in decreasing our inventory which was about to

perish. Depending on above objective, two decision variables are given as:

i. The price of the left out products with lesser utility in the second portion of

lifetime span. This will depend on inventory left.

ii. Order quantity at each ordering point depending on demand, holding cost, setup

cost, outdating cost.

Few assumption of the problem statement is:

i. Demand is probabilistic with truncated Poisson distribution

ii. Price and demand are linearly related

A sequence of decisions has to be made, and to achieve this, dynamic programming is

the best method to be applied.


18

3.3. Modified model:

This is the model developed in this thesis to overcome the limitations of traditional

model of outdating of products.

In this model the lifetime of products is assumed to pass through two phases. If product

life time has t periods then phase one consists of m periods where and phase

two has periods.

From receiving the product to end of period m, products have a higher utility , and

after m periods, products utility will decrease to ; where . When utility of

the products decrease after m periods, price are determined once again based on the

remaining inventory.

We next introduce the regarding notations and assumption and discuss the model

development.

3.3.1. Notations:

t : Total life time of the product (in periods)

m : Number of periods in which the product has a utility of

Number of periods in which the product has a utility of

N : Maximum numbers of periods of sales

C : Unit cost of the product

S : Setup cost

O : Unit outdating cost of the product


19

H : Holding cost period product

: Unit selling price of products with utility

: Unit selling price of products with utility

Minimum demand for any product

Maximum demand for any product

: Random variable which represents the number of units of demand for products

with utility where,

: Random variable which represents the number of units of demand for products

with utility where,

: Probability of having demand as units when only utility

products are available

: Probability of having demand as units

: Probability of having demand as units when both utility and

products are available

: The order quantity at period n where,

Total inventory on hand at the beginning of period n with remaining

life time of i periods for products with utility where,

and

Total inventory on hand at the beginning of period n with

remaining life time of i periods for products with utility where,


20

and

: Expected profit earned at period n for products with utility

when inventory on hand is

: Expected profit earned at period n for products with utility

which have remaining life time of periods

: Expected profit earned at period n for products with

utility when inventory and order quantity .

: Expected cumulative profit for products with utility for

periods

: Expected cumulative profit for products with utility which

have periods of remaining life time for the periods

Expected cumulative profit for products with utility

when inventory and order quantity for periods

: Total expected cumulative profit for

products with utility and for periods


21

3.3.2 Assumptions:

At the beginning of any period, all order are placed and received instantaneously

i.e. lead is zero

All products received are have life-time t

First in first out (FIFO) policy is used for demand fulfilment

If product is unsold beyond its life time, then it perishes and has to be discarded

at the rate of outdating cost

If Maximum numbers of periods of sales is N then we will order at periods

The products are seasonal products. Therefore, if period then

. It means after periods we will not order because there will be

no seals after period N.

If n=N then = 0 . Because is the last sealing period of the

session.

If then means when we are not ordering product the setup cost

will be zero.

when there are two utility type of products the

consumers may shift from buying products with utility to products with

utility

The probability of having a certain units of demand for products with utility

is same throughout the observation period.


22

3.3.3. Model development:

Beginning from period 1 until period when orders are placed only products with

utility would be available while from period to period

products with utility and would be available, from period is the last

ordering point. After period to period , we have only products with

utility . (this is explained with example later)

Expected revenue due to products with utility for a given period n is given by:

Where

represents demand which remains unsatisfied at period

for products with utility . When then the demand for

products with utility is more than the products with utility on hand and so a

positive non-zero value of the above term is obtained. But in other case when

, the demand for products is satisfied and so the value of demand

which remains unsatisfied at period for products with utility becomes zero

(negative value is also set to zero).

represents demand which gets fulfilled at period

for products.
23

is the price of the fulfilled demand at

period for products.

Expected holding cost due to products with utility U2 for a given period n is given by:

Where and

represents products remaining after demand fulfilment at the

end of period for products with utility . When , there will

be products remaining after fulfilment of demand but when ,

there will be no products left after demand fulfilment.

is holding cost of products remaining at the end of

period for products with utility .

Total inventory on hand at the beginning of period n for products. is:

Where, is the inventory at the beginning of period n which has life time of

one period. If , products will be perish after

period n and must be discarded at the rate of outdating cost.

Then, the expected outdating cost for a given period n is given by:
24

Where

The expected profit due to products with utility U2 during any period n is given by:

From equation number (3.5),(3.6) and(3.7)


25

Applying of dynamic programming principal of explained by Bellman (1954), the

expected cumulative profit due to U2 at period is given by:

Applying backward induction principal of dynamic programming we start from the last

period, and obtain the cumulative profit due to U2 from period

to period is as

where, represents the inventory left of

U2 at the end of period or at the beginning of period . If

, then inventories will be there at the end of

period and if then no inventories will be

carried over to next period. When is zero then, the demand is

being fulfilled by inventories with remaining lifetime . But positive non-zero


26

value of shows that demand is not being fulfilled by inventories

with remaining lifetime and is to be carried by other type of inventories.

We next discuss two cases with respect to the product with utility . In first case when

products with utility are both available at a same period then the probability

of the demand . In second case when products with utility only available

at any period then the probability of the demand

Case I: When there is change in type of product from utility to from one period to

another, the inventory being carried to next such period will depend on demand of

previous period. So, cumulative profit due to such kind of products will have to be

handled separately along with products with utility .

Expected revenue due to for inventory during

period n is given by:

represents demand which remains unsatisfied at period for

which include inventory . When

then the demand for is more than the inventory

in hand and so a positive non-zero value of the above term is obtained.

But in other case when , the demand for

is satisfied and so the value of demand which remains unsatisfied at period for

becomes zero (negative value is also set to zero).


27

represents demand which gets fulfilled at period

for which include inventory .

is price of the fulfilled demand at period

for which include inventory .

Expected holding cost due to for inventory

during period n is given by:

represents products remaining after demand fulfilment at the

end of period for which include inventory .

When , there will be products remaining after fulfilment of

demand but when , there will be no products left of inventory

after demand fulfilment by inventory .

is holding cost of products remaining at the end of

period for which include inventory .

The expected profit due to product for inventory

during any period n is given by:


28

From equation number (3.10) and(3.11)

Applying dynamic programming principal as explained by Bellman (1954), the

expected cumulative profit due to products for inventory

at period is given by:


29

Expected revenue due to product for inventory

and order quantity during period n is given by:

gives demand which remains unfulfilled by products whose

utility will decrease from to in next period i.e. such products are given first

priority for using them for demand fulfilment. Then we try to fulfil the remaining

demand by other products of utility .

represents demand which

remains unsatisfied at period for . When

then the demand which remains

unfulfilled by products whose utility will decrease from to in next period is more

than other products of utility in hand and so a positive non-zero value of the above

term is obtained. But in other case when

, the demand for

is satisfied and so the value of demand which remains

unsatisfied at period for becomes zero (negative value is

also set to zero).


30

represents demand which gets fulfilled at period for

which include inventory and order quantity .

is price of the fulfilled demand at period for

which include inventory and order quantity .

Expected holding cost due to for inventory

and order quantity during period n is given by:

represents products

remaining after demand fulfilment at the end of period for

which include inventory and order quantity

.When , there will be products

of inventory and order quantity remaining after fulfilment of

demand but when , there will be

no products left of inventory and order quantity after demand

fulfilment by inventory and order quantity .


31

is holding cost of

products remaining at the end of period for which include

inventory and order quantity .

The expected profit due to product for inventory and order

quantity during any period n is given by:

From equation number (3.14) and(3.15)


32

Applying dynamic programming principal as explained by Bellman (1954), the

expected cumulative profit due to for inventory

and order quantity is given by:

Case II:

Expected revenue due to product for inventory

during period n is given by:

Expected holding cost due to for inventory

during period n is given by:


33

The expected profit due to for inventory during

any period n is given by:

rom equation number (3.18) and(3.19)

Applying dynamic programming principal as explained by Bellman (1954), the

expected cumulative profit due to for inventory

is given by:
34

Expected revenue due to for inventory and

order quantity during period n is given by:

Expected holding cost due to for inventory

and order quantity during period n is given by:

The expected profit due to for inventory

and order quantity during any period n is given by:


35

From equation number (3.22) and(3.23)

Applying dynamic programming principal as explained by Bellman (1954), the

expected cumulative profit due to for inventory

and order quantity is given by:

Total expected cumulative profit due to and given by:


36

From equation number

3.4. Illustration of Modified model:

In this section we illustrate the Modified model with a small example. We have taken

total periods of observation. Life time of the product periods and we

equally divide life time of the product in two parts first part periods product has

utility of U1 and remaining life time of the product t periods has utility of U2

where .

And we will order only first periods because our model on seasonal

product so demand of the product will be decrease at the end of the season and after 6

periods demand will be zero.


37

Figure 4.1: Modified model with 6 selling period


From figure 4.1

Period 1

At the beginning of period 1 , initial inventory is zero and Y 1 with life time 4 periods.

So, In period 1 we have products of utility only with lifetime 4 periods. If demand of

period 1 is

i. If thus the inventory transferred from period 1 to period 2 is

ii. If thus the inventory transferred from period 1 to period 2 is

Period 2

At the beginning of period 2 , initial inventory is and is ordered with life

time 4 periods. So, in period 2 we have products of utility with some with less

remaining lifetime than others. So we should follow FIFO policy to allow the stock
38

from previous period to clear first, i.e. & are with same value of utility

but is more priority than . If demand of period 2 is

i. If thus the inventory transferred from period 2 to period 3 is

and

ii. If and thus the inventory transferred

from period 2 to period 3 is

iii. If and thus the inventory transferred

from period 2 to period 3 is

Period 3

At beginning of period 3 , initial inventory is and is order with

lifetime 4 periods and this is the last ordering point . In period 3 we have

and , for utility some products with less remaining

lifetime than others. So for we should follow FIFO policy to

allow the stock from previous period to clear first, i.e. & are with same

value of utility but is more priority than . If demand of period 3 for

is and for product is .

For :

i. If thus the inventory transferred from period 3 to period 4 is

ii. If thus the inventory transferred from period 3 to period 4 is


39

For :

i. If thus the inventory transferred from period 3 to period 4 is

and

ii. If and thus the inventory transferred

from period 3 to period 4 is

iii. If and thus the inventory transferred

from period 3 to period 4 is

Period 4

At beginning of period 4, initial inventory is and . So, in

period 4 we have and , for utility some products with

less remaining lifetime than others. So for product we should follow FIFO policy to

allow the stock from previous period to clear first, i.e. & are with

same value of utility but is more priority than . If demand of

period 4 for U2 is and for U1 is

For :

i. If thus the inventory transferred from period 4 to period 5 is

and products will be perish after 4

period.
40

ii. If and thus the inventory

transferred from period 4 to period 5 is

iii. If and thus the inventory

transferred from period 4 to period 5 is

For product

i. If thus the inventory transferred from period 4 to period 5 is

ii. If thus the inventory transferred from period 4 to period 5 is

Period 5

At beginning of period 5, initial inventory is and . So, in period 5 we

have only some products with less remaining lifetime than

others. So for we should follow FIFO policy to allow the

stock from previous period to clear first, i.e. & are with same value

of utility but is more priority than . If demand of period 5 for

U2 is .

i. If thus the inventory transferred from period 5 to period 6 is

and products will be perish after 5

period.
41

ii. If and thus the inventory

transferred from period 5 to period 6 is

iii. If and thus the inventory

transferred from period 5 to period 6 is

Period 6

At the beginning of period 6 , initial inventory is . So, In period 6 only we have

U2 with lifetime 1 period. If demand of period 6 is

i. If then no product will be perish after 6 period

ii. If the products will be perish after 6

periods.

6 period formulas:

Period 6
42

Period 5
43

Where,

Period 4
44

Where,

Where,
45

Period 3

Where,
46

Where,

Where,

Period 2
47

Where ,

Where ,

Or

Or
48

Period 1

Where

From the illustration above, we can obtain the expected profit of every period (i. e.

From 1 to 6) which is the reward function of dynamic programming. Also it gives the

inventory details of each period.

The next chapter demonstrates the results of the traditional model and modified model

obtained through simulations using VBA (Visual Basic for Applications) programming.
49

Chapter 4: Result and analysis

In this chapter we illustrate the model developed in chapter 3 through numerical

example. We obtain solution to the model in the form of evaluating the optimal order at

each period and determining the optimal price for the product with lower utility. The

model is evaluated for various parameter changes comparison with traditional model is

also performed.

In section 4.1 we illustrate the traditional model and section 4.2 we illustrate the model

under study. The model is analyzed for parameter changes. In section 4.3 we compare

the modified model with the traditional model.

4.1. Results of traditional model:

We calculated the expected cumulative profit for Traditional model and in this section

we show the changes of expected cumulative profit by changing unit cost, setup cost,

holding cost and outdating cost. Where, total number of observation periods, and

lifetime of the products, .

For the purpose of calculating the cumulative profit, we assume the per period demand

of product varying from 1 to 20 (means minimum demand is 1 and maximum demand

is 20). The demand is following Truncated Poisson Distribution. The mean value of

demand depends on selling price of the product i.e. if price of the product increases,

the mean value of demand decreased.


50

Table 4.1: Probability of having demand as units for Traditional model when unit selling

price

1 0.00847267 11 0.03699328

2 0.02825635 12 0.01992095

3 0.06282328 13 0.01094994

4 0.10475781 14 0.00502629

5 0.13974692 15 0.00223502

6 0.15535199 16 0.00093173

7 0.14802826 17 0.00036557

8 0.12341856 18 0.00013546

9 0.09146687 19 4.7554E-05

10 0.0610084 20 1.5859E-05

4.1.1. The total expected cumulative profit:

Case I: Varying setup cost from 200 to 0 with unit costs

Per unit per period holding cost , per unit Outdating cost , per unit

selling price
51

Table 4.2: Total expected cumulative profit with variation of setup cost and unit cost, for

traditional model

Unit cost Unit cost Unit cost

setup cost Total setup cost Total setup cost Total


expected expected expected
cumulative cumulative cumulative
profit profit profit
200 964.552312 200 1345.60048 200 1681.71165

175 1014.54995 175 1345.60048 175 1756.70811

150 1064.54759 150 1420.59693 150 1831.70456

125 1114.54522 125 1495.59339 125 1906.70102

100 1186.41068 100 1570.58985 100 1981.69748

75 1261.40714 75 1645.5863 75 2056.69393

50 1336.40359 50 1720.58276 50 2131.69039

25 1411.40005 25 1795.57922 25 2206.68685

0 1486.39651 0 1870.57567 0 2281.6833

Case II: Changing holding cost when setup cost, unit cost and outdating cost is fixed

Setup cost , unit cost , outdating cost , per unit selling

price

Table 4.3: Variation of total expected cumulative profit with holding cost for traditional

model

1 1242.46067
52

2 1186.41068

3 1133.0327

4 1099.11449

5 1069.80758

6 1040.59608

7 1012.14592

8 986.078454

9 960.010992

10 934.36116

Case III: Changing outdating cost when setup cost, unit cost and holding cost is fixed

Setup cost , unit cost , holding cost , per unit selling price

Table 4.4: Total expected cumulative profit outdating cost for traditional model

1 1188.22116

2 1186.41068

3 1184.60021

4 1182.78973

5 1180.97925

6 1179.16877

7 1177.3583

8 1175.85106
53

9 1174.44866

10 1173.04625

4.2. Results of Modified model:

We calculated the expected cumulative profit for modified model and in this section we

show the changes of expected cumulative profit by changing unit cost, setup cost,

holding cost and outdating cost.. We also calculate the order quantities in each ordering

point and decide the price of . For deciding the price of

, we have two price options. Depending on the inventory of

and we will decide which price will be the best option.

Per unit selling price for ,

Per unit selling price for , where, we have to

choose the best price out of 75 and 60 for utility type of products depending on

inventory of .

Total number of observation periods,

Lifetime of the products, .

Number of periods for ,

Number of periods for ,

For the purpose of calculating the cumulative profit, we assume the per period demand

of product varying from 1 to 20 (means minimum demand is 1 and maximum demand

is 20) . The demand is following Truncated Poisson Distribution. The mean value of
54

demand depends on selling price of the product i.e. if price of the product increases,

the mean value of demand decreased.

For the purpose of calculating the cumulative profit, we assume the per period demand

of product varying from 1 to 20 (means minimum demand is 1 and maximum demand

is 20). The demand is following Truncated Poisson Distribution. The mean value of

demand depends on selling price of the product i.e. if price of the product increases, the

mean value of demand decreased.

When we have both , the mean value of demand for

will be lower than that when we have only

on hand. This decrease in mean value of demand is due to

dependency of this demand on selling price of .

Table 4.5: Probability of demand for utility type of products when, only products with utility

are available

1 0.00847267 11 0.03699328

2 0.02825635 12 0.01992095

3 0.06282328 13 0.01094994

4 0.10475781 14 0.00502629

5 0.13974692 15 0.00223502

6 0.15535199 16 0.00093173

7 0.14802826 17 0.00036557

8 0.12341856 18 0.00013546

9 0.09146687 19 4.7554E-05
55

10 0.0610084 20 1.5859E-05

Table 4.6: Probability of demand for products with utility when, both products with utility

are available

When, When,
1 0.0170934 0.0258218

2 0.0498808 0.0688926

3 0.0970389 0.122537

4 0.1415858 0.1634643

5 0.165266 0.1744491

6 0.1607556 0.1551434

7 0.13403 0.1182636

8 0.0977791 0.0787818

9 0.063407 0.0467682

10 0.0370059 0.0239555

11 0.0196342 0.0129057

12 0.0089492 0.005483

13 0.004687 0.0022095

14 0.0017872 0.0008421

15 0.0006954 0.0002996

16 0.0002536 9.991E-05

17 8.708E-05 3.136E-05

18 2.823E-05 9.296E-06
56

19 8.673E-06 2.611E-06

20 2.531E-06 6.966E-07

Table 4.7: Probability of demand for products with utility

When, When,
1 0.0170934 0.0008251

2 0.0498808 0.0038509

3 0.0970389 0.0119814

4 0.1415858 0.0279586

5 0.165266 0.0521931

6 0.1607556 0.0811951

7 0.13403 0.1082679

8 0.0977791 0.1263216

9 0.063407 0.1310095

10 0.0370059 0.1222843

11 0.0196342 0.1037638

12 0.0089492 0.0807109

13 0.004687 0.0579504

14 0.0017872 0.0386364

15 0.0006954 0.0240421

16 0.0002536 0.0144256

17 8.708E-05 0.0077009

18 2.823E-05 0.0039933

19 8.673E-06 0.0019618
57

20 2.531E-06 0.0009156

4.2.1. Selection of best price for products with utility :

Case I: Products have remaining lifetime of only one period

Setup cost , unit cost , holding cost , outdating cost

Table 4.8: Expected profit for products with utility where, products have remaining lifetime

of only one period

Inventory of products Expected profit for Expected profit for


with utility products with utility , products with utility ,
(remaining lifetime of when, when,
one period) (remaining lifetime of one (remaining lifetime of one
period) period)

1 74.99814 59.99931

2 148.50606 119.9392

3 217.66718 179.6018

4 278.3756 238.4018

5 326.75629 295.1888

6 360.75358 348.2178

7 380.76603 395.4008

8 389.2106 434.7885

9 389.15622 465.081

10 383.52326 485.9409
58

11 374.67651 497.9963

12 364.12535 502.5807

13 352.74561 501.3539

14 340.99403 495.9547

15 329.0875 487.7737

16 317.12073 477.8616

17 305.13198 466.9109

18 293.13569 455.4057

19 281.13695 443.613

20 269.13747 431.6791
.

...............

...............
...............
.

78 -426.8453 -264.313

79 -438.845 -276.313

80 -450.8447 -288.313

The Table 4.8 shows expected profit for two prices of products with utility . We can

decide the value of price for different inventories by comparing the expected profit

of the two price of products. Price for which expected profit is higher than the other, is

chosen as price of products with utility for that number of inventory of products with

utility . As we can observe from table that when inventory of products with utility

utility is in range [1,6], is the best option for price and when it is more than 6,

is the best option for price.


Number of products of utility type with remaining lifetime of one period

7 6 5 4 3 2 1 0

0
380.766 360.7536 326.7563 278.3756 217.6672 148.5061 74.99814 0

1
390.7406 382.0301 361.6961 327.3682 278.7041 217.8014 148.5403 74.99814

2
392.4115 392.0046 382.9726 362.308 327.6967 278.8383 217.8356 148.5403

3
388.6322 393.6756 392.9472 383.5845 362.6365 327.8309 278.8725 217.8356
4
381.7129 389.8962 394.6181 393.559 383.913 362.7707 327.8651 278.8725
Number of products of

373.1284 382.9769 390.8388 395.23 393.8875 384.0472 362.805 327.8651


of one period and two periods where

363.7343 374.3924 383.9195 391.4506 395.5585 394.0217 384.0814 362.805


7

353.977 364.9984 375.335 384.5314 391.7791 395.6927 394.056 384.0814


8

344.0683 355.241 365.9409 375.9469 384.8599 391.9133 395.727 394.056


Table 4.9: Expected profit for products with utility

334.1007 345.3323 356.1836 366.5528 376.2754 384.994 391.9476 395.727


0
1

324.1116 335.3647 346.2749 356.7955 366.8813 376.4095 385.0283 391.9476


1
1

314.1152 325.3757 336.3073 346.8868 357.124 367.0155 376.4438 385.0283


2
1

304.1164 315.3793 326.3182 336.9192 347.2153 357.2582 367.0497 376.4438


3
1

294.1169 305.3805 316.3218 326.9301 337.2477 347.3494 357.2924 367.0497


4
1

284.1171 295.3809 306.323 316.9337 327.2586 337.3819 347.3837 357.2924


Case II: Products have remaining lifetime of one period and two periods

...
.....

8
7

-355.867 -344.603 -333.661 -323.049 -312.721 -302.587 -292.553 -282.553


9
7

-365.867 -354.603 -343.661 -333.049 -322.721 -312.587 -302.553 -292.553


utility type with remaining lifetime of two periods
where, products have remaining lifetime

0
8

-375.867 -364.603 -353.66 -343.049 -332.721 -322.587 -312.553 -302.553


59
Number of products of utility type with remaining lifetime of one period

80 79 78 ............... 14 13 12 11 10 9 8
-450.845 -438.845 -426.845 340.994 352.7456 364.1254 374.6765 383.5233 389.1562 389.2106

-460.844 -448.845 -436.845 331.0853 342.9883 354.7313 366.092 376.604 385.3769 390.8816

-470.844 -458.844 -446.845 321.1177 333.0796 344.974 356.698 368.0195 378.4576 387.1022

-480.844 -468.844 -456.845 311.1287 323.112 335.0653 346.9406 358.6254 369.8731 380.1829

-490.844 -478.844 -466.844 301.1323 313.1229 325.0977 337.0319 348.8681 360.479 371.5984

-500.843 -488.844 -476.844 291.1335 303.1265 315.1086 327.0643 338.9594 350.7217 362.2044

-510.843 -498.843 -486.844 281.1339 293.1277 305.1122 317.0753 328.9918 340.813 352.447
-520.843 -508.843 -496.844 271.1342 283.1282 295.1134 307.0789 319.0027 330.8454 342.5383
-530.843 -518.843 -506.843 261.1344 273.1284 285.1139 297.08 309.0063 320.8563 332.5707
-540.842 -528.843 -516.843 251.1347 263.1287 275.1141 287.0805 299.0075 310.8599 322.5817

-550.842 -538.842 -526.843 241.1349 253.1289 265.1144 277.0808 289.008 300.8611 312.5853

-560.842 -548.842 -536.843 231.1352 243.1292 255.1146 267.081 279.0082 290.8616 302.5865

-570.842 -558.842 -546.842 221.1354 233.1294 245.1149 257.0813 269.0085 280.8618 292.5869

-580.841 -568.842 -556.842 211.1357 223.1296 235.1151 247.0815 259.0087 270.8621 282.5872

-590.841 -578.842 -566.842 201.1359 213.1299 225.1153 237.0818 249.009 260.8623 272.5874

-1230.83 -1218.83 -1206.83 -438.848 -426.854 -414.869 -402.902 -390.975 -379.122 -367.397

-1240.83 -1228.83 -1216.83 -448.848 -436.854 -424.869 -412.902 -400.975 -389.122 -377.396

-1250.82 -1238.83 -1226.83 -458.848 -446.854 -434.868 -422.902 -410.975 -399.121 -387.396
60
Number of products of utility type with remaining lifetime of one period

8 7 6 5 4 3 2 1 0

0
434.7885 395.4008 348.2178 295.1888 238.4018 179.6018 119.9392 59.99931 0

1
465.9062 435.361 395.7568 348.4114 295.278 238.4351 179.6112 119.9409 59.99931
2
487.8533 466.4788 435.717 395.9504 348.5006 295.3113 238.4445 179.6128 119.9409
3

501.2405 488.4258 466.8348 435.9107 396.0397 348.534 295.3207 238.4461 179.6128


4

507.3642 501.813 488.7819 467.0284 435.9999 396.073 348.5433 295.3223 238.4461


5

507.8381 507.9367 502.169 488.9755 467.1176 436.0332 396.0823 348.545 295.3223


Number of products of
of one period and two periods where

504.2555 508.4107 508.2927 502.3626 489.0647 467.151 436.0426 396.084 348.545


7

497.9684 504.8281 508.7667 508.4864 502.4519 489.098 467.1603 436.0442 396.084


8

489.9983 498.5409 505.1841 508.9603 508.5756 502.4852 489.1074 467.162 436.0442


Table 4.10: Expected profit for products with utility

481.0184 490.5709 498.8969 505.3777 509.0495 508.6089 502.4945 489.109 467.162


0
1

471.4995 481.591 490.9269 499.0906 505.4669 509.0828 508.6183 502.4962 489.109


1
1

461.701 472.072 481.947 491.1205 499.1798 505.5003 509.0922 508.6199 502.4962


2
1

451.7652 462.2736 472.428 482.1406 491.2097 499.2131 505.5096 509.0938 508.6199


3
1

441.7653 452.3378 462.6296 472.6217 482.2298 491.243 499.2225 505.5113 509.0938


4
1

431.7655 442.3379 452.6938 462.8232 472.7109 482.2632 491.2524 499.2241 505.5113


..
.....

8
7

-208.227 -197.655 -187.299 -177.105 -167.016 -156.983 -146.974 -136.972 -126.972


9
7

-218.227 -207.655 -197.299 -187.105 -177.016 -166.983 -156.974 -146.972 -136.972


utility type with remaining lifetime of two periods

0
8
where, products have remaining lifetime

-228.227 -217.654 -207.299 -197.105 -187.016 -176.983 -166.974 -156.972 -146.972


61
Number of products of utility type with remaining lifetime of one period

80 79 78 .... 14 13 12 11 10 9
-288.313 -276.313 -264.313 495.9547 501.3539 502.5807 497.9963 485.9409 465.081
-298.312 -286.313 -274.313 489.6676 497.7713 503.0546 504.12 499.3281 487.0281

is more than 6,
products with utility
-308.312 -296.312 -284.313 481.6975 491.4842 499.4721 504.594 505.4518 500.4153
-318.312 -306.312 -294.313 472.7176 483.5141 493.1849 501.0114 505.9257 506.539
-328.312 -316.312 -304.312 463.1987 474.5342 485.2148 494.7242 502.3431 507.0129
-338.312 -326.312 -314.312 453.4002 465.0153 476.235 486.7541 496.056 503.4303
-348.312 -336.312 -324.312 443.4644 455.2168 466.716 477.7743 488.0859 497.1432

is in range [1,6],
-358.312 -346.312 -334.312 433.4645 445.281 456.9176 468.2553 479.106 489.1731
-368.312 -356.312 -344.312 423.4646 435.2811 446.9818 458.4569 469.5871 480.1932
-378.312 -366.312 -354.312 413.4648 425.2813 436.9819 448.5211 459.7886 470.6743
-388.311 -376.312 -364.312 403.4649 415.2814 426.982 438.5212 449.8528 460.8758
-398.311 -386.311 -374.312 393.465 405.2815 416.9821 428.5213 439.853 450.94
-408.311 -396.311 -384.311 383.4651 395.2816 406.9822 418.5214 429.8531 440.9402

products with remaining lifetime of one period and two periods.


-418.311 -406.311 -394.311 373.4652 385.2817 396.9823 408.5215 419.8532 430.9403
-428.311 -416.311 -404.311 363.4653 375.2818 386.9825 398.5216 409.8533 420.9404

-1068.3 -1056.3 -1044.3 -276.527 -264.711 -253.01 -241.471 -230.139 -219.052


-1078.3 -1066.3 -1054.3 -286.527 -274.711 -263.01 -251.471 -240.139 -229.052

is the best option for price and when it


-1088.3 -1076.3 -1064.3 -296.527 -284.711 -273.01 -261.471 -250.139 -239.052

is the best option for price; when we have both type of


Similarly from Table 4.9 and Table 4.10 we can observe that, when inventory of
62
63

So from both the cases, Case I and Case II, if we have inventory of products with utility

between 1 to 6 units then and if we have inventory more than 6 units then

4.2.2. The total expected cumulative profit:

Case I: Changing setup cost from 200 to 0 at unit cost

Per unit per period holding cost , per unit Outdating cost , per unit

selling price and

Table 4.11: Total expected cumulative profit changing with setup cost and unit cost for

Modified model

Unit cost Unit cost Unit cost


setup cost Total setup cost Total setup cost Total
expected expected expected
cumulative cumulative cumulative
profit profit profit
200 1638.751923 200 1900.683024 200 2193.043092

175 1686.641052 175 1949.362274 175 2242.584459

150 1734.530181 150 1998.209844 150 2312.768517

125 1782.41931 125 2047.416203 125 2387.308703

100 1830.308439 100 2118.137004 100 2461.848889

75 1878.830046 75 2192.246697 75 2536.389074

50 1951.717994 50 2266.451874 50 2610.92926

25 2024.605941 25 2340.657051 25 2685.469445

0 2097.493889 0 2414.862228 0 2760.009631


64

Case II: Changing holding cost when setup cost, unit cost and outdating cost is fixed

Setup cost , unit cost , outdating cost , per unit selling

price and

Table 4.12: Total expected cumulative profit changing with holding cost for Modified model

1 1905.520394

2 1830.308439

3 1761.046327

4 1694.326037

5 1629.508992

6 1568.274563

7 1512.010873

8 1456.420626

9 1402.989476

10 1349.911998

Case III: Changing outdating cost when setup cost, unit cost and holding cost is fixed

Setup cost , unit cost , holding cost , per unit selling price

and

Table 4.13: Total expected cumulative profit changing with outdating cost for Modified model

1 1835.739206
65

2 1830.308439

3 1824.877672

4 1819.739331

5 1815.075141

6 1810.410951

7 1805.746761

8 1801.409853

9 1797.463625

10 1793.517396

4.2.3. Decide the order quantity at each ordering point:

Depending on maximum total expected cumulative profit = 1830.308439 at Setup cost

, unit cost , holding cost , outdating cost per

unit selling price

and we will order at first period

Table 4.14: Decide order quantity at the beginning of period 2 and period 3 depending

on inventory on hand when

Period 2 Period 3

Inventory on Order quantity Inventory on Inventory on Order quantity


hand hand hand

0 10 0 0 22

1 9 0 1 21
66

2 8 0 2 20

3 7 0 3 19

4 6 0 4 to 6 18

5 to 7 5 0 7 or 8 17

8 to 19 0 0 9 16

1 9 16

1 or 2 7 or 8 17

3 7 17

1 or 2 5 or 6 18

3 6 17

4 6 17

3 5 18

4 5 18

5 5 18

1 to 6 0 22

7 to 19 0 21

The order quantity at period 2 will depend on the inventory from period 1. At period 3

we will be having products of both utility and . So depending on inventories of

both types of utility products at period 3, we get order quantity of period 3 as shown in

Table 4.14. Also, from this table inventory in period 2 will vary from 0 to 19, as

. We can observe the order quantity at period 2 can be 0 or 5 to 10

depending on inventory. For different combinations of and type of products with

inventories of type varying from 0 to 10 (as maximum value of ) and of


67

type varying from 0 to19 (as maximum value of ), we get order quantity values

ranging from 16 to 22.

4.3. Comparison of Traditional model and Modified model :

In this section we are comparing Traditional model with modified model by changing

setup cost, unit cost, holding cost and outdating cost .

Table 4.15 Expected Cumulative Profit of Traditional model and Modified model for different

combinations of related costs

All cost related the both model Traditional Modified model

model

Sl. Unit Setup Holding Outdating Expected Expected Expected


no. cost cost cost cost cumulative cumulative cumulative
(C) (S) (H) (O) profit profit profit

1 50 200 2 2 964.552312 1638.751923 1577.452216

2 50 175 2 2 1014.54995 1686.641052 1625.341344

3 50 150 2 2 1064.54759 1734.530181 1673.230473

4 50 125 2 2 1114.54522 1782.41931 1721.119602

5 50 100 2 2 1186.41068 1830.308439 1769.008731

6 50 75 2 2 1261.40714 1878.830046 1816.89786

7 50 50 2 2 1336.40359 1951.717994 1879.304477

8 50 25 2 2 1411.40005 2024.605941 1952.192425

9 50 0 2 2 1486.39651 2097.493889 2025.080372

10 40 200 2 2 1345.60048 1900.683024 1838.184084

11 40 175 2 2 1345.60048 1949.362274 1886.863334


68

12 40 150 2 2 1420.59693 1998.209844 1935.542583

13 40 125 2 2 1495.59339 2047.416203 1984.418831

14 40 100 2 2 1570.58985 2118.137004 2033.62519

15 40 75 2 2 1645.5863 2192.246697 2091.419866

16 40 50 2 2 1720.58276 2266.451874 2165.625043

17 40 25 2 2 1795.57922 2340.657051 2239.83022

18 40 0 2 2 1870.57567 2414.862228 2314.035397

19 30 200 2 2 1681.71165 2193.043092 2129.538765

20 30 175 2 2 1756.70811 2242.584459 2179.080132

21 30 150 2 2 1831.70456 2312.768517 2228.621499

22 30 125 2 2 1906.70102 2387.308703 2278.162866

23 30 100 2 2 1981.69748 2461.848889 2331.086186

24 30 75 2 2 2056.69393 2536.389074 2405.626372

25 30 50 2 2 2131.69039 2610.92926 2480.166557

26 30 25 2 2 2206.68685 2685.469445 2554.706743

27 30 0 2 2 2281.6833 2760.009631 2629.246929

28 50 100 1 2 1242.46067 1905.520394 1835.821399

29 50 100 2 2 1186.41068 1830.308439 1769.008731

30 50 100 3 2 1133.0327 1761.046327 1706.77105

31 50 100 4 2 1099.11449 1694.326037 1646.852688

32 50 100 5 2 1069.80758 1629.508992 1588.395305

33 50 100 6 2 1040.59608 1568.274563 1535.521254

34 50 100 7 2 1012.14592 1512.010873 1484.78908

35 50 100 8 2 986.078454 1456.420626 1435.290521


69

36 50 100 9 2 960.010992 1402.989476 1386.726246

37 50 100 10 2 934.36116 1349.911998 1340.758792

38 50 100 2 1 1188.22116 1835.739206 1774.694196

39 50 100 2 2 1186.41068 1830.308439 1769.008731

40 50 100 2 3 1184.60021 1824.877672 1763.635234

41 50 100 2 4 1182.78973 1819.739331 1758.754909

42 50 100 2 5 1180.97925 1815.075141 1753.874585

43 50 100 2 6 1179.16877 1810.410951 1748.99426

44 50 100 2 7 1177.3583 1805.746761 1744.365718

45 50 100 2 8 1175.85106 1801.409853 1740.247675

46 50 100 2 9 1174.44866 1797.463625 1736.129632

47 50 100 2 10 1173.04625 1793.517396 1732.011589

We can observe from table 4.15, Modified model with is better than

Modified model with and Traditional model depending on Expected

Cumulative Profit for all the combinations of values of unit cost (C), setup cost (S),

holding cost (H) and outdating cost (O).


70

Chapter 5: Conclusion & Scope of future work

5.1. Conclusion

The model developed in this thesis for inventory management of seasonal perishable

products provide scope for improving the overall profit of the firm by varying products

preferences and price over its lifetime. The ordering policy and pricing policy of the

inventory management problem is determined. On comparison of this modified model

with the traditional model in which products have the same preference and price, we

find that the modified model increase the overall profit. This model also benefits the

customers by providing products at a lower cost. The model takes advantages of lower

prices to reduce expenses due to wastage of products.

5.2. Scope for future work

The model developed is only for two types of preference level of a product.
Model can be extended to study more levels of products preferences.

The demand is considered as discrete integer value in this model. But to get a
continuous range for demand, continuous real value of demand can be

considered.

This model can be extended to study non seasonal perishable products such as
bread, milk, and so on. This due to the fact that the demand for seasonal

products will stop when as the season ends but for non-seasonal products, the

demand remains throughout the year.


71

In the model develop the various level of product preferences are assume to vary

after a fixed period. Variation of product preference with respect to inventory

level offers scope for extension of the model.


72

References

1. NAMIAS, S. 1976. Myopic Approximations for the Perishable Inventory Problem.


Mgmt. Sci. 22, 1002-1008
2. EDWARD A. SILVER, (1981) Operation Research in Inventory Management: A
Review and Critique. Operations Research 29(4):628-645.
3. STEVEN NAMIAS. 1982. Perishable Inventory Theory: A Review. Vol. 30, No. 4 (Jul.
- Aug., 1982), pp. 680-708
4. Steven Nahmias, (1975) Optimal Ordering Policies for Perishable InventoryII.
Operations Research 23(4):735-749.
5. G.PADMANABHAN, PREM VRAT. 1993. EOQ models for perishable items under
stock dependent selling rate. European Journal of Operation Research 86(1995)281-192
6. Narendra Agrawal , Stephen A. Smith. 2012. Optimal inventory management for a
retail chain with diverse store demands. European Journal of Operational Research 225
(2013) 393403.
7. P. L. Abad, (1996) Optimal Pricing and Lot-Sizing Under Conditions of Perishability
and Partial Backordering. ManagementScience 42(8):1093-1104.
8. Barry Alan Pasternack, (2008) Optimal Pricing and Return Policies for Perishable
Commodities. Marketing Science27(1):133-140.
9. Dye, C. Y., & Ouyang, L. Y. (2005). An EOQ model for perishable items under stock-
dependent selling rate and time-dependent partial backlogging. European Journal of
Operational Research, 163(3), 776-783.
10. Hou, K. L. (2006). An inventory model for deteriorating items with stock-dependent
consumption rate and shortages under inflation and time discounting. European Journal
of Operational Research, 168(2), 463-474.
11. Soni, H., & Shah, N. H. (2008). Optimal ordering policy for stock-dependent demand
under progressive payment scheme. European Journal of Operational
Research, 184(1), 91-100.
12. Chung, K. J., Chu, P., & Lan, S. P. (2000). A note on EOQ models for deteriorating
items under stock dependent selling rate. European Journal of Operational
Research, 124(3), 550-559.
13. Hwang, H., & Hahn, K. H. (2000). An optimal procurement policy for items with an
inventory level-dependent demand rate and fixed lifetime. European Journal of
Operational Research, 127(3), 537-545.
73

14. Chande, A., Dhekane, S., Hemachandra, N., & Rangaraj, N. (2005). Perishable
inventory management and dynamic pricing using RFID technology. Sadhana,30(2-3),
445-462.
15. Chen, L. M., & Sapra, A. (2013). Joint inventory and pricing decisions for perishable
products with twoperiod lifetime. Naval Research Logistics (NRL),60(5), 343-366.
74

APPENDIX A

VBA Code for traditional model

Sub thesis_work()
Dim m As Double
Dim d_max As Double
Dim d_min As Double
Dim p1 As Double
Dim h As Double
Dim o As Double
Dim p2 As Double
Dim c As Double
Dim dip1 As Double
Dim dip2 As Double
Dim dip3 As Double
Dim dip4 As Double
Dim dip5 As Double
Dim dip6 As Double
Dim dip7 As Double
Dim dip8 As Double
Dim dip12 As Double
Dim dip42 As Double
Dim dip51 As Double
Dim dip61 As Double
Dim dip71 As Double
Dim dip81 As Double
Dim dip32 As Double
Dim r21 As Double
Dim r22 As Double
Dim inv As String

m = life_time.Value
d_max = max_demand.Value
d_min = min_demand.Value
p1 = p1_u1.Value
h = holding_cost.Value
o = outdating_cost.Value
c = p2_change.Value
u_c = unit_cost.Value
s = setup_cost.Value

'************************period 6**************************
'***********************************************************
For i = 0 To m * d_max
dip1 = 0
dip2 = 0
For d = 1 To 20
If i > d Then
dip1 = dip1 + (d * p1 - (i - d) * h - (i - d) * o) * Cells(4 + d, 6).Value
Else
dip2 = dip2 + i * p1 * Cells(4 + d, 6).Value
End If
Cells(i + 3, 11).Value = dip1 + dip2
Next d
Next i
75

' '*********************period 5*****************************


' '**********************************************************
'
'

For i = 0 To m * d_max
For k = 0 To m * d_max
dip1 = 0
dip2 = 0
dip3 = 0
For d = 1 To 20
If d <= i Then
dip1 = dip1 + (d * p1 - (i + k - d) * h - (i - d) * o) * Cells(d + 4, 6).Value
Else
If d <= (i + k) Then
dip1 = dip1 + (d * p1 - (i + k - d) * h) * Cells(d + 4, 6).Value
Else
dip3 = dip3 + (i + k) * p1 * Cells(d + 4, 6).Value
End If
End If

Next d
Cells(2, 16 + k).Value = k
Cells(2, 16 + k).Interior.Color = RGB(150, 0, 0)
Cells(3 + i, 15).Value = i
Cells(3 + i, 15).Interior.Color = RGB(150, 0, 0)
Cells(i + 3, 16 + k).Value = dip1 + dip2 + dip3
Next k
Next i
'
Max = 0
For i = 0 To m * d_max
For k = 0 To m * d_max
r1 = 0
r2 = 0
r21 = 0
r22 = 0
r23 = 0
r24 = 0
r25 = 0
r26 = 0
r27 = 0
r28 = 0
r29 = 0
f5 = 0
For d = 1 To 20

If d <= i Then
i1 = k
r24 = r24 + Cells(i1 + 3, 11).Value * Cells(d + 4, 6).Value
Else
If d <= i + k Then
i2 = k + i - d
r25 = r25 + Cells(i2 + 3, 11).Value * Cells(d + 4, 6).Value
Else
r26 = r26 + Cells(3, 11).Value * Cells(d + 4, 6).Value
End If
End If
76

Next d
f5 = r21 + r22 + r23 + r24 + r26 + Cells(i + 3, 16 + k).Value
Cells(i + 90, 16 + k).Value = f5
Cells(89, 16 + k).Value = k
Cells(89, 16 + k).Interior.Color = RGB(150, 0, 0)
Cells(90 + i, 15).Value = i
Cells(90 + i, 15).Interior.Color = RGB(150, 0, 0)

If Max < f5 Then


Max = f5
Cells(95, 10).Value = Max
Cells(95, 11).Value = i
Cells(95, 12).Value = k
Else
Max = Max
End If

Next k
Next i
'****************************************period 4*****************
For i = 0 To m * d_max
For k = 0 To m * d_max
For x = 0 To m * d_max
dip1 = 0
dip2 = 0
dip3 = 0
r41 = 0
For d = 1 To 20
If d <= i Then
dip1 = dip1 + (d * p1 - (i + k + x - d) * h - (i - d) * o) * Cells(d + 4, 6).Value
Else
If d <= (i + k + x) Then
dip2 = dip2 + (d * p1 - (i + k + x - d) * h) * Cells(d + 4, 6).Value

Else
dip3 = dip3 + (i + k + x) * p1 * Cells(d + 4, 6).Value

End If
End If
Next d
r41 = dip1 + dip2 + dip3

Cells(180 + i, 16 + x + (m * d_max + 1) * k).Value = r41


Cells(179, 16 + x + (m * d_max + 1) * k).Value = k & "," & x
Cells(179, 16 + x + (m * d_max + 1) * k).Interior.Color = RGB(150, 0, 0)
Cells(i + 180, 15).Value = i
Cells(180 + i, 15).Interior.Color = RGB(150, 0, 0)
Next x
Next k
Next i

For i = 0 To m * d_max
For k = 0 To m * d_max
For x = 0 To m * d_max

f31 = 0
f32 = 0
f33 = 0
f34 = 0
77

f4 = 0
For d = 1 To 20

If d <= i Then
i1 = k
k1 = x
z4 = Cells(i1 + 90, 16 + k1).Value
f31 = f31 + z4 * Cells(4 + d, 6).Value
Else
If d <= (i + k) Then
i1 = i + k - d
k1 = x
z4 = Cells(i1 + 90, 16 + k1).Value
f32 = f32 + z4 * Cells(4 + d, 6).Value
Else
If d <= (i + k + x) Then
i1 = 0
k1 = i + k + x - d
z4 = Cells(i1 + 90, 16 + k1).Value
f33 = f33 + z4 * Cells(4 + d, 6).Value
Else
i1 = 0
k1 = 0
z4 = Cells(i1 + 90, 16 + k1).Value
f34 = f34 + z4 * Cells(4 + d, 6).Value
End If
End If
End If

Next d
f4 = f31 + f32 + f33 + f34 + Cells(180 + i, 16 + x + (m * d_max + 1) * k).Value
Cells(270 + i, 16 + x + (m * d_max + 1) * k).Value = f4
Cells(269, 16 + x + (m * d_max + 1) * k).Value = k & "," & x
Cells(269, 16 + x + (m * d_max + 1) * k).Interior.Color = RGB(150, 0, 0)
Cells(i + 270, 15).Value = i
Cells(270 + i, 15).Interior.Color = RGB(150, 0, 0)
If Max < f4 Then
Max = f4
Cells(275, 10).Value = Max
Cells(275, 11).Value = i
Cells(275, 12).Value = k
Cells(275, 13).Value = x
Else
Max = Max
End If
Next x
Next k
Next i
'****************************************preiod 3'*************************

For k = 0 To m * d_max
For x = 0 To m * d_max
For y = 0 To m * d_max
r31 = 0
r32 = 0
r3 = 0
For d = 1 To 20
If d <= (x + y + k) Then
r31 = r31 + (d * p1 - (x + y + k - d) * h) * Cells(4 + d, 6).Value
Else
78

r32 = r32 + (x + y + k) * p1 * Cells(4 + d, 6).Value


End If
Next d
r3 = r31 + r32
Cells(360 + k, 16 + y + (m * d_max + 1) * x).Value = r3
Cells(359, 16 + y + (m * d_max + 1) * x).Value = x & "," & y
Cells(359, 16 + y + (m * d_max + 1) * x).Interior.Color = RGB(150, 0, 0)
Cells(k + 360, 15).Value = k
Cells(360 + k, 15).Interior.Color = RGB(150, 0, 0)
Next y
Next x
Next k
Max = 0
For k = 0 To m * d_max
For x = 0 To m * d_max
For y = 0 To m * d_max

f31 = 0
f32 = 0
f33 = 0
f34 = 0

f3 = 0
For d = 1 To 20

If d <= k Then
i1 = k - d
k1 = x
x1 = y
z4 = Cells(270 + i1, 16 + x1 + (m * d_max + 1) * k1).Value
f31 = f31 + z4 * Cells(4 + d, 6).Value
Else
If d <= (x + k) Then
i1 = 0
k1 = x + k - d
x1 = y
z4 = Cells(270 + i1, 16 + x1 + (m * d_max + 1) * k1).Value
f32 = f32 + z4 * Cells(4 + d, 6).Value
Else
If d <= (y + k + x) Then
i1 = 0
k1 = 0
x1 = y + k + x - d
z4 = Cells(270 + i1, 16 + x1 + (m * d_max + 1) * k1).Value
f33 = f33 + z4 * Cells(4 + d, 6).Value
Else
i1 = 0
k1 = 0
x1 = 0
z4 = Cells(270 + i1, 16 + x1 + (m * d_max + 1) * k1).Value
f34 = f34 + z4 * Cells(4 + d, 6).Value
End If
End If
End If

Next d
If y > 0 Then
f3 = f31 + f32 + f33 + f34 + Cells(360 + k, 16 + y + (m * d_max + 1) * x).Value - y *
u_c - s
Else
79

f3 = f31 + f32 + f33 + f34 + Cells(360 + k, 16 + y + (m * d_max + 1) * x).Value


End If
Cells(450 + k, 16 + y + (m * d_max + 1) * x).Value = f3
Cells(449, 16 + y + (m * d_max + 1) * x).Value = x & "," & y
Cells(449, 16 + y + (m * d_max + 1) * x).Interior.Color = RGB(150, 0, 0)
Cells(k + 450, 15).Value = k
Cells(450 + k, 15).Interior.Color = RGB(150, 0, 0)
If Max < f3 Then
Max = f3
Cells(455, 10).Value = Max
Cells(455, 11).Value = k
Cells(455, 12).Value = x
Cells(455, 13).Value = y
Else
Max = Max
End If
Next y
Next x
Next k

'****************************************period2********************************
***********
Max = 0
For y = 0 To m * d_max
For y2 = 0 To m * d_max
For x = 0 To m * d_max

f31 = 0
f32 = 0
f33 = 0
f34 = 0

f2 = 0
For d = 1 To 20

If d <= x Then

k1 = x - d
x1 = y2
y1 = y
z4 = Cells(450 + k1, 16 + y1 + (m * d_max + 1) * x1).Value
f31 = f31 + z4 * Cells(4 + d, 6).Value
Else
If d <= (x + y2) Then
k1 = 0
x1 = y2 + x - d
y1 = y
z4 = Cells(450 + k1, 16 + y1 + (m * d_max + 1) * x1).Value
f32 = f32 + z4 * Cells(4 + d, 6).Value
Else
k1 = 0
x1 = 0
y1 = y
z4 = Cells(450 + k1, 16 + y1 + (m * d_max + 1) * x1).Value
f33 = f33 + z4 * Cells(4 + d, 6).Value
End If
End If
80

Next d
If y2 > 0 Then
f2 = f31 + f32 + f33 + Cells(360, 16 + y2 + (m * d_max + 1) * x).Value - y2 * u_c - s
Else
f2 = f31 + f32 + f33 + Cells(360, 16 + y2 + (m * d_max + 1) * x).Value
End If
Cells(540 + y, 16 + x + (m * d_max + 1) * y2).Value = f2
Cells(539, 16 + x + (m * d_max + 1) * y2).Value = y2 & "," & x
Cells(539, 16 + x + (m * d_max + 1) * y2).Interior.Color = RGB(150, 0, 0)
Cells(y + 540, 15).Value = y
Cells(540 + y, 15).Interior.Color = RGB(150, 0, 0)
If Max < f2 Then
Max = f2
Cells(545, 10).Value = Max
Cells(545, 11).Value = y
Cells(545, 12).Value = y2
Cells(545, 13).Value = x
Else
Max = Max
End If
Next x
Next y2
Next y
'
'****************************************preiod
1*******************************************
'
'*******************************************************************************
************
cat = Cells(1, 3).Value
Max = 0
For y = 0 To m * d_max
For y2 = 0 To m * d_max
For y3 = 0 To m * d_max

f31 = 0
f32 = 0

f1 = 0
For d = 1 To 20

If d <= y3 Then

x1 = y3 - d
y21 = y2
y1 = y
z4 = Cells(540 + y1, 16 + x1 + (m * d_max + 1) * y21).Value
f31 = f31 + z4 * Cells(4 + d, 6).Value
Else
x1 = 0
y21 = y2
y1 = y
z4 = Cells(540 + y1, 16 + x1 + (m * d_max + 1) * y21).Value
f32 = f32 + z4 * Cells(4 + d, 6).Value
End If

Next d
If y3 > 0 Then
f1 = f31 + f32 + Cells(360, 16 + y3).Value - y3 * u_c - s
81

Else
f1 = f31 + f32 + Cells(360, 16 + y3).Value
End If
Cells(630 + y, 16 + y3 + (m * d_max + 1) * y2).Value = f1
Cells(629, 16 + y3 + (m * d_max + 1) * y2).Value = y2 & "," & y3
Cells(629, 16 + y3 + (m * d_max + 1) * y2).Interior.Color = RGB(150, 0, 0)
Cells(y + 630, 15).Value = y
Cells(630 + y, 15).Interior.Color = RGB(150, 0, 0)
If Max < f1 Then
Max = f1
Cells(635, 10).Value = Max
Cells(635, 11).Value = y
Cells(635, 12).Value = y2
Cells(635, 13).Value = y3

Cells(cat, 5).Value = Max


Cells(cat, 6).Value = y
Cells(cat, 7).Value = y2
Cells(cat, 8).Value = y3
Else
Max = Max
End If
Next y3
Next y2
Next y

End Sub
82

APPENDIX B

VBA Code for modified model

Sub thesis_work()
Dim m As Double
Dim d_max As Double
Dim d_min As Double
Dim p1 As Double
Dim p21 As Double
Dim p22 As Double
Dim h As Double
Dim o As Double
Dim p2 As Double
Dim c As Double
Dim dip1 As Double
Dim dip2 As Double
Dim dip3 As Double
Dim dip4 As Double
Dim dip5 As Double
Dim dip6 As Double
Dim dip7 As Double
Dim dip8 As Double
Dim dip12 As Double
Dim dip22 As Double
Dim dip42 As Double
Dim dip51 As Double
Dim dip61 As Double
Dim dip71 As Double
Dim dip81 As Double
Dim dip32 As Double
Dim r21 As Double
Dim r22 As Double
Dim inv As String

m = life_time.Value
d_max = max_demand.Value
d_min = min_demand.Value
p1 = p1_u1.Value
p21 = p21_u2.Value
p22 = p22_u2.Value
h = holding_cost.Value
o = outdating_cost.Value
c = p2_change.Value
u_c = unit_cost.Value
s = setup_cost.Value

'************************period 6**************************
'***********************************************************
For i = 0 To m * d_max
dip1 = 0
dip2 = 0
For d = 1 To 20
If i > d Then
dip1 = dip1 + (d * p21 - (i - d) * h - (i - d) * o) * Cells(4 + d, 7).Value
Else
83

dip2 = dip2 + i * p21 * Cells(4 + d, 7).Value


End If
Cells(i + 3, 11).Value = dip1 + dip2
Next d
Next i

For i = 0 To m * d_max
dip1 = 0
dip2 = 0
For d = 1 To 20
If i > d Then
dip1 = dip1 + (d * p22 - (i - d) * h - (i - d) * o) * Cells(4 + d, 8).Value
Else
dip2 = dip2 + i * p22 * Cells(4 + d, 8).Value
End If
Cells(i + 3, 12).Value = dip1 + dip2
Next d
Next i
'
'*********************period 5*****************************
'**********************************************************

For i = 0 To m * d_max
For k = 0 To m * d_max
dip1 = 0
dip2 = 0
dip3 = 0
For d = 1 To 20
If d <= (i + k) Then
If i > d Then
dip1 = dip1 + (d * p21 - (i + k - d) * h - (i - d) * o) * Cells(4 + d, 7).Value
Else
dip2 = dip2 + (d * p21 - (i + k - d) * h) * Cells(4 + d, 7).Value
End If
Else
dip3 = dip3 + (i + k) * p21 * Cells(4 + d, 7).Value
End If
Cells(2, 16 + k).Value = k
Cells(2, 16 + k).Interior.Color = RGB(150, 0, 0)
Cells(3 + i, 15).Value = i
Cells(3 + i, 15).Interior.Color = RGB(150, 0, 0)
Cells(i + 3, 16 + k).Value = dip1 + dip2 + dip3 '**************************
Next d
Next k
Next i

For i = 0 To m * d_max
For k = 0 To m * d_max
dip1 = 0
dip2 = 0
dip3 = 0
For d = 1 To 20
If d <= (i + k) Then
If i > d Then
dip1 = dip1 + (d * p22 - (i + k - d) * h - (i - d) * o) * Cells(4 + d, 8).Value
Else
dip2 = dip2 + (d * p22 - (i + k - d) * h) * Cells(4 + d, 8).Value
End If
84

Else
dip3 = dip3 + (i + k) * p22 * Cells(4 + d, 8).Value
End If
Cells(89, 16 + k).Value = k
Cells(89, 16 + k).Interior.Color = RGB(150, 0, 0)
Cells(90 + i, 15).Value = i
Cells(90 + i, 15).Interior.Color = RGB(150, 0, 0)
Cells(i + 90, 16 + k).Value = dip1 + dip2 + dip3
'**********************************
Next d
Next k
Next i
'''
''''
'
For i = 0 To m * d_max
For k = 0 To m * d_max
If Cells(i + 3, 16 + k).Value >= Cells(i + 90, 16 + k).Value Then
Cells(i + 180, 16 + k).Value = Cells(i + 3, 16 + k).Value
Cells(i + 180, 16 + k).Interior.Color = RGB(0, 150, 0)
Else
Cells(i + 180, 16 + k).Value = Cells(i + 90, 16 + k).Value
End If
Cells(179, 16 + k).Value = k
Cells(179, 16 + k).Interior.Color = RGB(150, 0, 0)
Cells(180 + i, 15).Value = i
Cells(180 + i, 15).Interior.Color = RGB(150, 0, 0)
Next k
Next i
Max = 0
For i = 0 To m * d_max
For k = 0 To m * d_max
r1 = 0
r2 = 0
r21 = 0
r22 = 0
r23 = 0
r24 = 0
r25 = 0
r26 = 0
r27 = 0
r28 = 0
r29 = 0
f6 = 0
For d = 1 To 20
If (i + k) > c Then
If d <= i Then
i1 = k
r21 = r21 + Cells(i1 + 3, 12).Value * Cells(d + 4, 8).Value
Else
If d <= i + k Then
i2 = k + i - d
r22 = r22 + Cells(i2 + 3, 12).Value * Cells(d + 4, 8).Value
Else
r23 = r23 + Cells(3, 12).Value * Cells(d + 4, 8).Value
End If
End If
Else
If d <= i Then
i1 = k
85

r24 = r24 + Cells(i1 + 3, 11).Value * Cells(d + 4, 7).Value


Else
If d <= i + k Then
i2 = k + i - d
r25 = r25 + Cells(i2 + 3, 11).Value * Cells(d + 4, 7).Value
Else
r26 = r26 + Cells(3, 11).Value * Cells(d + 4, 7).Value
End If
End If
End If
Next d
f6 = r21 + r22 + r23 + r24 + r26 + Cells(i + 180, 16 + k).Value
Cells(i + 270, 16 + k).Value = f6
Cells(269, 16 + k).Value = k
Cells(269, 16 + k).Interior.Color = RGB(150, 0, 0)
Cells(270 + i, 15).Value = i
Cells(270 + i, 15).Interior.Color = RGB(150, 0, 0)

If Max < f6 Then


Max = f6
Cells(275, 10).Value = Max
Cells(275, 11).Value = i
Cells(275, 12).Value = k
Else
Max = Max
End If

Next k
Next i
''''' '****************************************preiod
4*******************************************
''''''
'*******************************************************************************
************

For x = 0 To m * d_max
r11 = 0
r12 = 0

For d = 1 To 20

If d <= x Then
r11 = r11 + (d * p1 - (x - d) * h) * Cells(d + 29, 7)
Else
r12 = r12 + x * p1 * Cells(d + 29, 7)
End If

Next d
Cells(360, 16 + x).Value = r11 + r12

Cells(359, 16 + x).Value = x
Cells(359, 16 + x).Interior.Color = RGB(150, 0, 0)
Next x

For x = 0 To m * d_max
r11 = 0
r12 = 0

For d = 1 To 20
86

If d <= x Then
r11 = r11 + (d * p1 - (x - d) * h) * Cells(d + 29, 8)
Else
r12 = r12 + x * p1 * Cells(d + 29, 8)
End If

Next d
Cells(365, 16 + x).Value = r11 + r12

Cells(364, 16 + x).Value = x
Cells(364, 16 + x).Interior.Color = RGB(150, 0, 0)
Next x
'

For i = 0 To m * d_max
For k = 0 To m * d_max
dip1 = 0
dip2 = 0
dip3 = 0
dip4 = 0
dip5 = 0
dip6 = 0
dip7 = 0
dip8 = 0
dip9 = 0
dip10 = 0
dip11 = 0
dip12 = 0
r21 = 0
r22 = 0

For d = 1 To 20
If d <= i Then
If (i + k) > c Then
dip1 = dip1 + (d * p22 - (i - d) * h - (i - d) * o) * Cells(4 + d, 8).Value
dip2 = dip2 - k * h * Cells(4 + d, 8).Value

Else
dip3 = dip3 + (d * p21 - (i - d) * h - (i - d) * o) * Cells(4 + d, 7).Value
dip4 = dip4 - k * h * Cells(4 + d, 7).Value

End If
Else
If d < (i + k) Then
If (i + k) > c Then
dip5 = dip5 + i * p22 * Cells(4 + d, 8).Value
dip6 = dip6 + ((d - i) * p22 - (k + i - d) * h) * Cells(4 + d, 8).Value

Else
dip7 = dip7 + i * p21 * Cells(4 + d, 7).Value
dip8 = dip8 + ((d - i) * p21 - (k + i - d) * h) * Cells(4 + d, 7).Value

End If
Else
If (i + k) > c Then
dip9 = dip9 + i * p22 * Cells(4 + d, 8).Value
dip10 = dip10 + k * p22 * Cells(4 + d, 8).Value
87

Else
dip11 = dip11 + i * p21 * Cells(4 + d, 7).Value
dip12 = dip12 + k * p21 * Cells(4 + d, 7).Value
End If
End If
End If

Next d

r21 = dip1 + dip3 + dip5 + dip7 + dip9 + dip11


r22 = dip2 + dip4 + dip6 + dip8 + dip10 + dip12
Cells(i + 370, 16 + k).Value = r21 '******************
Cells(369, 16 + k).Value = k
Cells(369, 16 + k).Interior.Color = RGB(150, 0, 0)
Cells(i + 370, 15).Value = i
Cells(370 + i, 15).Interior.Color = RGB(150, 0, 0)
Cells(i + 460, 16 + k).Value = r22 '******************
Cells(459, 16 + k).Value = k
Cells(459, 16 + k).Interior.Color = RGB(150, 0, 0)
Cells(i + 460, 15).Value = i
Cells(460 + i, 15).Interior.Color = RGB(150, 0, 0)
Next k
Next i
For i = 0 To m * d_max
For k = 0 To m * d_max
For x = 0 To m * d_max

f31 = 0
f32 = 0
f33 = 0
f34 = 0
f35 = 0
f36 = 0
f37 = 0
f38 = 0
f39 = 0
f40 = 0
f41 = 0
f42 = 0
f4 = 0
For d = 1 To 20
If (i + k) > c Then
If d <= i Then
i1 = k
If d <= x Then
k1 = x - d

z4 = Cells(i1 + 270, 16 + k1).Value


d4 = Cells(i1 + 370, 16 + k1).Value
f31 = f31 + (z4 - d4) * Cells(29 + d, 8).Value + d4 * Cells(4 + d,
8).Value
Else
k1 = 0
z4 = Cells(i1 + 270, 16 + k1).Value
d4 = Cells(i1 + 370, 16 + k1).Value
f32 = f32 + (z4 - d4) * Cells(29 + d, 8).Value + d4 * Cells(4 + d,
8).Value
End If
Else
If d <= (i + k) Then
88

i1 = i + k - d
If d <= x Then
k1 = x - d

z4 = Cells(i1 + 270, 16 + k1).Value


d4 = Cells(i1 + 370, 16 + k1).Value
f33 = f33 + (z4 - d4) * Cells(29 + d, 8).Value + d4 * Cells(4 + d,
8).Value
Else
k1 = 0
z4 = Cells(i1 + 270, 16 + k1).Value
d4 = Cells(i1 + 370, 16 + k1).Value
f34 = f34 + (z4 - d4) * Cells(29 + d, 8).Value + d4 * Cells(4 + d,
8).Value
End If
Else
i1 = 0
If d <= x Then
k1 = x - d

z4 = Cells(i1 + 270, 16 + k1).Value


d4 = Cells(i1 + 370, 16 + k1).Value
f35 = f35 + (z4 - d4) * Cells(29 + d, 8).Value + d4 * Cells(4 + d,
8).Value
Else
k1 = 0
z4 = Cells(i1 + 270, 16 + k1).Value
d4 = Cells(i1 + 370, 16 + k1).Value
f36 = f36 + (z4 - d4) * Cells(29 + d, 8).Value + d4 * Cells(4 + d,
8).Value
End If
End If
End If
Else
If d <= i Then
i1 = k
If d <= x Then
k1 = x - d

z4 = Cells(i1 + 270, 16 + k1).Value


d4 = Cells(i1 + 370, 16 + k1).Value
f37 = f37 + (z4 - d4) * Cells(29 + d, 7).Value + d4 * Cells(4 + d,
7).Value
Else
k1 = 0
z4 = Cells(i1 + 270, 16 + k1).Value
d4 = Cells(i1 + 370, 16 + k1).Value
f38 = f38 + (z4 - d4) * Cells(29 + d, 7).Value + d4 * Cells(4 + d,
7).Value
End If
Else
If d <= (i + k) Then
i1 = i + k - d
If d <= x Then
k1 = x - d

z4 = Cells(i1 + 270, 16 + k1).Value


d4 = Cells(i1 + 370, 16 + k1).Value
f39 = f39 + (z4 - d4) * Cells(29 + d, 7).Value + d4 * Cells(4 + d,
7).Value
89

Else
k1 = 0
z4 = Cells(i1 + 270, 16 + k1).Value
d4 = Cells(i1 + 370, 16 + k1).Value
f40 = f40 + (z4 - d4) * Cells(29 + d, 7).Value + d4 * Cells(4 + d,
7).Value
End If
Else
i1 = 0
If d <= x Then
k1 = x - d

z4 = Cells(i1 + 270, 16 + k1).Value


d4 = Cells(i1 + 370, 16 + k1).Value
f41 = f41 + (z4 - d4) * Cells(29 + d, 7).Value + d4 * Cells(4 + d,
7).Value
Else
k1 = 0
z4 = Cells(i1 + 270, 16 + k1).Value
d4 = Cells(i1 + 370, 16 + k1).Value
f42 = f42 + (z4 - d4) * Cells(29 + d, 7).Value + d4 * Cells(4 + d,
7).Value
End If
End If
End If
End If
Next d
If (i + k) > c Then
f4 = f31 + f32 + f33 + f34 + f35 + f36 + f37 + f38 + f39 + f40 + f41 + f42 + _
Cells(365, 16 + x).Value + Cells(i + 180, 16 + k).Value
Else
f4 = f31 + f32 + f33 + f34 + f35 + f36 + f37 + f38 + f39 + f40 + f41 + f42 + _
Cells(360, 16 + x).Value + Cells(i + 180, 16 + k).Value
End If
Cells(550 + x, 16 + i + (m * d_max + 1) * k).Value = f4
Cells(549, 16 + i + (m * d_max + 1) * k).Value = k & "," & i
Cells(549, 16 + i + (m * d_max + 1) * k).Interior.Color = RGB(150, 0, 0)
Cells(x + 550, 15).Value = x
Cells(550 + x, 15).Interior.Color = RGB(150, 0, 0)
If Max < f4 Then
Max = f4
Cells(555, 10).Value = Max
Cells(555, 11).Value = i
Cells(555, 12).Value = k
Cells(555, 13).Value = x
Else
Max = Max
End If
Next x
Next k
Next i
'****************************************preiod
3*******************************************
'
'*******************************************************************************
************

For i = 0 To 0
For k = 0 To m * d_max
90

Cells(640, 16 + k).Value = Cells(180, 16 + k).Value


Cells(639, 16 + k).Value = k
Cells(639, 16 + k).Interior.Color = RGB(150, 0, 0)
Next k
Next i

For x = 0 To m * d_max
For y = 0 To m * d_max
r11 = 0
r12 = 0
For d = 1 To 20
If d <= (x + y) Then
r11 = r11 + (d * p1 - (x + y - d) * h) * Cells(d + 29, 7)
Else
r12 = r12 + (x + y) * p1 * Cells(d + 29, 7)
End If
Next d
Cells(650 + x, 16 + y).Value = r11 + r12
Cells(649, 16 + y).Value = y
Cells(649, 16 + y).Interior.Color = RGB(150, 0, 0)
Cells(650 + x, 15).Value = x
Cells(650 + x, 15).Interior.Color = RGB(150, 0, 0)
Next y
Next x

For x = 0 To m * d_max
For y = 0 To m * d_max
r11 = 0
r12 = 0
For d = 1 To 20
If d <= (x + y) Then
r11 = r11 + (d * p1 - (x + y - d) * h) * Cells(d + 29, 8)
Else
r12 = r12 + (x + y) * p1 * Cells(d + 29, 8)
End If
Next d
Cells(740 + x, 16 + y).Value = r11 + r12
Cells(739, 16 + y).Value = y
Cells(739, 16 + y).Interior.Color = RGB(150, 0, 0)
Cells(740 + x, 15).Value = x
Cells(740 + x, 15).Interior.Color = RGB(150, 0, 0)
Next y
Next x

Max = 0
For y = 0 To m * d_max
For x = 0 To m * d_max
For k = 0 To m * d_max
f31 = 0
f32 = 0
f33 = 0
f34 = 0
f35 = 0
f36 = 0
f37 = 0
f38 = 0
f39 = 0
f40 = 0
91

f41 = 0
f42 = 0
f3 = 0
For d = 1 To 20
If k > c Then
If d <= k Then
i1 = k - d
If d <= x Then
k1 = x - d
x1 = y
z3 = Cells(550 + x1, 16 + i1 + (m * d_max + 1) * k1).Value
d3 = Cells(i1 + 370, 16 + k1).Value
f31 = f31 + (z3 - d3) * Cells(29 + d, 8).Value + d3 * Cells(4 + d, 8).Value
Else
If d <= (x + y) Then
k1 = 0
x1 = y + x - d
z3 = Cells(550 + x1, 16 + i1 + (m * d_max + 1) * k1).Value
d3 = Cells(i1 + 370, 16 + k1).Value
f32 = f32 + (z3 - d3) * Cells(29 + d, 8).Value + d3 * Cells(4 + d, 8).Value
Else
k1 = 0
x1 = 0
z3 = Cells(550 + x1, 16 + i1 + (m * d_max + 1) * k1).Value
d3 = Cells(i1 + 370, 16 + k1).Value
f33 = f33 + (z3 - d3) * Cells(29 + d, 8).Value + d3 * Cells(4 + d, 8).Value
End If
End If
Else
i1 = 0
If d <= x Then
k1 = x - d
x1 = y
z3 = Cells(550 + x1, 16 + i1 + (m * d_max + 1) * k1).Value
d3 = Cells(i1 + 370, 16 + k1).Value
f34 = f34 + (z3 - d3) * Cells(29 + d, 8).Value + d3 * Cells(4 + d, 8).Value
Else
If d <= (x + y) Then
k1 = 0
x1 = y + x - d
z3 = Cells(550 + x1, 16 + i1 + (m * d_max + 1) * k1).Value
d3 = Cells(i1 + 370, 16 + k1).Value
f35 = f35 + (z3 - d3) * Cells(29 + d, 8).Value + d3 * Cells(4 + d, 8).Value
Else
k1 = 0
x1 = 0
z3 = Cells(550 + x1, 16 + i1 + (m * d_max + 1) * k1).Value
d3 = Cells(i1 + 370, 16 + k1).Value
f36 = f36 + (z3 - d3) * Cells(29 + d, 8).Value + d3 * Cells(4 + d, 8).Value
End If
End If
End If
Else
If d <= k Then
i1 = k - d
If d <= x Then
k1 = x - d
x1 = y
z3 = Cells(550 + x1, 16 + i1 + (m * d_max + 1) * k1).Value
d3 = Cells(i1 + 370, 16 + k1).Value
92

f37 = f37 + (z3 - d3) * Cells(29 + d, 7).Value + d3 * Cells(4 + d, 7).Value


Else
If d <= (x + y) Then
k1 = 0
x1 = y + x - d
z3 = Cells(550 + x1, 16 + i1 + (m * d_max + 1) * k1).Value
d3 = Cells(i1 + 370, 16 + k1).Value
f38 = f38 + (z3 - d3) * Cells(29 + d, 7).Value + d3 * Cells(4 + d, 7).Value
Else
k1 = 0
x1 = 0
z3 = Cells(550 + x1, 16 + i1 + (m * d_max + 1) * k1).Value
d3 = Cells(i1 + 370, 16 + k1).Value
f39 = f39 + (z3 - d3) * Cells(29 + d, 7).Value + d3 * Cells(4 + d, 7).Value
End If
End If
Else
i1 = 0
If d <= x Then
k1 = x - d
x1 = y
z3 = Cells(550 + x1, 16 + i1 + (m * d_max + 1) * k1).Value
d3 = Cells(i1 + 370, 16 + k1).Value
f40 = f40 + (z3 - d3) * Cells(29 + d, 7).Value + d3 * Cells(4 + d, 7).Value
Else
If d <= (x + y) Then
k1 = 0
x1 = y + x - d
z3 = Cells(550 + x1, 16 + i1 + (m * d_max + 1) * k1).Value
d3 = Cells(i1 + 370, 16 + k1).Value
f41 = f41 + (z3 - d3) * Cells(29 + d, 7).Value + d3 * Cells(4 + d, 7).Value
Else
k1 = 0
x1 = 0
z3 = Cells(550 + x1, 16 + i1 + (m * d_max + 1) * k1).Value
d3 = Cells(i1 + 370, 16 + k1).Value
f42 = f42 + (z3 - d3) * Cells(29 + d, 7).Value + d3 * Cells(4 + d, 7).Value
End If
End If
End If
End If

Next d
If (i + k) > c Then
If y > 0 Then
f3 = Cells(740 + x, 16 + y).Value + Cells(640, 16 + k).Value _
+ f31 + f32 + f33 + f34 + f35 + f36 + f37 + f38 + f39 + f40 + f41 + f42 - y * u_c - s

Else
f3 = Cells(740 + x, 16 + y).Value + Cells(640, 16 + k).Value _
+ f61 + f62 + f63 + f64 + f65 + f66 + f67 + f68 + f69 + f70 + f71 + f72

End If
Else
If y > 0 Then
f3 = Cells(650 + x, 16 + y).Value + Cells(640, 16 + k).Value _
+ f31 + f32 + f33 + f34 + f35 + f36 + f37 + f38 + f39 + f40 + f41 + f42 - y * u_c - s

Else
93

f3 = Cells(650 + x, 16 + y).Value + Cells(640, 16 + k).Value _


+ f61 + f62 + f63 + f64 + f65 + f66 + f67 + f68 + f69 + f70 + f71 + f72

End If
End If

Cells(830 + y, 16 + k + (m * d_max + 1) * x).Value = f3


Cells(829, 16 + k + (m * d_max + 1) * x).Value = x & "," & k
Cells(829, 16 + k + (m * d_max + 1) * x).Interior.Color = RGB(150, 0, 0)
Cells(y + 830, 15).Value = y
Cells(830 + y, 15).Interior.Color = RGB(150, 0, 0)
If Max <= f3 Then
Max = f3
Cells(835, 10).Value = Max
Cells(835, 11).Value = y
Cells(835, 12).Value = x
Cells(835, 13).Value = k
Else
Max = Max
End If
Next k
Next x
Next y
''
''****************************************period
2*******************************************
''
*******************************************************************************
************
'''
For x = 0 To m * d_max
For y2 = 0 To m * d_max
r31 = 0
r32 = 0
r3 = 0
For d = 1 To 20
If d <= (x + y2) Then
r31 = r31 + (d * p1 - (x + y2 - d) * h) * Cells(4 + d, 6).Value
Else
r32 = r32 + (x + y2) * p1 * Cells(4 + d, 6).Value
End If
Next d
r3 = r31 + r32
Cells(920 + x, 16 + y2).Value = r3
Cells(919, 16 + y2).Value = y2
Cells(919, 16 + y2).Interior.Color = RGB(150, 0, 0)
Cells(x + 920, 15).Value = x
Cells(920 + x, 15).Interior.Color = RGB(150, 0, 0)
Next y2
Next x

Max = 0
For y2 = 0 To m * d_max
For y = 0 To m * d_max
For x = 0 To m * d_max

f21 = 0
94

f22 = 0
f23 = 0
f2 = 0
For d = 1 To 20
If d <= x Then
k1 = x - d
x1 = y2
y1 = y
z2 = Cells(830 + k1, 16 + x1 + (m * d_max + 1) * y1).Value
f21 = f21 + z2 * Cells(4 + d, 6).Value
Else
If d <= (y2 + x) Then
k1 = 0
x1 = y2 + x - d
y1 = y
z2 = Cells(830 + k1, 16 + x1 + (m * d_max + 1) * y1).Value
f22 = f22 + z2 * Cells(4 + d, 6).Value
Else
k1 = 0
x1 = 0
y1 = y
z2 = Cells(830 + k1, 16 + x1 + (m * d_max + 1) * y1).Value
f23 = f23 + z2 * Cells(4 + d, 6).Value

End If
End If
Next d
If y2 > 0 Then
f2 = f21 + f22 + f23 + Cells(920 + x, 16 + y2).Value - y2 * u_c - s
Else
f2 = f21 + f22 + f23 + Cells(920 + x, 16 + y2).Value

End If
Cells(1010 + y2, 16 + x + (m * d_max + 1) * y).Value = f2
Cells(1009, 16 + x + (m * d_max + 1) * y).Value = y & "," & x
Cells(1009, 16 + x + (m * d_max + 1) * y).Interior.Color = RGB(150, 0, 0)
Cells(y2 + 1010, 15).Value = y2
Cells(1010 + y2, 15).Interior.Color = RGB(150, 0, 0)
If Max <= f2 Then
Max = f2
Cells(1015, 10).Value = Max
Cells(1015, 11).Value = y2
Cells(1015, 12).Value = y
Cells(1015, 13).Value = x

Else
Max = Max
End If
Next x
Next y
Next y2

'
'
''****************************************preiod
1*******************************************
''
'*******************************************************************************
************
cat = Cells(1, 3).Value
95

Max = 0
For y3 = 0 To m * d_max
For y2 = 0 To m * d_max
For y = 0 To m * d_max

f11 = 0
f12 = 0

f2 = 0
For d = 1 To 20
If d <= y3 Then
x1 = y3 - d
y21 = y2
y1 = y
z1 = Cells(1010 + y21, 16 + x1 + (m * d_max + 1) * y1).Value
f11 = f11 + z1 * Cells(4 + d, 6).Value
Else
x1 = 0
y21 = y2
y1 = y
z1 = Cells(1010 + y21, 16 + x1 + (m * d_max + 1) * y1).Value
f12 = f12 + z1 * Cells(4 + d, 6).Value
End If
Next d

If y3 > 0 Then
f1 = f11 + f12 + Cells(920, 16 + y3).Value - y3 * u_c - s

Else
f1 = f11 + f12 + Cells(920, 16 + y3).Value

End If
Cells(1100 + y3, 16 + y + (m * d_max + 1) * y2).Value = f1
Cells(1099, 16 + y + (m * d_max + 1) * y2).Value = y2 & "," & y
Cells(1099, 16 + y + (m * d_max + 1) * y2).Interior.Color = RGB(150, 0, 0)
Cells(y3 + 1100, 15).Value = y3
Cells(1100 + y, 15).Interior.Color = RGB(150, 0, 0)
If Max <= f1 Then
Max = f1
Cells(1105, 10).Value = Max
Cells(1105, 11).Value = y3
Cells(1105, 12).Value = y2
Cells(1105, 13).Value = y

Cells(cat, 5).Value = Max


Cells(cat, 6).Value = y3
Cells(cat, 7).Value = y2
Cells(cat, 8).Value = y

Else
Max = Max
End If
Next y
Next y2
Next y3
End Sub

Вам также может понравиться