/// <summary>Constructor</summary> /// <param name="Plant">The parant plant</param> /// <param name="Root">The parent root organ</param> /// <param name="soil">The soil in the zone.</param> /// <param name="depth">Root depth (mm)</param> /// <param name="initialDM">Initial dry matter</param> /// <param name="population">plant population</param> /// <param name="maxNConc">maximum n concentration</param> /// <param name="rfv">Root front velocity</param> /// <param name="mrd">Maximum root depth</param> /// <param name="remobCost">Remobilisation cost</param> public ZoneState(Plant Plant, Root Root, Soil soil, double depth, double initialDM, double population, double maxNConc, IFunction rfv, IFunction mrd, IFunction remobCost) { this.soil = soil; this.plant = Plant; this.root = Root; this.rootFrontVelocity = rfv; this.maximumRootDepth = mrd; this.remobilisationCost = remobCost; Clear(); Zone zone = Apsim.Parent(soil, typeof(Zone)) as Zone; if (zone == null) { throw new Exception("Soil " + soil + " is not in a zone."); } solutes = Apsim.Child(zone, typeof(SoluteManager)) as SoluteManager; if (solutes == null) { throw new Exception("Cannot find solute manager in zone"); } Name = zone.Name; Initialise(depth, initialDM, population, maxNConc); }
/// <summary>Constructor</summary> /// <param name="Plant">The parant plant</param> /// <param name="Root">The parent root organ</param> /// <param name="soil">The soil in the zone.</param> /// <param name="depth">Root depth (mm)</param> /// <param name="initialDM">Initial dry matter</param> /// <param name="population">plant population</param> /// <param name="maxNConc">maximum n concentration</param> public ZoneState(Plant Plant, Root Root, Soil soil, double depth, double initialDM, double population, double maxNConc) { this.soil = soil; this.plant = Plant; this.root = Root; Clear(); Zone zone = Apsim.Parent(soil, typeof(Zone)) as Zone; if (zone == null) { throw new Exception("Soil " + soil + " is not in a zone."); } solutes = Apsim.Child(zone, typeof(SoluteManager)) as SoluteManager; if (solutes == null) { throw new Exception("Cannot find solute manager in zone"); } Name = zone.Name; Initialise(depth, initialDM, population, maxNConc); }