Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

With our KLighD visualization, we aim to develop a Ptolemy model browser that is particularly good for reading at helping users read through Ptolemy models. It is able to directly open Ptolemy files and display them in a way very similar to what Ptolemy users are used to seeing.  

...

The biggest change with respect to how Ptolemy shows models is that our model viewer allows to expand hierarchical actors in-place, without

...

having to open a new window. This helps users understand the context a hierarchical actor is placed in: by understanding where inputs come from and where outputs go to, users also better understand what the hierarchical actor is doing and what it is used for.

This is a screenshot of the model browser displaying the model that Ptolemy showed before, with some actors expanded:

Warning

Extend this sectionAdd screenshot.

Tip
titleTry This

Open and browse a Ptolemy model:

  1. Start Eclipse with the KIELER Ptolemy Viewer feature installed.
  2. Import the CarTracking Ptolemy model. TODO: WHERE DO PEOPLE GET THE MODEL?
  3. Open the model by double-clicking it in Eclipse.
  4. Open and close some of the hierarchical actors by double-clicking them.

We have also added further features that may be helpful when browsing models:

  • Annotations can be shown or hidden.
  • A heuristic tries to find out which actor an annotation is providing the documentation for. This is based on the distance between actors and annotations, with a threshold value after which an annotation is considered to stand alone. This attachment between annotations and actors is displayed by a dashed line, and the layout algorithm makes sure the two are placed near each other.
  • Relations in Ptolemy are visualized by small diamond-shaped nodes. Often, these are only used to influence the edge routing. Since we use a layout algorithm to route edges properly, these relation vertices are not necessary. We replace all of them by hyperedges and route the edges properly. An option lets you disable this behaviour: then, only relation vertices with exactly one incoming and one outgoing edge are removed and replaced by a simple edge.
  • Expanded hierarchical nodes have a background color that gets darker with each level of hierarchy. How dark this color is can be changed to adjust for projectors and printers that are not as good at showing sublte colors.
  • The properties of actors and ports are shown as tool tips. This does not include advanced properties, which are those properties that start with an underscore.

How

...

This Stuff Works

All of this functionality is implemented in one main plug-in and two support plug-ins:

  • de.cau.cs.kieler.ptolemy.klighd contains the actual transformation that turns Ptolemy files into something we can display with KLighD.
  • org.ptolemy contains a reduced Ptolemy version that we use to render actors. Not all actors are available in this distribution.
  • org.ptolemy.moml contains an EMF model that we use to load Ptolemy files.

For the rest of this page, we will describe the basics of how the transformation works and the challenges it presented.

Architecture of the Transformation

Warning

Describe the architecture.

Generating the Basic KGraph Model

Warning

Describe step 1.

Optimizing the KGraph Model

Warning

Describe step 2.

Adding Rendering Information to the KGraph Model

Warning

Describe step 3.