====== Aggregate ====== An aggregate block will sum (or a similar operation) a selection of other blocks. The aggregate block could be mimicked by an [[Expression|expression block]] but offers the following advantages: * The blocks selected for an aggregate block can be disabled without causing errors in the aggregate (they are simply ignored). * The aggregate can be used to create a union of blocks with different sub-sets: Consider a model with a list of [[Material|materials]]. The materials are grouped into two different categories using [[Sub-set_index_list|sub sets.]]. Organic contaminants belong to the sub-set ‘organic’ wheras the metallic contaminants belong to the sub-set ‘metals’. The expression ‘C_metal’ computes the concentration in media for the ‘metal’ sub-set. The expression ‘C_organic’ computes the concentration in media for the ‘organic’ sub-set. To create a common expression which collates these two sets of concentrations into one, create an aggregate block with the two blocks C_organic and C_metal. ===== Creating an aggregate block ===== From the [[Projects_window|Projects window]] * Expand the Project to which you wish to add the aggregate by clicking the + symbol next to it. Right-click on ‘Blocks’, or a [[Sub-system|sub-system]] in ‘Blocks’, and select **Aggregate** from the pop-up menu. From the [[Matrix_window|matrix window]] * Right click an empty diagonal cell of the matrix and select **Aggregate** 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 **Create | Aggregate** from the pop-up menu, //or// * In the title bar, select **Aggregate** from the **Type** drop-down list and click on the {{:New24.png|New}} button. ===== Editing an aggregate block ===== |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. ==== Appearance ==== This page lets you edit the visual properties of the block in the [[Matrix_window|matrix window]] and [[Graph_window|graph window]]. See [[Editing_appearance|editing appearance]] for more information. ==== Values ==== This page lets you select the operation to perform and on which blocks to perform it. **Options** * **Operation** - Select the operation to perform on the selected blocks. **Dimension** - You can specify the dimension of the block by using the **Type** drop down list. Depending on the dimension the index drop down lists are activated. **Targets** Select the blocks to aggregate. You can use the search options in the bottom section to find the blocks you are interested in. ===== See also ===== * [[Block|Blocks]] * The [[Blocks_window|Blocks window]] * The [[Matrix_window|Matrix window]] * The [[Graph_window|Graph window]]