Homepage

Index operation

Used to sum or multiply values, or finding the maximum or minimum value, of a non-scalar Block. When the target object is 2-dimensional, you must specify which index list to perform the operation on.

Creating an index operation

From the Projects window

  • Expand the Project to which you wish to add the index operation by clicking the + symbol next to it. Right-click on ‘Blocks’, or a sub-system in ‘Blocks’, and select Index Operation from the pop-up menu.

From the Matrix window

  • Right click an empty diagonal cell of the matrix and select Index Operation from the the pop-up menu.

From the Blocks window

  • Place the mouse anywhere over the area of this window and right-click on it. Select New | Index Operation from the pop-up menu, or

  • In the title bar, select Index Operation from the Type drop-down list and click on the New button.

Editing an index operation

Note Most block properties can be edited directly in the Blocks window.

The block editor is shown by right-clicking the block in a window and selecting Edit. In the Blocks window, you can also show the block editor by selecting the block and clicking the Edit button, or by double-clicking the right-most “validation” column of the block.

The block editor has three tabs:

Properties

This page lets you edit basic properties such as name, sub-system and base unit. See editing properties for more information.

Values

The values page let you select the target object and which operation to perform.

Operation - Choose the operation to perform. You can compute the sum, the product, the minimum or the maximum value of an object.

Object - Select the object to perform the operation from this list of all the available non-scalar objects.

Index List - When you select a 2-dimensional object, you specify here which index list to perform the operation over.

Example

The expression doses is two dimensional. At a specific time point is has the following values:

ContaminantPersonValue
LeadMan4
ArsenicMan1
MercuryMan6
LeadWoman3
ArsenicWoman8
MercuryWoman6

An index operation which finds the maximum over the Person indices would yield:

ContaminantValue
Lead4
Arsenic8
Mercury6

See also