Trouble with cin load during simulation
Posted: Tue Jul 14, 2009 11:28 pm
I am trying to load a cin file so that I can change the cin file between runs and simulate multiple iterations of my model.
I have the constant set in my list file for output and everytime I check the output files, my constant values used for the simulation do no reflect the cin file.
I am using VB 2008 and I have the following code:
result = vensim_command("SPECIAL>LOADMODEL|C:\SCHOOL\DBA\DISSERTATION\VENSIM\KS 7-4-09a.VPM")
If result = 0 Then Exit Sub
result = vensim_command("SIMULATE>READCIN|CONSTANTS")
If result = 0 Then Exit Sub
result = vensim_command("SIMULATE>RUNNAME|RICH")
If result = 0 Then Exit Sub
result = vensim_command("MENU>RUN|o")
If result = 0 Then Exit Sub
I have tried SIMULATE>ADDCIN AND SIMULATE>CHGFILE with no different results.
When I manually enter change the to the cin file within Vensim, it changes the simulation and runs properly.
I have the constant set in my list file for output and everytime I check the output files, my constant values used for the simulation do no reflect the cin file.
I am using VB 2008 and I have the following code:
result = vensim_command("SPECIAL>LOADMODEL|C:\SCHOOL\DBA\DISSERTATION\VENSIM\KS 7-4-09a.VPM")
If result = 0 Then Exit Sub
result = vensim_command("SIMULATE>READCIN|CONSTANTS")
If result = 0 Then Exit Sub
result = vensim_command("SIMULATE>RUNNAME|RICH")
If result = 0 Then Exit Sub
result = vensim_command("MENU>RUN|o")
If result = 0 Then Exit Sub
I have tried SIMULATE>ADDCIN AND SIMULATE>CHGFILE with no different results.
When I manually enter change the to the cin file within Vensim, it changes the simulation and runs properly.