====== Index operation ====== Used to sum or multiply values, or finding the maximum or minimum value, of a non-scalar [[Block|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|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|sub-system]] in ‘Blocks’, and select **Index Operation** from the pop-up menu. From the [[Matrix_window|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|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 {{:New24.png|New}} button. ===== Editing an index operation ===== |Note|Most block properties can be edited directly in the [[Blocks_window|Blocks window]].| The block editor is shown by right-clicking the block in a window and selecting **Edit**. In the [[Blocks_window|Blocks window]], you can also show the block editor by selecting the block and clicking the {{:Edit24.png|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|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: ^Contaminant^Person^Value^ |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: ^Contaminant^Value^ |Lead |4 | |Arsenic |8 | |Mercury |6 | ===== See also ===== * [[Blocks_window|Blocks window]] * [[Matrix_window|Matrix window]] * [[Graph_window|Graph window]] * [[Tutorial_4-Using_index_lists_(Advanced)|Tutorial 4-Using index lists (Advanced)]]