Re: [R] Discrete Event Simulation problem

2012-02-13 Thread Norm Matloff
Unfortunately, I don't have time to read your code, but if it is any help, I have general discrete event simulation code as an example in my book. I've posted the code at http://heather.cs.ucdavis.edu/DES.R Norm Matloff __ R-help@r-project.org mailin

Re: [R] Discrete Event Simulation problem

2012-02-13 Thread jism7690
I have made some chances and I believe now the only problem is making the system reorder. Please any help would be great test <- function(seed = 123456789, maxStock= 100, minStock = 20,t.max=1100,inventory =50) { LAST = t.max START = 0 t.demand = START t.supply = START t.current = START GetDem

[R] Discrete Event Simulation problem

2012-02-10 Thread jism7690
Hi All, I am attempting to simulation an inventory model on R and I am having some problems. I believe the problem is when I define my demand rate is stays constant throughout so when I do need to reorder the model does not recognise it as I have the initial supply arrival time set to infinity at