I developed a Java project ,and I want to use the command "SIMULATE>SIMULATE>SETVAL"to change a Lookup. The help document give an example "SIMULATE>SETVAL|mylookup((0,0),(1,1),(2,2),(5,5))",but there are many (x,y) that I want to change,it's impossible for me to type it by hand.
How can I solve this problem?
the command "SIMULATE>SIMULATE>SETVAL"
-
- Super Administrator
- Posts: 4589
- Joined: Wed Mar 05, 2003 3:10 am
Re: the command "SIMULATE>SIMULATE>SETVAL"
Where do you have the x,y pairs stored?
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: the command "SIMULATE>SIMULATE>SETVAL"
An two-dimension Array。Administrator wrote:Where do you have the x,y pairs stored?
-
- Super Administrator
- Posts: 4589
- Joined: Wed Mar 05, 2003 3:10 am
Re: the command "SIMULATE>SIMULATE>SETVAL"
Why not run a loop to construct the string to pass to Vensim?
something like
something like
Code: Select all
strVensimCommand = "SIMULATE>SETVAL|mylookup(";
for ( i = 0 ; i < UpperBound ; i++ )
{
strVensimCommand = strVensimCommand + "(" + arrayX[i] + "," + arrayY[i] , "),";
}
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: the command "SIMULATE>SIMULATE>SETVAL"
oh,that's a good idea ,thank you very much.Administrator wrote:Why not run a loop to construct the string to pass to Vensim?
something like
Code: Select all
strVensimCommand = "SIMULATE>SETVAL|mylookup("; for ( i = 0 ; i < UpperBound ; i++ ) { strVensimCommand = strVensimCommand + "(" + arrayX[i] + "," + arrayY[i] , "),"; }