Back to the Latiz Palette Modeling Environment product page

LPME Model Creation & Execution

A systems model is a simulation model where components in the model are built from their constituent pieces, or subsystems. Interaction between subsystems is controlled by input and output connections between the subsystems. In an event driven simulation, there is no fundamental time step. Instead, components in the model may schedule events with a master controller. The master controller maintains a universal clock and steps time as required given the scheduled events. This type of simulation control, allows any component in the model to schedule its own events without consideration of other components in the system. It is also easy to create multi-scale time domain simulations using event driven scheduling.

Adding Model Components

In the LPME, users construct the systems model by adding preexisting components, called plugins, to the palette. An LPME plugin is a self-contained object that is designed to perform a limited function without any information about the rest of the model. Plugins are added to the modeling palette, shown below, by using drag-and-drop actions from the Plugin Panel, shown at right. Plugins are connected to each other, for the purpose of passing data between them, using mouse actions or context menus. To see images of the Plugin Panel and the modeling palette in context, please visit the screen shots page. To learn more about the development of plugins please visit the plugin library page.

Connecting Model Component's Inputs and Outputs

After a plugin has been connected to another plugin, it can pass its output to the other plugin's input. These output to input connections are made using the LPME Connection Panel, shown below. A plugin may be connected to any number of other plugins thereby allowing it to accept input from and provide output to any number of components in the model. There are no restrictions on the type of inputs and outputs that can pass between plugins, any Java Object is acceptable. Built in type checking prevents incompatible outputs and inputs from being connected.

Setting Model Component Parameters

In addition to accepting output data from other plugins, each plugin can have it's own custom parameter panel. Any graphical user interface element, such as text fields, tables, buttons, drop-down menus, etc., can be included in a plugin's parameter panel. The parameter panel can be as simple as the form shown at right or as complicated as the interactive compound aperture setup shown below.

A plugin can respond to parameter panel input changes before and after a simulation is started, or while the simulation is running. The parameter panel can be used to handle any required plugin to user interface actions such as controlling the setup state of various options for the plugin, performing pre-simulation or post-simulation calculations, or acting as a control panel during the simulation.

Running The Model

Once the model has been setup, it can be executed by simply clicking the Run button. The model can be executed within the currently open Latiz program or exported to an executable Java .jar file to run remotely. If the model is run in the Latiz program, output data can be displayed in various manners while the simulation is running. Plugins can simply print data to a text console if that is all that is needed. Alternatively, each plugin is able to output data to it's own custom Heads Up Display (HUD) panel. Similar to a plugin parameter panel, a plugin's HUD panel can incorporate any GUI element needed to convey data in a useful way or to provide a user interface to perform actions. The HUD display can be paused, opened and closed before or after a simulation has been started. The pause feature can significantly improve simulation performance as display update actions can be skipped if the HUD is paused. Latiz includes various libraries for plotting data, including access to JFreeChart functionality. Below is a HUD example where data is displayed as an image using a built in Latiz Image Panel class.

Data Recording

Data from a simulation can be saved by selecting the Enable Data Saving option in the LPME Recorded Outputs window, shown at right. The outputs from each plugin are listed in the Recorded Outputs window and may be individually selected for saving. The save frequency can also be specified uniquely for each saved output by changing the inputs at the bottom for the window. Latiz has built in support for writing data in HDF5 format. Latiz also has a built in HDF5 file reader. The Latiz HDF5 file reader allows users to view the file contents in a tree view, select data entries, and plot them.

In Latiz, the data recording functionality is implemented using a plun-and-play architecture. If the default HDF5 data format is not sufficient for your needs, it is easy to develop a new, independent data writer, and "plug" it into the Latiz program. The new data writing feature will automatically be picked up as an available option in the LPME run configuration settings. Please contact us for more information.