1 REM FQEOWSH
5 CLEAR 1000
10 CLS:PRINT TAB(5);"INVENTORY THEORY-FIXED QUANTITY EOQ WITH SHORTAGES":PRINT
20 PRINT"THIS PROGRAM INVOLVES AN INVENTORY PROBLEM FOR WHICH IT IS 
25 PRINT"ASSUMED THAT THE FOLLOWING CONDITIONS HOLD:
30 PRINT"  THERE IS A CONSTANT ORDERING COST PER ORDER
35 PRINT"  INVENTORY HOLDING COST IS CONSTANT PER UNIT HELD
40 PRINT"  BACKORDERS ARE PERMITTED (STOCKOUTS ALLOWED)
50 PRINT"  DEMAND FOR THE ITEMS ARE CONSTANT AND UNIFORM THROUGH TIME
55 PRINT"  THERE ARE NO QUANTITY PRICE BREAKS.
57 PRINT"  PRODUCTION RUNS(OR REORDERS) MUST BE PLANNED IN ADVANCE.
60 PRINT"WE SHALL INPUT ANNUAL DEMAND, ORDERING COST,
65 PRINT"HOLDING COST PER UNIT PER YEAR,
67 PRINT"AND ANNUAL COST PER UNIT SHORT.
70 PRINT"OUTPUT INCLUDES OPTIMAL ORDER QUANTITY,REORDER POINT, AND
75 PRINT"TOTAL ANNUAL COST OF THE INVENTORY SYSTEM.
90 INPUT"PRESS ENTER TO BEGIN";Z9$
100 CLS
110 INPUT"ENTER ANNUAL DEMAND(IN UNITS)      ";D
120 INPUT"ENTER REORDER COST(PER ORDER)      ";S
140 INPUT"ENTER HOLDING COST(PER UNIT/YEAR   ";C
160 INPUT"ENTER SHORTAGE COST(PER UNIT/YEAR  ";T
200 Q=SQR(2*D*S/C*(C+T)/T): REM OPTIMAL ORDER QUANTITY
210 TB= SQR(2*S*(C+T)/(D*C*T)):REM TIME INTERVAL BETWEEN REORDERS
220 M = SQR(2*D*S/C*T/(C+T))
300 PRINT
310 PRINT"OPTIMAL ORDER QUANTITY IS          ";Q;"UNITS"
320 PRINT"THE OPTIMAL TIME INTERVAL BETWEEN REORDERS = ";TB;"YEARS"
330 PRINT"THE EXPECTED MAXIMUM INVENTORY LEVEL FOR EACH ORDER PERIOD          EQUALS";M;"UNITS
380 PRINT:INPUT"PRESS ENTER FOR MORE";Z9$
385 IF Z9$ = "-1" THEN END
390 GOTO 100
