Hello!
I am currently working on a project where I need to assign names to the indexes of vector variables in a Vensim model using the Vensim DLL from Python. I have been able to set and get scalar variables successfully, but I am encountering difficulties with vector variables, particularly with assigning names to their indexes programmatically.
How can I assign names to the indexes of vector variables using the Vensim DLL and Python?
Are there any specific commands or functions in the Vensim DLL that facilitate this process?
Any examples or detailed documentation references would be greatly appreciated
Thank you in advance for your help!
Vector variables DLL-Python
Re: Vector variables DLL-Python
You can't change variable names in Vensim via the .dll, and this applies equally to subscripts and stock-flow-aux-data. Your Python code will need to reference variables with subscripts as they exist in the model.
/*
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: Vector variables DLL-Python
If you tell us what you need to accomplish, we might be able to suggest a workaround.
/*
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: Vector variables DLL-Python
Sorry, I meant was how can I call an existing variable that is a vector?
How can I call the indexes of it?
How can I call the indexes of it?
-
- Super Administrator
- Posts: 4667
- Joined: Wed Mar 05, 2003 3:10 am
Re: Vector variables DLL-Python
I don't understand what you are trying to do.
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