Razvan Surdulescu (c) 2003

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.

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

menu and select **File**

or click on
the **New**

toolbar button to create a new model:**New**

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

from the pop-up menu to configure the model properties:**Properties**

To change a property, double-click in the appropriate cell in the * Value*
column, type the new property value, then hit

`OK`

`Cancel`

* Note*: you

`OK`

Here is what each model property means:

: the name of the model**Name**: the length of time during which the model is simulated but no statistics are gathered.**Warmup time**: the length of time for which the model is simulated; if all transactions end before this time, the simulation ends.**Simulation time**

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

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.

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

`OK`

`Cancel`

* Note*: you

`OK`

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

This widget creates transactions.

: the name of the widget; this name must be unique among all other widgets.*Name*: the time delay between consecutive transactions generated by this node; more on probability distributions below.*Interdeparture Time Distribution*: the first parameter for the*Distribution Parameter a*; more on probability distributions below.**Interdeparture Time Distribution**: the second parameter for the*Distribution Parameter b*; more on probability distributions below.**Interdeparture Time Distribution**: the number of transactions to generate from this widget.*Number of Transactions*: the category to assign to transactions generated from this widget; you can either select an existing category name of select*Transaction Category*to create a new category name; see the`[Create New]`

property on arcs below for details.*Select Category*: the priority to assign to transactions generated from this widget; see the*Transaction Priority*property on widgets below for details.*Queueing Priority*

This widget consumes (terminates) transactions.

: the name of the widget; this name must be unique among all other widgets.*Name*

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

: the name of the widget; this name must be unique among all other widgets.*Name*: the time it takes for transactions to complete service (work) at this node; more on probability distributions below.*Service Time Distribution*: the first parameter for the*Distribution Parameter a*; more on probability distributions below.*Service Time Distribution*: the second parameter for the*Distribution Parameter b*; more on probability distributions below.*Service Time Distribution*: the order in which transactions are selected from the queue;*Time Rule*means that the first transaction which arrived into the queue is next selected for processing;`FIFO`

means that the last transaction which arrived into the queue is next selected for processing.`LIFO`

: the priority according to which transactions are selected from the queue;*Queueing Priority*means that transactions are selected according to the`No Priority`

defined above;**Time Rule**means that the transaction with the next highest priority to the transaction which completed most recently is next selected for processing;`Next Priority`

means that the transaction with the highest priority is next selected for processing.`Highest Priority`

This widget delays a transaction by some length of time.

: the name of the widget; this name must be unique among all other widgets.*Name*: the time by which a transaction is delayed at this node; more on probability distributions below.*Delay Time Distribution*: the first parameter for the*Distribution Parameter a*; more on probability distributions below.*Delay Time Distribution*: the second parameter for the*Distribution Parameter b*; more on probability distributions below.*Delay Time Distribution*

This widget provides a consumable, discrete resource.

: the name of the widget; this name must be unique among all other widgets.*Name*: the number of tokens that is provided by this widget; tokens can be allocated (removed from the pool) by an*Number of Tokens**Allocate*widget and can be released (returned to the pool) by a*Release*widget.

This widget allocates resources.

: the name of the widget; this name must be unique among all other widgets.*Name*: the*Resource Name**Resource*widget from which tokens are allocated; this list contains all possible*Resource*widgets that can be used by this widget, or it is empty if no*Resource*widgets have been created yet on this model.: the number of tokens allocated from the resource by this node; more on probability distributions below.*Allocate Number Distribution*: the first parameter for the*Distribution Parameter a*; more on probability distributions below.*Allocate Number Distribution*: the second parameter for the*Distribution Parameter b*; more on probability distributions below.*Allocate Number Distribution*: the order in which transactions are selected from the queue;*Time Rule*means that the first transaction which arrived into the queue is next selected for processing;`FIFO`

means that the last transaction which arrived into the queue is next selected for processing.`LIFO`

: the priority according to which transactions are selected from the queue;*Queueing Priority*means that transactions are selected according to the`No Priority`

defined above;**Time Rule**means that the transaction with the next highest priority to the transaction which completed most recently is next selected for processing;`Next Priority`

means that the transaction with the highest priority is next selected for processing.`Highest Priority`

This widget releases resources.

: the name of the widget; this name must be unique among all other widgets.*Name*: the*Resource Name**Resource*widget from which tokens are allocated; this list contains all possible*Resource*widgets that can be used by this widget, or it is empty if no*Resource*widgets have been created yet on this model.: the number of tokens released to the resource by this node; more on probability distributions below.*Release Number Distribution*: the first parameter for the*Distribution Parameter a*; more on probability distributions below.*Release Number Distribution*: the second parameter for the*Distribution Parameter b*; more on probability distributions below.*Release Number Distribution*

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

: if more than one arc can be taken coming out of (or into) a widget, this is the probability by which this arc is selected; the sum of all probabilities for all arcs leaving (or entering) a widget must be 1.0.*Select Probability*: the transaction category which determines whether a transaction can travel across this arc or not.*Select Category*

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

Here is what each probability distribution function means:

: returns the value`Fixed(a)`

`a`

.: returns a value that is uniformly distributed in the interval`Uniform(a, b)`

`a <= x < b`

; if`b <= a`

, the call constitutes an error.: returns a value that is normally distributed with mean`Normal(a, b)`

`a`

and standard deviation`b`

.: returns a value that is a drawing from the negative exponential distribution with mean`Negative Exponential(a, b)`

`1/a`

; if`a`

is non-positive, a runtime error occurs.: returns a value that is a drawing from the Poisson distribution with parameter`Poisson(a)`

`a`

.: returns a value that is a drawing from the Erlang distribution with mean`Erlang(a, b)`

`1/a`

and standard deviation`1/(a* sqrt(b))`

; both`a`

and`b`

must be positive.

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

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

: the rate at which transactions arrive at this widget; this is computed as the total number of transactions that arrived at this widget during the simulation divided by the length of the simulation.*Arrival Rate*: the average population size at this widget; this is computed as the population size during discrete time intervals in the simulation divided by the length of the simulation.*Population*: the average population size in the queue at this widget; this is computed the same way as the*Queue Population*statistic above, except that it uses the queue population size instead of the node population size.*Population*: the average length of time during which this node was busy processing.*Utilization*: the rate at which transactions leave from this widget; this is computed as the total number of transactions that left from this widget during the simulation divided by the length of the simulation.*Response Rate*: the average length of time it took between entering and leaving this widget.*Response Time*

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:

- On the
node, set the`Source1`

to 1.0 (Interdeparture Time) and set the*Distribution Parameter a*to 100.*Number of Transactions* - On the
node, set the`Service2`

to 1.0 (Service Time).*Distribution Parameter a* - On the
node, check the`Service2`

statistic.*Utilization*

To start the simulation, you can either go to the ** Simulate**
menu and select

**Start**

, or click on the `Start`

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

The ** Play** button starts the simulation. Once the
simulation is started, you can press the

`Pause`

`Step`

`Stop`

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

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

**Interactive Help**: there is no interactive help currently in the product. This document serves that purpose for the time being.**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.**Compute standard deviation and variance on all statistics****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.**Elbow arcs**: arcs can only be represented as straight lines, which can make models look messy, especially if they have loops in them.