We are developing a Vensim model to evaluate, among other issues, energy use and emissions for multimodal transportation options (e.g. combinations of water, road and rail transport). The model is running fine but we also would like to run Vensim scenario's for combinations of different classes of transportation units. Could you recommend a way to extract attribute values for specific classes from Excel and load them in our Vensim model.
E.g.: Vessel Class X: Average Speed, Pay Load, Power, Speed, Energy Type, CO2-emision, NOx Emission, etc.
To run a scenario I envisage that Vessel Class X is selected by some kind of menu in Vensim (?) and related data are automatically loaded from the Excel file into our Vensim model (transforming Excel data into Vensim constants)
Looking forward to your reply!
Thanks for your attention,
Joaquim de Witte
Integrating Vensim Excel
-
- Super Administrator
- Posts: 4590
- Joined: Wed Mar 05, 2003 3:10 am
Re: Integrating Vensim Excel
In PLE+ you are fairly limited. You would first need to read all the data for all the classes into Vensim
Now you can have a variable called "vessel class". If "vessel class" = 1, chose the values for "Vessel Class X", if 2, "Vessel Class Y", if 3, "Vessel Class Z".
Now you can have
This will do what you want. It gets a lot easier with Vensim Pro/DSS where you can use subscripts and do all vessels at the same time.
Code: Select all
Vessel Class X Average Speed = GET XLS.....
Vessel Class X Pay Load = GET XLS.....
Vessel Class Y Average Speed = GET XLS.....
Vessel Class Y Pay Load = GET XLS.....
Vessel Class Z Average Speed = GET XLS.....
Vessel Class Z Pay Load = GET XLS.....
Now you can have
Code: Select all
Average Speed = if then else ( vessel class = 1, Vessel Class X Average Speed , 0 )
+ if then else ( vessel class = 2, Vessel Class X Average Speed , 0 )
+ if then else ( vessel class = 3, Vessel Class X Average Speed , 0 )
pay load = if then else ( vessel class = 1, Vessel Class X payload , 0 )
+ if then else ( vessel class = 2, Vessel Class X payload , 0 )
+ if then else ( vessel class = 3, Vessel Class X payload , 0 )
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: Integrating Vensim Excel
Thanks very much. This will do for the moment. We will certainly consider Pro/DSS as soon as initial funding is expanded in the next stage.