Page 1 of 1

Inputting Times series Data for flow rate into a stock

Posted: Fri Feb 23, 2018 1:24 pm
by oosman1
Hi there ,

I am trying to input a time series data to dictate the behavior of a flow into a stock. I need the "Get Time Value" function to make this work, however given I am using PLE, this is not an option. How do you advise I go about this? I have attached the relevant time series and my model. I am trying to feed the time series into the "rate of battery charging" flow.

Thank you.

Regards,

Ola Osman

Re: Inputting Times series Data for flow rate into a stock

Posted: Fri Feb 23, 2018 1:30 pm
by Administrator
Use

Code: Select all

PV output = PV Profile ( time )

Re: Inputting Times series Data for flow rate into a stock

Posted: Sat Feb 24, 2018 9:34 am
by oosman1
Hi there,

Thank you for your response. For the time, should I add that as another variable feeding into "PV Output"? And if so, how do i set it up so that this varies with simulation time?

Thank you.

Ola

Re: Inputting Times series Data for flow rate into a stock

Posted: Sat Feb 24, 2018 7:07 pm
by Administrator
"Time" is already a protected variable in Vensim, it's the simulation time.

Add a new shadow variable to your view and select "time". Then you can draw the arrow you need.

Re: Inputting Times series Data for flow rate into a stock

Posted: Mon Mar 12, 2018 7:57 am
by oosman1
Hi there,

Thank you for that. One more follow up question please. I am trying to get the PV output to repeat every 24 hours. I tried using the PULSE TRAIN function as per the attachment but I could not get it to work. Can you please advise?

Thank you.

Regards,

Ola

Re: Inputting Times series Data for flow rate into a stock

Posted: Mon Mar 12, 2018 8:14 am
by Administrator
Create a new variable

Code: Select all

hour of day = modulo ( Time , 24)
And then use this instead of "time" in the call to the lookup

Code: Select all

PV output = PV Profile (hour of day)

Re: Inputting Times series Data for flow rate into a stock

Posted: Mon Mar 12, 2018 1:58 pm
by tomfid
... and you should really make the 24 a parameter with units,

hours per day == 24 ~ hours or hours/day (depending on use)