Pipes Documentation

Razvan Surdulescu (c) 2003

1. Introduction

Pipes is a Discrete Event Simulator written in Java. It was written entirely from scratch as a final project for CS380n. It was inspired by HyPerformix's Workbench product, from which it borrows a number of concepts and visual elements.

This document describes the main features of Pipes.

2. Creating and customizing a new model

When you launch Pipes, you will be presented with the main product window:

On this window, you can create a new model or load an existing model. Go to the File menu and select New or click on the New toolbar button to create a new model:

You can load or create as many models as you wish inside the main Pipes window. Each model will have its own window and can be moved, closed or hidden independently.

Right-click on the model window and select Properties from the pop-up menu to configure the model properties:

To change a property, double-click in the appropriate cell in the Value column, type the new property value, then hit Enter. Click OK to commit the new values, click Cancel otherwise.

Note: you must hit Enter, otherwise the value will not be committed into the cell! In particular, if you hit OK without hitting Enter first, the value will not be committed into the cell.

Here is what each model property means:

3. Creating and customizing widgets and arcs

To create a new widget, right-click on the model window and select New ... Widget. Create three widgets: a Source widget, a Service widget and a Sink widget:

Each widget can be connected to one or more other widgets via arcs. To do this, hover the mouse over an incoming or outgoing arrow in a widget until you see a red square appear; click and hold the left mouse button to start drawing an arc, then release the mouse button on the outgoing or, respectively, incoming arrow of another widget:

You cannot connect an outgoing arrow from a widget to another outgoing arrow from another widget; same for incoming arrows. You can connect a widget to multiple other widgets and multiple widgets can be connected to a single widget.

To change the direction in which a widget is pointing, right-click on the widget and select Flip from the pop-up menu.

To delete a widget or an arc, right-click on the widget or the arc and select Delete from the pop-up menu. If you delete a widget, all its incoming or outgoing arcs will also be deleted.

3.1. Customizing widgets

Each widget type will have different properties that can be customized. 

To customize a widget, right-click on it and select Properties. To change a property, double-click in the appropriate cell in the Value column, type the new property value, then hit Enter. Click OK to commit the new values, click Cancel otherwise.

Note: you must hit Enter, otherwise the value will not be committed into the cell! In particular, if you hit OK without hitting Enter first, the value will not be committed into the cell.

Here is what each widget does and what its properties mean.

3.1.1. The Source widget

This widget creates transactions.

3.1.2. The Sink widget

This widget consumes (terminates) transactions.

3.1.3. The Service widget

This widget performs work for some length of time for a transaction.

3.1.4. The Delay widget

This widget delays a transaction by some length of time.

3.1.5. The Resource widget

This widget provides a consumable, discrete resource.

3.1.6. The Allocate widget

This widget allocates resources.

3.1.7. The Release widget

This widget releases resources.

3.2. Customizing arcs

To customize an arc, right-click on it and select Properties.

3.3 Probability distributions

Most widgets have certain properties which are probabilistic in nature. For example, the length of time by which a transaction is delayed at a Delay widget is not necessarily a fixed number: it could be defined according to a probability distribution.

Some probability distributions are defined by a function with a single parameter, other probabilities are defined by a function with two parameters. In all the examples above, Distribution Parameter a represents the parameter for a single-parameter function, whereas Distribution Parameter a and Distribution Parameter b represent the parameters for a two-parameter function. Note that Distribution Parameter b is ignored for a single-parameter function.

Here is what each probability distribution function means:

4. Customizing widget statistics

Each widget specifies what statistics should be gathered and computed during the course of a simulation.

Although all widgets have the same set of possible statistics measures that can be selected, not all statistics make sense for all widgets. For example, the Response Rate or Response Time statistics do not make sense for a Sink widget since no transactions leave this widget. If you select such (inappropriate) statistics for such widgets, they will output 0 at the end of the simulation.

Here are all the possible statistics types and what they mean:

5. Simulating a model

After you create a model and customize its widgets and arcs, you can simulate transactions passing through this model and compute certain statistics for individual nodes.

To use a concrete example, customize the model you created above as follows:

  1. On the Source1 node, set the Distribution Parameter a to 1.0 (Interdeparture Time) and set the Number of Transactions to 100.
  2. On the Service2 node, set the Distribution Parameter a to 1.0 (Service Time).
  3. On the Service2 node, check the Utilization statistic.

To start the simulation, you can either go to the Simulate menu and select Start, or click on the Start button in the toolbar. The following window will appear:

The Show Log checkbox determines whether log messages are displayed during the simulation. If you have many transactions and many widgets in your model, it is advisable to uncheck this checkbox since displaying many log messages is very time and CPU intensive.

The Play button starts the simulation. Once the simulation is started, you can press the Pause button to pause it, the Step button to advance it one step at a time, or the Stop button to stop it.

Once a simulation has ended, you can press the Save button to save the simulation log to a text file.

6. Known issues

Here are some of the known issues with this current release of the product:

  1. Interactive Help: there is no interactive help currently in the product. This document serves that purpose for the time being.
  2. Critique Model: there is no way to determine if a model is completely specified before simulation. For example, an Allocate widget may have a null Resource, which will cause a failure to occur during simulation. More subtly, the sum of the probabilities of outgoing or incoming arcs to a node may add to more than 1.0, which will never flag an error but which will produce spurious results.
  3. Compute standard deviation and variance on all statistics
  4. Exit confirmation if model is dirty: if you have modified the model and have not yet saved it, display a warning on the screen before closing the model window or exiting the application.
  5. Elbow arcs: arcs can only be represented as straight lines, which can make models look messy, especially if they have loops in them.