STEM help / Training

Exercise 11: Creating an Expression transformation

Again, we shall return to the original model to make sure that everyone keeps in step, so please close the results, switch back to the Editor, close WiMAX-DSL10 and re-open WiMAX-DSL02.

Save the model as WiMAX-DSL11

  1. Scroll the view in the Editor so that you can see from the three services across to a transformation called WiMAX access bandwidth.
  2. Note the pink arrows drawn to this transformation.

Temporarily click and hold over each link to highlight its end-points.

  1. Look at the Input and Transformation dialog for WiMAX access bandwidth. This is another Expression Transformation, but with a more interesting formula, (Input1 + Input2 + Input3) * Input4.

What is the purpose of Input 4?

  1. We are going to build a parallel copy of WiMAX access bandwidth as an exercise, and you are not allowed to use copy and paste!
  2. Create a new transformation from the toolbar.
  3. Rename it as My WiMAX access bandwidth.
  4. Look at the Input and Transformation dialog for the new element. You will note that it is a Multiplier transformation by default. Leave this dialog visible while you work through the following steps.
  5. Use the Connect tool to link the transformation Voice bandwidth into your new transformation. You will see the dialog update to reflect this new input.

  1. Repeat this process to make a connection from the Internet Access service, but watch out for a ‘plus handle’ which will appear when you hover over the target transformation, and make sure that you click within the handle. This tells STEM to add the new connection as an additional input, and you will see the dialog change to show an Expression transformation, with Internet Access as the second input.

This change would otherwise be made manually via the Type menu on the dialog. (You may note Erlang and Multiplier among the other options.)

Note: the pink arrow between the Internet Access service and the My WiMAX access bandwidth transformation is a thicker line style, denoting that a non-preferred Basis has been used.

  1. Use the Connect tool and the plus handle again to add the remaining connections from the Video service (Basis = Busy Hour Traffic) and from the WiMAX prop transformation.

If you miss the handle, STEM will prompt you to choose which input to connect to, either to replace an existing input, or choose a new one. For the original multiplier transformation, it would just replace the existing (single) input.

Note: the appearance of the connections made using both preferred and non-preferred bases can be changed by accessing the Display Options dialog from the main Element menu.

  1. Go back to the Input and Transformation dialog and enter the Output Unit as Mbit/s.
  2. Enter the Expression as shown above (i.e., (Input1 + Input2 + Input3) * Input4).

Save and run the model

If your model does not run first time, you can use Check for Errors and Next Error on the File menu (or use the buttons on the Toolbar) in the Editor to help find out what is wrong.

Note: You can safely ignore the warning ‘Transformation has no Requirements’

  1. Draw the graph Instantaneous Output for the original WiMAX access bandwidth transformation and your version.
  2. See how the results compare. Are they the same? If not, why not?

STEM will display an error message in a standard error tooltip, directly next to the field in question, as well as in the status bar at the bottom of the Editor window. It will also open the dialog containing the error with the relevant input selected. The tooltip will move down to the status bar as soon as you start to enter a correction.

Things that you should have seen and understood

Creating a transformation, change Type, adding and modifying inputs, Expression, Output Unit
Connect tool, plus handle
Check for Errors, Next Error, status bar

 

© Implied Logic Limited