User Tools

Site Tools


index_operation

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

NoteMost 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
Lead Man 4
Arsenic Man 1
Mercury Man 6
Lead Woman 3
Arsenic Woman 8
Mercury Woman 6

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

ContaminantValue
Lead 4
Arsenic 8
Mercury 6

See also

index_operation.txt · Last modified: 2019/11/18 13:34 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki