Time series data for sensitivity analysis

Use this forum to post Vensim related questions.
Post Reply
WayneZhou2009
Senior Member
Posts: 105
Joined: Wed Oct 25, 2017 3:52 pm
Vensim version: PRO

Time series data for sensitivity analysis

Post by WayneZhou2009 »

Hi Tom and colleagues,

Happy New Year! I have a question about using time series data for sensitivity analysis. I know the 'File' option in Sensitivity Simulation Setup can be used for setting different values of model variables (parameters). But, what if a model variable is not a constant, but instead a time series data?

For example, suppose I have a time series data named "Demand", for the period of 1990 to 2020. Something like:

Year Demand
1990 500
1991 600
1992 650
... ...
2020 5000

Now, I have multiple versions for this 'Demand' time series data. Each version represents a scenario. There could be as many as 2000 scenarios. This can be in an Excel format, or a tab delimited text file.

In this case, how can I tell Vensim Professional to automatically run my model for 2000 times, with each run using a different version of the 'Demand' time series data as my input?

Thank you so much.
Administrator
Super Administrator
Posts: 3750
Joined: Wed Mar 05, 2003 3:10 am

Re: Time series data for sensitivity analysis

Post by Administrator »

Do you have a sample of the demand data?

Usually something like this you would do using DSS (either using the DLL or a command script). If your 2000 scenarios are all in one dataset, it would still be possible in Pro. But I'd need to see a sample of the data first to check.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
WayneZhou2009
Senior Member
Posts: 105
Joined: Wed Oct 25, 2017 3:52 pm
Vensim version: PRO

Re: Time series data for sensitivity analysis

Post by WayneZhou2009 »

Thank you very much for your reply. Please see the attached sample. To reduce file size, I just put 30 scenarios. Each row represents one scenario for 31 data points from 1990 to 2020.

I would be very grateful if you could let me know how I can implement it in Vensim Professional. Thank you so much.
Administrator wrote: Wed Jan 13, 2021 10:45 pm Do you have a sample of the demand data?

Usually something like this you would do using DSS (either using the DLL or a command script). If your 2000 scenarios are all in one dataset, it would still be possible in Pro. But I'd need to see a sample of the data first to check.
Attachments
Demand data.xlsx
(14.47 KiB) Downloaded 3 times
Administrator
Super Administrator
Posts: 3750
Joined: Wed Mar 05, 2003 3:10 am

Re: Time series data for sensitivity analysis

Post by Administrator »

I've attached three files to this post.

First is the model. All the data is imported at the start of the simulation into the parameter "data from Excel file". This is subscripted by "scenario". For your actual model, you will need 200 here instead of 30 in the demo.

There is also a scenario ID number which is equal to the scenario (1 to 30).

And finally "scenario number". This is the value we will change during the sensitivity tests.

If you open the model and run the sensitivity simulation, "scenario number" will be modified from 1 to 30.

Hope this helps. It works when you only have a small set of data, if you had lots, then Vensim DSS would be more appropriate.
Attachments
Demand data.mdl
(2.32 KiB) Downloaded 1 time
Demand data.vsc
(47 Bytes) Downloaded 2 times
Demand data.lst
(119 Bytes) Downloaded 3 times
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
WayneZhou2009
Senior Member
Posts: 105
Joined: Wed Oct 25, 2017 3:52 pm
Vensim version: PRO

Re: Time series data for sensitivity analysis

Post by WayneZhou2009 »

Thank you so much. It works perfectly!
Post Reply