Page 1 of 1

Help with a function in vensim

Posted: Tue Oct 02, 2007 11:26 pm
by kintoke
First of all, Hi all!, this is my first post in here. I am currently in my last year of academic year, working my memorial in this theme so is very possible that I will post some questions often.

Down to business. I am modeling how the inventory of a company works. everything works ok...so when the inventory goes to cero, automatically a truck brings more materials. The thing is that I want to use the delay fixed function, because trucks take time to go to a company a bring the materials. So what I want to do, but I don`t know how and with which function, is when the inventory reach a certain level, its send a signal (just one) to the truck so it can start going though the delay fixed function and arrived an the company`s inventory.

I hope that my description is understandable :)..english is not my first languaje


thanks all!

Bye

Posted: Wed Oct 03, 2007 11:33 am
by bob@vensim.com
If you want to model reorder than you need to have a level for material on order. For the discrete order approach you describe you can use:

receipts = DELAY FIXED(new orders, ship time,new orders) ~Box/Day ~|
new orders = IF THEN ELSE(on order = 0 :AND: inventory < trigger,order size,0) ~Box/Day ~|
on order = INTEG(new orders - receipts,0) ~Box ~|
inventory = INTEG(receipts - shipments,initial inventory)~Box ~|

The trick is to remember that you have ordered - Steman's book has some more examples of this type of thing.

Posted: Thu Oct 04, 2007 6:26 am
by kintoke
Hi..thanks for the replay

I tried to do what you told me but it doesn`t work..remember that im newbe on this. Is there anyway that you can modeled that in vensim so I can understand it? I will be very grateful
by the way, which books are good for modeling supply chains models or any business systems in vensim?


thanks a lot bob

Benjamin

Posted: Thu Oct 04, 2007 10:20 am
by bob@vensim.com
Hi Benjamin,

The above are valid Vensim equations so there is not much more I can do there. A good place to start would be John Sterman's book Business Dynamics. This has several chapters on supply chains.

inventory

Posted: Thu Oct 04, 2007 11:40 am
by LAUJJL
Hi

Here is joined the model completed that can be run.
Adjust accordingly the parameters, shipments, ship time,
trigger and order size. I have slightly modified one equation to avoid the inventory becoming negative.
I have not the same opinion about Sterman's book than Bob.
If you intend to build real models, Geoff Coyle's book
'System dynamics modelling a practical approach' (you can get it at amazon)
is much better to my opinion especially if you are a beginner. It has the drawback of being based on another package than Vensim, no more commercialised, but it gives a
complete model building method based on real examples.
But it is easy and instructive to translate the examples into Vensim models.
Studying the Vensim user's guide is too mandatory.
Regards.
JJ



[Edited on 4-10-2007 by LAUJJL]

[Edited on 4-10-2007 by LAUJJL]