-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEOQ.py
More file actions
39 lines (21 loc) · 859 Bytes
/
EOQ.py
File metadata and controls
39 lines (21 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import math
print("Economic Order Quantity 'EOQ' Calculator")
print('What is your annual demand? ')
D = input()
print('What is your setup cost per order/order cost per order? ')
S = input()
print('What is your holding cost?' )
H = input()
x = (float(D) * float(S)) * 2
z = x/float(H)
q = math.sqrt(z)
qStar = int(round(q))
print('Q* or the Economic Order Quantity is = ', str(qStar) )
avgInvLevel = (qStar/2)
print('The average inventory Level if using EOQ is ... ', avgInvLevel)
annualHoldingCost = (avgInvLevel * float(H))
print('Annual Holding Cost is ... ', annualHoldingCost)
annualOrders = (float(D)/float(qStar))
print('The number of orders to make annualy is ...', annualOrders)
associatedAnnualOrderingCost = (float(D)/float(qStar)) * float(S)
print('The associated annual ordering cost is ...', associatedAnnualOrderingCost)