====== Tutorial 5 - Using a general variable ====== ===== 2/5 ===== Ordered List Item - Download the file {{tutorial:Soil_Dose.eco?linkonly}} and open it in Ecolego by clicking the {{:Open24.png|Open}} button, or by selecting **File | Open** from the [[Menu_bar|Menu bar]]. - The agricultural sub-system has a transfer named “Deposition”. The deposition rate is defined as a parameter, making it impossible to run a simulation with a time-varying deposition rate – for instance contamination during a limited time. You will create a [[General_Variable|General Variable]] that allows different ways of entering values for deposition. - Open the [[Sub-system|sub-system]] //Agricultural Land//. - Rename the [[parameter|parameter]] //depRate// to //depRate_constant//.Create a [[lookup_table|lookup table]], call it //depRate_lookup//. Assign a default value of 0. - Create a [[General_Variable|General Variable]]. - Edit the [[General_Variable|General Variable]]. - Name it “depRate”. - Make the [[General_Variable|General Variable]] a **vector** (dimension 1-dependency) - In the list **Available objects**, move the [[Parameter|Parameter]] //depRate_constant// and the [[Lookup_Table|Lookup Table]] //depRate_timeseries// to the selected list using the > button. - Select the //depRate_constant// in the -Default- **Selected** field above. Click **Ok**. {{tutorial_5_1.png}} {{tutorial_5_2.png}} Edit the [[Transfer|Transfer]] //Deposition//. Choose the **Values tab**. Replace the [[Parameter|Parameter]] //depRate_constant// with the [[General_Variable|General Variable]] //depRate// in the **Expression field**. **Next** * [[Tutorial_5-Packaging_the_Sub-systems|Packaging the Sub-systems (3/5)]] **Previous** * [[Tutorial_5-Re-useable_Components|Re-useable components (1/5)]] **References** * [[Tutorials|Back to Tutorials]] * [[start|Home]]