Please enable JavaScript to view this site.

Vensim Help

The CALLBACK control contains commands that are executed in response to a MESSAGE function called during a simulation.  The text field contains a string that is compared with the string passed to the MESSAGE function.  For example consider the model equation:

msg = SAMPLE IF TRUE(:NOT: msg,IF THEN ELSE(:NOT: msg :AND:
Time >= 40,MESSAGE('PROB',5),0),0) ~~|  

If this is combined with the screen:

:SCREEN SIMMER

COMMAND,"SIMULATE",50,45,0,10,,,MENU>RUN

CALLBACK,"PROB",0,0,0,0,,,SPECIAL>MESSAGE|You have grown too old&\

SPECIAL>ALIASSCREEN|OUTCOME|OLDSTER

CLOSESCREEN,"",0,0,0,0,,,,OUTCOME

This will put up the message at time 40 and alias the screen OLDSTER to the alias name OUTCOME.  Thus, at the end of the simulation the Venapp will shift to the screen OLDSTER.