When debugging a model, a de-cluttered messages log window makes it easier to identify what the important/critical problems are that Dymola has found with the model.
How can we de-clutter a log window though without loosing valuable information Dymola tells us about the model? There will be text in the form of model information and warning messages that we can easily remove by acting on them. Warning messages don’t prevent the model from running but they tell us there is something not quite right about the model or something that could be improved.
For example a typical warning message we often see is one related to incompatible units in equations. Whilst this warning will not prevent the model from running, it indicates there is a potential problem in the model that needs addressing and that is straight forward to address by correcting an equation or specifying the correct units for parameters and variables that are used in the equations.
Figure 1. Typical warning message relating to units not balancing in equations
Another easy to address warning message is the one related to not using the attribute “each” when we are setting parameters for a component array using a single value.
Figure 2. Typical waring related to an omitted “each” attribute when parameterising a component array.
Lastly (for this example), a warning related to a mistake on the user’s side applying a modifier for a protected component generates the following error message:
Figure 3. Typical warning message relating to referencing protected parameters and variables in a model.
When all of these error messages are combined with multiple instances of incorrectly defined components in a System model, the log window on the right can become like this:
Figure 4. Example of a cluttered log window that needs attention.
By fixing the points mentioned above we can achieve this:
Figure 5. Example of a de-cluttered log window where potential error messages will be easy to pick out.
We can now have an excellent de-cluttered starting point (Figure 5) for debugging more serious errors that might be flagged up as we develop our models.
So my takeaway message is when you see warnings that look like they need to be resolved, get them resolved! This will help the debugging and understanding of more serious issues that might arise during your model development.
Written by: Alessandro Picarelli – Engineering Director
Please get in touch if you have any questions or have got a topic in mind that you would like us to write about. You can submit your questions / topics via: Tech Blog Questions / Topic Suggestion