An Easier Way to Set Boolean Advanced Flags in Dymola

There are many advanced flags within Dymola that allow you to control how it works, but it has not always been straightforward to find out what advanced flags are available and where these can be set. From Dymola 2019 FD01, there has been a new way to display and set the Boolean advanced flags in Dymola that you may not have noticed. In this blog post I will be looking at the Boolean advanced flags GUI.

Where is the Boolean Advanced Flag GUI?

The GUI for the Boolean advanced flags is accessed by going to the Edit menu in Dymola, and selecting Options… from the list. At the bottom of any tab in the Options dialog box is the Flags… button, selecting this will open the Boolean advanced flags GUI as shown in the image below.

Opening the Boolean advanced flag GUI in Dymola
Figure 1: Opening the Boolean advanced flag GUI

What is Included in the Boolean Advanced Flag GUI?

The Boolean advanced flags in Dymola have a wide variety of purposes. So they have been gathered into a number of functional groups in the GUI to help you find the flag you want.

Boolean Advanced Flag GUI
Figure 2: Boolean advanced flag GUI

The names used in the GUI do not always match the advanced flag exactly; some have been made more descriptive to help us navigate the flag options. If you hover the cursor over a flag in the GUI it will display the real name of the Boolean advanced flag.

At the top of the GUI is a search field for filtering the flags displayed to help you find a flag of interest. It searches both the displayed name and the actual name of the Boolean advanced flags.

Using the Boolean Advanced Flag GUI

To set a Boolean advanced flag to true, simply check the box next to the flag in the GUI. In the image below, I enabled the flag StoreProtectedVariables. After I OK’d this change, when I looked at the command log I could see the corresponding advanced flag code that has been executed.

Setting a flag in the Boolean advanced flag GUI in Dymola
Figure 3: Setting a flag in the Boolean advanced flag GUI

When a flag setting has been changed from the default in Dymola, it will be highlighted in yellow so it is easy to see what you have modified. There is also a handy check box Non-Default at the top right of the GUI that will hide all the flags that you haven’t changed.

If you want to return all of the Boolean advanced flags to the default settings and remove your modifications, then you can select the Reset All Flags button on the bottom left of the GUI.

Boolean Advanced Flags I Like to Modify

A final note for this blog post is on the Boolean advanced flags I like to modify to make my life a little easier using Dymola.

Boolean advanced flags that I like to modify
Figure 4: The Boolean advanced flags that I like to modify
  • The IncludeFinalInParameterDialog flag allows you to see any parameters that have been finalised in the parameter dialog boxes. Even though you can’t modify them and they are greyed out, this is useful to investigate the parameterisation of a model . This can also be set via Edit menu > Options…> General tab.
  • The AutoDeleteDirectories flag means when you delete sub-packages in Dymola the corresponding directories and files will also be deleted. This can also be set via Edit menu > Options…> Version tab.
  • If you use a version management system (such as CVS, SVN or Git), the AutoVersionFiles flag means that Dymola will automatically generate the commands for your version management when you move/ delete etc. This can also be set via Edit menu > Options…> Version tab.
  • The DefaultStoreAsOneFile flag is one that you should disable, especially if you are using a version management system. When disabled, new packages of models are stored in a directory structure, so you can easily see which models have been modified in your version management system. Otherwise models are grouped together and stored in a single file, making it far harder to identify which models have been changed in your version management. This can also be set via Edit menu > Options…> Version tab.
  • The StoreProtectedVariables flag stores the protected variables in the simulation results which is useful when comparing results sets and for debugging. This can also be set in the Output tab of the Simulation Setup.
  • The OutputCPUTime flag adds the CPUTime and EventCounter variables to a results set, these are useful for debugging a slow simulation and identifying if events are the problem. This can also be set in the Translation tab of the Simulation Setup .

If you want to make these Boolean advanced flag modifications persistent so they remain set when you close and reopen Dymola, then take a look at our blog post on modifying the setup.dymx file to do this.

Written by: Hannah Hammond-Scott – Modelica Project Leader

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

CONTACT US

Got a question? Just fill in this form and send it to us and we'll get back to you shortly.

Sending

© Copyright 2010-2023 Claytex Services Ltd All Rights Reserved

Log in with your credentials

Forgot your details?