At Claytex we always like finding ways of making working with any tool including Dymola more productive. There are many advanced flags within Dymola that are used daily, why not automatically have them set every time you load Dymola?
There are many flags within Dymola that can be used to help understand/troubleshoot/improve efficiency/improve robustness or just make using Dymola a little bit more tailored to your work style. Ordinarily you would need to set them either in the command line, by typing them manually or in some cases, using the options or simulation setup menu dialog box. In some cases these selections are stored, and the next time you open Dymola these are maintained. In most cases these are session specific and once Dymola is closed, the flags are reverted to default.
Most flags, if they are stored for all sessions, are stored in the setup.dmyx. This is within the user AppData, for example, in my path would be:
When modifying the setup.dmyx it is advisable to store an original copy before changing anything to ensure that any accidental changes can be reverted if a problem occurs.
This is a text file and can be opened in notepad or a similar program. Within this file is a lot of information about the setup of Dymola, including layout, compiler choice, search history, etc. This file can contain and hold modifications to flags if defined in the correct section. The Syntax is, within the correct section:
<global-flag value=”(value)” name=”(Flag Path)”/>
The (value) type will depend on the flag and are normally either lower case Boolean or Integer. The (Flag Path) will take the path as it appears in the command line.
For example, I always find that I need to look at the protected variables. Ordinarily I would need to go to the simulation settings Dialog Box, Output and Protected Variables and tick the box every new session of Dymola. Alternatively, if this was the only “other” flag used, then in the setup.dymx it would look like:
<global-flag value=”true” name=”Advanced.StoreProtectedVariables”/>
Similar to methods described in the Opening Script blog, this should make working with Dymola more efficient. Also detailed is the command to list the advanced flags, which also details the type and current value:
Making a change would need to be done when Dymola is closed and saved before opening Dymola. When first opening Dymola after making changes, check the command line to see if any errors occur, this will show errors if your syntax or types are wrong.
It can be useful to keep a list of flags changed in the setup easily accessible so that you can always work out how it may affect the view or simulation results when others are looking at the same models.
Written by: David Briant – Project Engineer
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.