Please enable JavaScript to view this site.

Vensim Help

Navigation: Reference Guide > Equation Editor > Correcting Errors

Semantic Errors and Messages

Scroll Prev Top Next More

A semantic error occurs when, even though each equation looks OK by itself, the equations do not fit together.  Generally this is because of problems with subscript usage and simultaneous equations.  Messages normally relate to variables that are used in a model but never defined, or variables that are defined but never used.  The OK and Check Syntax buttons do not report semantic errors or messages, but the Check Model button does.

When you press the Check Model button, Vensim attempts to take the information in the equations and coordinate it into a model that is well formulated and can be simulated.  If there were any syntax errors in any equations this is not possible, so the Check Model button acts like the Check Syntax button and does not try to analyze the model as a whole.

If there are no syntax errors in the equation you are working on, but the model contains semantic errors, incomplete equations, or USE FLAG and NOT DEFINED variables, a list of problems is displayed.  At this point you can click on one of the reported problems and the equation associated with the problem will be brought into the Equation Editor.  You can correct this equation, then again select the Check Model button until all problems have been dealt with.

Note that USE FLAG messages are reported when you press the Check Model button, even though they are usually benign.  You can prevent USE FLAG messages from being reported by setting the Supplementary flag, or ignore the messages.

Ignoring Semantic Errors

If there are syntax or semantic errors, the OK button is relabeled Close.  Clicking on this button allows you to close the Equation Editor and defer making changes to the equations, or make the changes with other tools.  The errors still exist, and you will not be able to simulate the model.

If there are no errors, but messages are reported, the OK button is also relabeled Close.  Clicking on this button closes the Equation Edit window.  A model for which messages are reported can be simulated.  However, if a variable is reported as NOT DEFINED, you will need to supply data for that variable before you can simulate the model.