Trouble with cin load during simulation

Use this forum to post Vensim related questions.
Post Reply
miller2158
Junior Member
Posts: 7
Joined: Tue May 12, 2009 10:18 pm

Trouble with cin load during simulation

Post by miller2158 »

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.
miller2158
Junior Member
Posts: 7
Joined: Tue May 12, 2009 10:18 pm

Post by miller2158 »

Never mind. I found the error.
Post Reply