Hi,
I am using Vensim Pro for a material flux analysis. Therefore, I created a model with variables (2 constants, 4 with time series data), auxiliaries (fluxes in mass per year) and levels (stocks of material). The variables are used in the functions describing the auxiliaries (e.g. influx Marly N = water Marly in*N conc Marly in). The auxiliaries themselves are describing the level.
Units check was ok. When checking the model, it tells me that “STP Marly is not used in the model”. I do not know why, as I defined it with unit and function. Nevertheless, it seems to work.
The dataset I want to import covers time series data about a 10 years period. When I import the dataset (excel file), it saves the imported values for all 4 variables in a default file (Sheet1.vdfx). To ensure the correct values are loaded, I look at the graphs of the variables and it all looks fine unless I start to simulate… As soon as I start a simulation, there is no data loaded into the simulation file (e.g. called Base) and therefore, the auxiliaries and levels are not calculated although I have provided data to do so.
I think it is rather an issue with how I defined the variables, since I have chosen the type of variable as “Constant” and used the first value (first year data form 2005) as right hand function for the variable. However, the variable actually changes over time. Which type should I rather choose?
How can I fix this problem to run a correct simulation?
Attached, there is a file with screenshots for better understanding. Unfortunately, I was not able to insert them directly into this comment box.
Simulation with time series data for defined variables
-
- Super Administrator
- Posts: 4573
- Joined: Wed Mar 05, 2003 3:10 am
Re: Simulation with time series data for defined variables
Can you upload the model and data? I'ts hard to help with just screenshots.
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
Re: Simulation with time series data for defined variables
Attached the data and model
- Attachments
-
- stp_marly_model.xlsx
- (9.05 KiB) Downloaded 158 times
-
- stp_marly_model.mdl
- (3.09 KiB) Downloaded 143 times
Re: Simulation with time series data for defined variables
"water marly in" should be a data variable, not a constant.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: Simulation with time series data for defined variables
Thanks,
but then I get the following warning:
WARNING: Simulation starts before first time for exogenous variable - N conc Marly in.
WARNING: Simulation starts before first time for exogenous variable - N conc Marly out.
WARNING: Simulation starts before first time for exogenous variable - water Marly in.
WARNING: Simulation starts before first time for exogenous variable - water Marly out.
and it does not run the function for the auxiliaries "influx Marly in" and "efflux Marly in"
but then I get the following warning:
WARNING: Simulation starts before first time for exogenous variable - N conc Marly in.
WARNING: Simulation starts before first time for exogenous variable - N conc Marly out.
WARNING: Simulation starts before first time for exogenous variable - water Marly in.
WARNING: Simulation starts before first time for exogenous variable - water Marly out.
and it does not run the function for the auxiliaries "influx Marly in" and "efflux Marly in"
Re: Simulation with time series data for defined variables
Your time axis in the spreadsheet is 2005+, whereas your time settings in the model are 0 to 10. These need to match (or at least overlap somewhat).
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/