(*
*)

(*
          Section 1: Header

This is a Mathematica notebook file. This file is created for
 Steven O. Kimbrough
on 26th August 93. The model eoq is evaluated in the scenario eoq(1).
The report can be obtained by running Mathmatica with this file.
Model source: 
Report on Improved Inventory Models for the United States
Coast Guard Requirements Determination Process , Prepared by
Logistics Management Institute , May 28, 1993 in Chapter 5:
Demand-Supported Stockage , page 57-58.


*)

(*
          Section 2   Table of Contents

     Section 1: Header
     Section 2: Table of Contents
     Section 3: Model Descriptions
     Section 4: Variable Descriptions
     Section 5: Variable Declarations
     Section 6: Model Declarations
     Section 7: Model Evaluations
     Section 8: Post-Evaluation Analyses
     Section 9: End of Input
*)

(*          Section 3: Model Descriptions          *)

eoq::usage = " eoq: is a model for computing Economic Order
Quantity or answering the question of how much to order .
This is a classical EOQ model ( also known as Wilson EOQ
model ) which trades off the cost of the cost of ordering
stock against the cost of holding stock to determine the best
order quantity . The model is deterministic , that is , it
assumes that demand and cost are known and relative stable .
"



(*           Section 4: Variable Descriptions           *)

d::usage = " d is defined as a local variable for the globle
variable annualUnitDemand . annualUnitDemand is the annual
unit demand for the item . "

a::usage = " a is defined as a local variable for the globle
variable costToOrder . costToOrder is the fixed cost to make
an order . "

h::usage = " h is defined as a local variable for the globle
variable holdingRate . holdingRate is the rate for holding an
item in stock . "

q::usage = " q is defined as a local variable for the globle
variable orderQuantity . orderQuantity is the order for the
item . "

tvc::usage = " tvc is defined as a local variable for the
globle variable totalVarCost . totalVarCost is the total
variable cost , which is equal to total cost of ordering plus
total holding cost . "

c::usage = " c is defined as a local variable for the globle
variable unitPrice . unitPrice is the unit price for the item
. "


(*         Section 5: Variable Declarations         *)

(*
This is a scenario for model eoq(1).
Scenario source: 
Hua Hua OMIP Department University of Pennsylvania
PA 19104-6366 (215)-898-5715
*)


d := 160

a := 10

h := 3

c := 8


(*         Section 6: Model Declarations         *)

(*
eoq: is a model for computing Economic Order Quantity or
answering the question of how much to order . This is a
classical EOQ model ( also known as Wilson EOQ model ) which
trades off the cost of the cost of ordering stock against the
cost of holding stock to determine the best order quantity .
The model is deterministic , that is , it assumes that demand
and cost are known and relative stable .
Model source: 
Report on Improved Inventory Models for the United States
Coast Guard Requirements Determination Process , Prepared by
Logistics Management Institute , May 28, 1993 in Chapter 5:
Demand-Supported Stockage , page 57-58.
*)


q := Sqrt[2*a*d/(h*c)]

tvc := a*d/q+h*c*q/2

(*         Section 7: Model Evaluations         *)

Print["Model Output:"]


Print["According to the eoq, 
q is ",q, " in scenario eoq(1) ."]

Print["According to the eoq, 
tvc is ",tvc, " in scenario eoq(1) ."]

(*         Section 8: Post-Evaluation Analyses         *)


x2 := tvc

Plot[x2, {q,1,20}]

x3 := tvc

Plot[x3, {d,100,1000}]


(*         Section 9: End of Input         *)

(*
*)