I would like to run the same model under a different set of initial variables.
I have a variable 'Number of arriving aircraft' of Type Level-Normal. Its equation is INTEG(Annual traffic increase) and its initial value is a gaming variable called 'Initial Number of arriving aircraft'.
I'm trying to pass a value for 'Initial Number of arriving aircraft' at the same time i'm defining the final time of the simulation (See below) but I cannot get it to work. When it runs the model uses the value by default in the model and not the one i'm passing it.
Code: Select all
comstr3 = ['SIMULATE>SETVAL|FINAL TIME =', num2str(FinalTime)];
calllib('VenDLL32','vensim_command',comstr3);
InitAC = 50;
comstr2 = ['SIMULATE>SETVAL|Initial Number of arriving aircraft = ', num2str(InitAC)];
calllib('VenDLL32','vensim_command',comstr2);
Load the model and pass values for FINAL TIME and 'Initial Number of arriving aircraft
then SIMULATE>RUNNAME
then GAME>GAMEINTERVAL
then MENU>GAME
then I pass values for other variables of interest
then GAME>GAMEON
Then I retrieve values for other variables and plot them
and eventually GAME>ENDGAME.
Could somebody help me find out what I'm doing wrong?
Thank you very much for your help!
Kind regards,
Olivia