ESL-SEC - Simulation Execution Control

The ESL-SEC, Simulation Execution Control program is a tool to allow you to run an ESL simulation interactively, to change internal values and plot and record values from runs of the simulation in a simple graphical interface. In using ESL-SEC you have the option to save all your settings to a Specification file (extension .sec) for future runs of the simulation.

Note: An ESL simulation to run with ESL-SEC should be a STUDY, with a single model and a simple experiment.

Starting ESL-SEC

You normally start ESL-SEC from ESL-Studio in one of two ways:

You may also initiate the ESL-SEC independently from ESL-Studio by invoking the program directly:

Overview

The main ESL-SEC screen allows you to set up a simulation, and also has a control display to allow you to control the running of the simulation. It lets you set up simulation parameters, and see and set values for any ESL variables in the simulation. You can set runtime displays, plots, tables and record "prepare" files (binary files in a format based on the prepare file produced by the ESL PREPARE statement). You can invoke advanced simulation options to take or load snapshot files, run a previously logged driver file and log a commands to record a driver file. There is also a message area to report progress and any errors.

Simulation Setup

The Simulation Setup dialog can be invoked from the "Setup" button and also from the File > Setup Simulation menu option.

Note: This dialog is not available when running the simulation for an ESL-Studio application via the Simulate > Run Simulation as ESL-Studio uses its own Setup view for this.

The simulation may be defined in a number of ways, based on a simulation file or from an ESL-SEC specification file.

With a simulation file, you specify the Execution Mode which may be:

The appropriate form of simulation file (.esl, .hcd or executable), may be loaded by entering a pathname in the Simulation text area, or via the browse button, "...", by the Simulation text area.

For the Compile, Translate, Link and Execute (.esl) Execution Mode you must specify C++ or Fortran and may set Extra Options and Additional Link Objects. This requires ESL-Pro and the appropriate compiler to have been installed.

The Build Command and Run Command text areas will show the commands that will be used for the build (if required) and to execute the simulation.

An additional Execution Mode, Custom Run Command, allows you to specify an alternate command to execute a simulation, by directly entering the command in the Run Command text area.

When the simulation has been set up, the simulation may be loaded via the "Load" button, and the dialog will close. If the simulation has built and loaded successfully the control display on the main screen will show the simulation ready to start.

An alternate way to setup a simulation is via a previously saved ESL-SEC specification file (with .sec extension), which may be specified by entering a pathname in the Specification file text area, or via the browse button, "...", by the Specification file text area.

Control Panel

When a simulation has been loaded the main screen's central control panel is active.

In its initial state, the panel contains the following buttons:

There is a central radio buttons section specifying when the simulation should stop after the "Start"/"Continue" button is clicked:

Simulation Parameters

The "Simulation Parameters" button on the main screen opens a dialog that allows you to set the values for the main simulation parameters.

These parameters, with their default values shown in parenthesis, are:

The options for ALGO are:

Note: LIN1 and LIN2 are used for steady state analysis - see the Steady-State Analysis section in the ESL Development Guide.

Module Variables

The "Variables" button on the main screen opens a Variables dialog that allows the current values of variables and parameters to be displayed and changed.

A list of modules appears in a Modules panel on the left-hand side of the dialog. If a selected module references any variables, their definitions are displayed in a Variables panel on the right-hand side. Selecting a variable will cause that variable's value and type to be displayed at the bottom of the window. The displayed value can be altered by selecting and overwriting.

The "Show All" button on the Variables dialog opens up a Module dialog which displays values of all variables in the specified program module.

Runtime Displays

The "Runtime Displays" button on the main screen opens a Runtime Displays dialog allows you to select ESL variables in the simulation to directly view as plots or tables, or to save the data as "prepare" files which may subsequently be analysed, for example using the ESL-Displays program.

The Runtime Displays dialog is divided into three sections, accessed through tab controls:

The sections share a number of common control features:

Plot

This allows you to plot a number of variables against another (e.g. the simulation time T). The first variable in the Contents panel is the independent variable plotted along the x-axis. The other variables are plotted up the y-axis. The values are plotted at the simulation time as specified by the update interval.

The "Properties" button opens the Plot Properties window allowing the following to be defined:

The "Show Display" / "Close Display" button opens or closes a plot window. Initially the plot shows the specified plot's axes and annotations. The plot is updated with points as the simulation runs.

Table

This allows you to view a set of variable values at the simulation time as specified by the update interval. The table may be shown as a table window (either listing the variable values or showing the current variable values), or the data may be sent to an output file.

The "Properties" button opens the Table Properties window allowing the following to be defined:

For an output file table, the file name (without extension) defaults to the name given for the display. This may be set to an explicit file path via a browse button, "...", or cleared via a clear button, "x".

The "Show Display" / "Close Display" button for a window table opens or closes a table window.

The "Create Display" / "Close Display" button for an output file table creates (and may overwrite) the file or closes outputting data to the file.

Prepare

This allows you to select a set of variables to be recorded for subsequent post run plotting and analysis, for example using the ESL-Displays program. This selection is done in the same manner as for Plot and Table.

Values of selected variables are written to a "prepare" file. This is a binary file in a format based on the prepare file produced by the ESL PREPARE statement.

The "Properties" button opens the Prepare Properties window allowing the following to be defined:

The "prepare" file name (without extension) defaults to the name given for the display. This may be set to an explicit file path via a browse button, "...", or cleared via a clear button, "x".

The "Create Display" / "Close Display" button creates (and may overwrite) the "prepare" file or closes outputting data to the file.

Advanced Simulation Options

The "Advanced Simulation Options" button on the main screen opens a dialog that allows you to create or load snapshot files (extension .snp), run a previously logged driver file and log commands to record a driver file (extension .drv).

Snapshot Control

When the simulation is stopped, clicking the "Take Snapshot" button in the Snapshot area of the dialog allows you to specify a snapshot file to which the current state of the simulation is written in the form of commands to replicate the state.

The "Load Snapshot" button allows you to open an existing snapshot file for the current simulation, and the simulation will reset to that saved state. You may then run the simulation from the snapshot state via the "Start" / "Continue" button on the main screen control display.

Driver File Control

You may use the browse button, "..." in the Driver area on this dialog to load a driver file, and the clear button, "x", to clear it.

Then, if "Run From Driver" is checked, and a driver file name specified, when the main "Start" / "Continue" button is clicked all subsequent commands will be taken from the driver file. If the simulation is interrupted, unchecking the option reverts to manual control. Rechecking allows driver file control to be recontinued, either from the Next Line or Current Line, as selected.

Logging

You may use the browse button, "..." in the Log area on this dialog to specify a driver file for logging, and the clear button, "x", to clear it.

Checking "Log to File" causes all ESL-SEC commands (including display specification commands) to be written to the specified file, in Append or Overwrite mode, as selected.

Specification files

An ESL-SEC specification file (with .sec extension) holds the holds the simulation setup (how the simulation is to be invoked), the simulation parameters initial settings and the runtime display definitions.

You may explicitly save a specification file (if there has been a change) from the File > Save Specification menu item, which will invoke the Specification Changed dialog.

The Simulation Setup dialog allows you to easily load a new simulation specification.

ESL-SEC will open the Specification Changed dialog when a change to a specification might otherwise be lost, as when a new simulation is going to be loaded or when terminating.

This dialog allows you to change (or set) the specification file (unless ESL-SEC has been started with the "-fixed" option - e.g. from ESL-Studio) via the "Change" browse button, "...".

The dialog has areas for sections of the specification that have changed, which may be Setup, Simulation Parameters and Runtime Displays. You may show more information about the nature of the changes, and select to save the specification changes for specific sections. By default all sections are selected to be saved. The "Save" button performs the save for the selected sections. The "Don't Save" button discards the changes.

Options/Preferences

ESL-SEC has the following options that may be changed via the File > Options/Preferences menu item:

Use external plotting program

By default ESL-SEC uses an internal plotting dialog. If you select this option, ESL-SEC will use the standard plotting program used in ESL simulations.

Note: It is possible to change the actual plotting program by setting the ESL_PLOTTING environment variable.

Note: When an external plotting program is used ESL-SEC does not save the position and size (geometry) of the plot windows.

Prevent overwriting display files

By default ESL-SEC overwrites "prepare" and table output files when a display is created if the file exists. If you select this option ESL-SEC will not overwrite an existing file when you try to create the display and the values will not be recorded.

Show ESL run command console

By default, in Windows, ESL-SEC runs simulation programs in the background. If you select this option the simulation program will run in a Windows command console.

This is likely to be of use when running a custom command or when there are additional objects linked in, and diagnostic and other information is output to the console.

ESL-SEC Command Line Options

If ESL-SEC is invoked by command, the following options are supported:

esl_sec [ -setup ] [ -fixed ] [ <source-file> ]

Notes: The option may be abbreviated to just the first letter. The option is case-insensitive. A pair of dashes (--) may be used instead of the single dash (-). A forward slash (/) may be used instead of the dash (-) under Windows.

❮ Previous Next ❯