Splitter Elements

SplitterSplitter elements split an incoming signal between a number of outputs based on specified fractions or amounts.  Typically, the signal will be a flow of material (e.g., water), but it could also be a discrete transaction.

The properties dialog for a Splitter element looks like this:

The incoming signal to a Splitter element (the Amount) must be a scalar.   The Type drop-list allows you to specify whether the incoming signal is a Value or a Discrete Change Signal.

If it is a Discrete Change Signal, the icon for the Splitter indicates this by changing its color (from blue to red):

Splitter discrete

A Splitter can accept multiple discrete changes. This is indicated in the input field by separating the individual discrete change signals by semi-colons (e.g., Change1; Change2; Change3). You can also specify the multiple discrete changes using the Multiple Discrete Signals button, which displays a table listing the multiple discrete change signals.

The outputs of the Splitter element are specified in the "Outputs" section of the dialog. By default, a Splitter element initially has two outputs (named Output1 and Balance). You can add additional outputs by pressing the Add button (the plus sign) below the list.  Outputs can be deleted using the Delete button (the X), and moved up and down in the list using the two buttons to the right of the Delete button.

The names of the outputs can be changed by editing the items in the Name column.

By default, output amounts are entered as fractions of the input amount. However, you can also specify the output amounts directly (as values). The drop-list directly above the list of outputs specifies how outputs are entered:

If output amounts are defined as fractions of the input amount, then:

   For each output, you specify the Fraction of the incoming Amount that is assigned to that output. The Fractions can be specified as constants or expressions and/or links, and may change with time.

   If the Sum of Fractions must equal one checkbox is checked (the default), then the total amount of the input will be conserved, and:

o Each Fraction must always be greater than or equal to zero.

o You cannot specify the Fraction for the last output. GoldSim automatically assigns the remainder to this output such that the fractions add to one.

o If the specified Fractions exceed one at any time during a simulation, GoldSim issues a fatal error.

   If the Sum of Fractions must equal one checkbox is cleared, then:

o There are no constraints on the values for the Fractions (they can be negative or can exceed one).

o You must specify the Fraction for the last output (GoldSim does not automatically assign the remainder to this output such that the fractions add to one).

o The specified Fractions do not need to sum to one.

If output amounts are defined directly as amounts, then:

   For each output, you specify the Amount that is assigned to that output. The output Amounts can be specified as constants or expressions and/or links, and may change with time.

   If the Sum of Outputs must equal input amount checkbox is checked (the default), then the total amount of the input will be conserved, and:

o You cannot specify the output Amount for the last output. GoldSim automatically assigns the remainder to this output such that the outputs add to input amount.

o If the specified output Amounts exceed the input amount at any time during a simulation, GoldSim issues a fatal error.

   If the Sum of Outputs must equal input amount checkbox is cleared, then:

o There are no constraints on the values for the Amounts (they can be negative or can exceed the input Amount).

o You must specify the output Amount for the last output (GoldSim does not automatically assign the remainder to this output such that the output Amounts add to the input amount).

o The specified output Amounts do not need to sum to the input amount.

Under some circumstances, you may want to specify the outputs as some function of the input amount.  GoldSim facilitates this by providing a locally available property called "Amount".  This represents the current value in the Amount field.  You would reference this value as "~Amount":

This can be particularly useful for routing discrete change signals based on their value.

   Note: “Amount” is an example of a locally available property.  As such, it only has meaning inside the Fraction field, and cannot be referenced anywhere else. 

As shown below in the browser view of a Splitter element, a Splitter has an output for each item in the Outputs list:

   Note: Element inputs and outputs are only shown in the browser if you choose to Show Element Subitems (accessed via the browser context menu by right-clicking in the browser).

The outputs of a Splitter can be either values or discrete change signals (depending on how the Type field was defined).

   Note: If a Splitter outputs discrete change signals, the outputs preserve the Instruction of the input signal.

   Note: If a Splitter outputs discrete change signals, signals with a zero value and an “Add” instruction are not propagated as outputs.

An example model which uses a Splitter element (Splitter.gsm) can be found in the General Examples folder in your GoldSim directory (accessed by selecting File | Open Example... from the main menu).

Related Topics…

Learn more about: