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.
Time series data for sensitivity analysis
-
- Senior Member
- Posts: 105
- Joined: Wed Oct 25, 2017 3:52 pm
- Vensim version: PRO
-
- Super Administrator
- Posts: 4590
- Joined: Wed Mar 05, 2003 3:10 am
Re: Time series data for sensitivity analysis
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.
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
-
- Senior Member
- Posts: 105
- Joined: Wed Oct 25, 2017 3:52 pm
- Vensim version: PRO
Re: Time series data for sensitivity analysis
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.
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 136 times
-
- Super Administrator
- Posts: 4590
- Joined: Wed Mar 05, 2003 3:10 am
Re: Time series data for sensitivity analysis
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.
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 140 times
-
- Demand data.vsc
- (47 Bytes) Downloaded 141 times
-
- Demand data.lst
- (119 Bytes) Downloaded 141 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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
-
- Senior Member
- Posts: 105
- Joined: Wed Oct 25, 2017 3:52 pm
- Vensim version: PRO
Re: Time series data for sensitivity analysis
Thank you so much. It works perfectly!