change demand

Use this forum to post Vensim related questions.
Post Reply
Nurul
Junior Member
Posts: 5
Joined: Tue Dec 05, 2006 8:47 am

change demand

Post by Nurul »

HI!

I need help in modelling travel demand.
If, for example, I have a demand at time t=7, t=15, and t=20. Every demand will travel for about 3 hours by car. So,demand will be 0 at time t=7, t=15, and t=20, and at time t=10, t=18, and t=23 demand will be 1.
My problem is I can't change the demand at t=7, t=15, and t=20 to be zero, while at time t=10, t=18, and t=23 the demand will be 1.

Thanks
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

just use

active demand = INTEG(trip start - trip completions,0)
trip completions = DELAY FIXED(trip starts,trip duration,0)
Nurul
Junior Member
Posts: 5
Joined: Tue Dec 05, 2006 8:47 am

Post by Nurul »

Thanks bob,
but it works only when I set trip duration to constant number. It doesnt work if I set trip duration as random number. Instead, I get a warning message "-customer-initial=3 Active=2 has changed in value", What does it mean? What should I do if I want to set trip duration as a random number?
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Post by Administrator »

It would be a good idea if you read about the different delay functions in Vensim.

Go to
http://www.vensim.com/documentation/vensim.htm, wait for the help to load, select the "Index" tab and then type in "DELAY". Now take a closer look at
DELAY_FIXED, DELAY_MATERIAL and DELAY_INFORMATION.

Hope this helps.

Tony.
Nurul
Junior Member
Posts: 5
Joined: Tue Dec 05, 2006 8:47 am

Post by Nurul »

Thanks Tony,
But I have one more problem. I have a randomly delay magnitude. for example, at time t=1, delay is 3 hour, at t=2 delay is 2 hour, and at t=3 delay is 6 hour. How do I convert the magnitude to time. I mean, for the first time, at time t=1, t=2, and t=3 the demand is 1,1,and 1. And because of the delay, now demand at t=1, t=2, and t=3 would be 0 while at t=4 demand would be 2 and at t=9 demand would be 1.

Thanks for any help for this problem
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

just use

active demand = INTEG(trip start - trip completions,0)
trip completions = DELAY MATERIAL(trip starts,trip duration,0,0)

if trip duration is variable.
Nurul
Junior Member
Posts: 5
Joined: Tue Dec 05, 2006 8:47 am

Post by Nurul »

Thanks Bob

It works!!.

Thank you
Post Reply