====== Tutorial 2 - Assigning material dependent values ====== ===== 5/7 ===== This lesson will teach you how to vectorize parameters, of [[Index_list|Index list]]s and how to assign index-specific data. The two [[Parameter|parameters]] of the [[Model|model]] control the uptake rate and the excretion rate of the fish. These coefficients are typically substance dependent. \\ **Converting a parameter to a vector** - Open the [[Blocks_window|Blocks window]] by selecting **Window | Blocks** from the [[Menu_bar|menu bar]]. - Right-click the //k_uptake// parameter and select **Edit** from the pop-up menu. - Select the **Values** tab. - From the **Dimension** drop-down list, select “1 dependency”. Make sure that “Materials” is selected in the drop-down list that appears. - As you see, the table now has a row for each [[Material|material]]. The top row can be used for default values. If no value is specified for a material, the default value is used. - Assign the following values to the //k_uptake// parameter: ^Material^Value^ |Arsenic |0.1 | |Lead |0.013| |Mercury |0.19 | \\ {{:tutorial_2_5_1.png|Screenshot}}\\ **Assigning values to k_excretion** Follow the same procedure as above, and assign the following values to //k_excretion//: ^Material^Value^ |Arsenic |0.05 | |Lead |0.003| |Mercury |0.01 | \\ **Assigning initial conditions** Ecolego will automatically convert all [[Compartment|compartments]] to vectors when [[Material|materials]] are added to the model. - In the [[Interaction_matrix|Interaction matrix]] of the [[Matrix_window|Matrix window]], edit the first [[Compartment|compartment]]. - Select the **Values** tab. As the [[Compartment|compartment]] is a vector, you must now assign initial inventories of all [[Material|material]]: \\ ^Material^Value^ |Arsenic |10000| |Lead |10 | |Mercury |1000 | \\ **Next** * [[Tutorial_2-Running_a_simulation|Running a simulation (6/7)]] **Previous** * [[Tutorial_2-Vectorizing_the_model|Vectorising the model (4/7)]] **References** * [[Tutorials|Back to Tutorials]] * [[start|Home]]