Displaying 1 result from an estimated 1 matches for "getdemand".
Did you mean:
eqdemand
2012 Feb 10
2
Discrete Event Simulation problem
...n if statement saying, if
the level falls below a certain point then an order should be placed, I have
the expected time to order arrival set to be before the the sale but this is
not working.
Any Help would be appreciated. Thanks
maxStock = 100
minStock = 20
t.max=1100.0
LAST = t.max
START = 0
GetDemand<-function() START + runif(1,min=0,max=2)
main <- function(t.max,maxStock,minStock)
{
index = 0
t.current = START #### Starting Conditions
t.demand = START
t.supply = START
inventory = 50
order_costs = 0
storage_costs = 0
sales = 0
sum = list(inventory...