Working with model diagrams : Preferences

Preferences dialogue box

You can specify your preferred settings for the interface. The settings are edited using the preferences dialogue box. The settings are stored between sessions in a file called "prefs" in the .simile hidden folder in your home directory. The settings are stored in this file automatically; there is no need to edit it yourself.

The preferences box is displayed by selecting the last item in the "Edit" or context menu, but the preferences always apply to the whole of Simile. It is a 'persistent' rather than a modal box, which means you can continue working with Simile while it is displayed. Most changes take effect instantly, though some only apply when you actually interact with the relevant part of the diagram (e.g., flow routing). Those where you have to type in a preference (e.g., numerical) can be made to take effect immediately by hitting Return. The "OK" or "Cancel" buttons will remove the box; "OK" saves changes to the preferences, while "Cancel" puts the preferences back as they were when it was opened.

The options are displayed in six sections, in a tabbed notebook in the box:

  • Layout, for options relating to how the diagram window looks
  • Content, for options relating to popups and dialogues
  • Edit, to control the model design process
  • Build, for options which affect how the model is converted into a program
  • Save, for choices about how much information to save
  • Run, for options about how the output of the model is presented.

Please consult each section for further help.

In: Contents >> Working with model diagrams

 

Preferences : Layout

Preferences dialogue box: "Layout" settings

 

Initial window position:

Your computer's operating system will normally decide where to put Simile's first window on your screen when you start it. This is usually the best choice, but on some setups you may prefer to always have it in the same place, in which case you can select "Where it was last time" in this panel, causing Simile to remember the position of the last model window when it closed.

In new model windows, display: bars and grid

When a new model window is created, which happens both when Simile is started or when a submodel is opened in its own window, the window is capable of displaying the standard toolbar, component bar and equation bar, if desired. Note that this does not change the display of the tool bars in existing windows. To control the display of the tool bars in existing windows use the "View" menu and check or uncheck the "Toolbar", "Component bar" or "Equation bar" items. The default is to display all three tool bars, unless the window is not large enough.

The display of the placement grid behaves the same way, but there is also a toolbar button to turn it on and off. Note that snapping to the grid can happen whether or not it is displayed.

Placement grid pitch and depth.

These choices allow you to set the vertical and horizontal pitch of the placement grid. Choosing different values for each of these results in a rectangular grid. The depth sets the visual prominence of the grid lines. How strong they actually appear will also depend on the display device. (Note that if your desktop or submodel background is very dark, you might want the grid to be lighter than the background, in which case enter a negative number here.)

Toolbar and popup formats

An alternative set of tool bar and component bar buttons is provided with 24x24 pixel graphical images. The default is to use 16x16 pixel graphical images.

Normally, hovering over any active object in Simile's display (e.g., buttons, menu entries) will pop up a message with a brief description of what it does. The second option on this tab turns these popups on and off.

By default, Simile's popup tool tips are rectangles drawn inside the window containing the component they describe, and cannot extend outside that window. Selecting 'Top-level popups' makes them draw as separate windows, which can look better although they may be positioned wrongly in some desktop setups.

Widget theme

Simile's user interface components can be configured to a number of different themes. The theme chosen by default is the one that most closely matches a typicall application on the platform you are using. If you prefer another theme, you can select it here, with immediate effect.

In: Contents >> Working with model diagrams >> Preferences

 

Preferences : Content

Preferences dialogue box : "Content" settings

 

Display popups over model components for equations, values and comments

While in pointer mode, holding the pointer over any model component will cause a popup window to appear including that component's equation, value(s) (while the model is running) and description and comments. These can be suppressed by unchecking any or all of these options. If none is selected, the popups are suppressed completely.

  • The equation is displayed on a green background.
  • The description and comments are displayed on a brown background.
  • The current value for the variable, provided you have built the model, is displayed on a yellow background.

The 'Size limit' sets the maximum number of characters that can appear in a field of a model component popup, in order to keep the boxes to a reasonable size. If there are more characters than this (e.g., values from a submodel with thousands of instances) then the middle of the text will be replaced with '.....'.

Normally, an array or list value is displayed as a sequence of indices alternating with values. This can be overlong and hard to read for multidimensional values, so as an alternative Simile v6.9 and later can pop-up 2-D values as matrices, where the indices are not displayed but can be inferred from the row and column positions of the values. This mode is selected with the 'Show 2-D values as matrices' checkbox.

Note that an alternative, especially for complex data structures, is to use the snapshot tool.

Equation listings show parameter origins, enumerated type definitions, comments

The three checkboxes in this section control the behaviour of the equation listing generator.

  • 'Parameter origins' lists the paths to each component whose value is used in the equation.
  • 'Enumerated type definitions' lists the members of enumerated types with the submodels where they are defined.
  • 'Comments' includes descriptions and comments added to all components. 

In: Contents >> Working with model diagrams >> Preferences

 

Preferences : Edit

Preferences dialogue box : "Edit" settings

Snap-to-grid, Quick drag, Custom keypad button.

When "Snap to grid" is selected, any time a component is added to or dragged around the diagram, its position will jump to the nearest intersection on the placement grid. When submodel boundaries are dragged, they will jump to the nearest parallel line on the grid. This does not affect link routing, or caption or bowtie positioning.

When "Quick drag" is selected, collision detection is turned off when dragging components and boundaries, and only done at the end of the drag. This allows dragging to be smoother in very complex models on a slow computer.

The keypad in the equation dialogue has a button for inserting a special character (left of AC). By default this is μ, the 'micro-' prefix for physical units. In this box you can set it to any hard-to-find character you use frequently, e.g., π (the numerical constant pi -- copy it from here!). You can also set it to a word.

Select links end-to-end

Influences and other arrows that cross submodel borders are divided into sections. This option controls whether sections of influence arrows can be selected individually. The default is that clicking on a link at any point, or selecting either of its end points, will select all the sections of the link that are part of the same branch. This alternative, of selecting only the section clicked on, allows parts of a link to be deleted, leaving hanging sections that can be rejoined in different combinations. This is useful for separating and rejoining parts of a model, particularly when building a model from a selection of modules which can be connected together in different arrangements.

Link routing

Flows and squirts can be drawn as either a series of horizontal and vertical sections (following a rectilinear route) or as a straight line (at any angle) between source and sink. Checking or unchecking the 'kink flows' box does not cause the diagram to be redrawn immediately, but when flows are redrawn, they will be redrawn in the new style. The default is for rectilinear flow routing, i.e., kinked if necessary rather than diagonal.

Influences and role arrows are drawn with a default clockwise curvature, but their routes can be adjusted after adding them. The values here set the number of degrees through which they turn when first added -- zero means draw them straight, negative means curve anticlockwise.

Default background for submodels

Submodels can have a background colour and/or a background image, or neither, in which case the background is transparent. A transparent submodel will show the background of its parent submodel through it. This can look messy if the placement grids do not align, so Simile's default behaviour is to give new submodels their own white background. This opton allows new submodels to be transparent (or black for that retro glow look) by default instead.

In: Contents >> Working with model diagrams >> Preferences

 

Preferences : Build

Preferences dialogue box : "Build" settings

 

Use which C++ compiler

 

To run a Simile model at maximum speed, it is converted into a c++ program. This program must then be compiled into executable code. The Windows and (up to release 5.4) Mac versions of Simile include a compiler (GNU g++) and associated tools to allow the code to be created without anything else being installed. This is the 'Default' compiler choice.

The Linux and current Mac versions do not include a c++ compiler; there must be one present on your system. Most Linux machines have one already, and if you do not, it should be simple to add it via your distribution's package management tools. If you have installed Simile as a .deb or .rpm package, the installation process will ensure that the compiler is also installed from the repository. This preference option does not appear on Linux. The Mac version will prompt you to install XCode command-line tools when you run Simile, if it is not already installed. This includes the GNU c++ compiler, which will then be the only choice available.

Even if you have a built-in compiler, you may wish to use another that is present on your system. This choice allows you to do so. Models can be compiled and linked using either Microsoft Visual C++ (Windows only, any 32-bit version) or GNU G++ (version 2.95.2 or later). The GNU compiler is included in the XCode Tools for the Mac, and is available for Windows as part of the MinGW toolchain. Hence on Windows you will see the 'default' option, plus the 'GNU' and 'Microsoft' options if the appropriate compilers have been installed.

Pause to edit c++ code

This option allows you to look at, and perhaps modify, the c++ program generated by Simile before it is compiled. This can be educational, and allows you to include the model source code in other tools. Because it is primarily used for debugging, this option also turns on various other messages relating to code generation.

Extra compiler flags

An 'expert' option -- add text here to specify optimization, inclusion of debugging symbols, saving of intermediate files and other exotic compiler features.

In: Contents >> Working with model diagrams >> Preferences

Preferences : Save

Preferences dialogue box : "Save" settings

Save models as canvas or model file only

Saving canvas data to a separate .cnv file allows the screen to be redrawn more quickly when loading models. It does not affect the model itself, and all the diagram information is still saved with the .sml model file. The default is to save the canvas information.

Show how many reopen options

The "File" menu contains a recently-used file list, to speed up re-opening models. The number of entries on this list is controlled here.

Unsaved edits

These options control what to do if closing a window with an unsaved model (full or short save reminder) or if leaving the equation bar after having made changes to its contents (apply change, abandon change, or ask what to do in a dialogue).

Leaving equation bar

If you are editing a component's equation in the equation bar, you van save the new version by hitting newline or selecting the 'tick' button. This option specifies whether to also save the new version if you just go straight to some other action in the model window. If this is chosen, beware that you may get an error message at an unexpected moment if the equation is not valid when you exit the edit.

Saving .csv files

The most widespread version of the .csv data file format is to have the rows separated by newlines and the columns separated by commas. However, other column separators are occasionally used, such as semicolon and space (note that the entry field will appear the same with a space in it as with nothing!) This controls the column separator used when writing .csv data from the snapshot tool, the data table helper or the logging helper. The column separator to use when reading a .csv file can be set in the file parameter dialogue.

In: Contents >> Working with model diagrams >> Preferences

Preferences : Run

Preferences dialogue box : "Run" settings

Run time environment

Use single window: This option selects between the single-window and multiple-window run time environments. The former is the most common choice.

Reset sliders on model reset

This controls whether resetting a model to its initial state causes sliders that have been adjusted during the previous run to return to their default positions. The sliders will always return to default positions when re-running the model.

Position of run control and input sliders

When not using the single window run time environment, the initial positions of the run control and slider windows are specified here, in the form xy, x and y specify the desired location of window on the screen, in pixels.

Each of x and y must be preceded by + or - . If x is preceded by +, it specifies the number of pixels between the left edge of the screen and the left edge of window's border; if preceded by - then x specifies the number of pixels between the right edge of the screen and the right edge of window's border. If y is preceded by + then it specifies the number of pixels between the top of the screen and the top of window's border; if y is preceded by - then it specifies the number of pixels between the bottom of window's border and the bottom of the screen. For instance, "+100-100" would place the window a short way in from the bottom left corner. Enter "default" to use Windows built-in placement algorithm.

Numerical value precision

These set the number of significant figures that are used when a floating-point numerical value appears in a popup or a snapshot window. By default it is 12, and setting it greater than this will result in meaningless extra digits being added because the internal representation is double-precision. These displays may be easier to read if you select a lower precision. This setting does not affect data displayed in the I/O tools, which have their own means of setting precision.

Occurrences during execution

There are various things that can pause the model before the execution period set in the run control is complete. Some will always stop it, such as a 'stop()' function executing with a nonzero argument, or a discontinuity when adaptive step size variation is in operation. Others, such as compartment under/overruns, can be set to have that effect in the run control. In any case, a message is displayed in the log tab in the run control; selecting 'dialogue interactions' here causes a more prominent dialogue box to appear as well, requiring an 'OK' before the model can be restarted.

In: Contents >> Working with model diagrams >> Preferences