Example #1
0
        private void OnSimulationCommencing(object sender, EventArgs e)
        {
            Soil soil = Apsim.Find(this, typeof(Soil)) as Soil;

            if (soil == null)
            {
                throw new Exception("Cannot find soil");
            }
            if (soil.Crop(Plant.Name) == null && soil.Weirdo == null)
            {
                throw new Exception("Cannot find a soil crop parameterisation for " + Plant.Name);
            }

            PlantZone = new ZoneState(Plant, this, soil, 0, initialDM.Value(), Plant.Population, maximumNConc.Value(),
                                      rootFrontVelocity, maximumRootDepth, remobilisationCost);
            Zones                 = new List <ZoneState>();
            Allocated             = new PMF.Biomass();
            Senesced              = new Biomass();
            Detached              = new Biomass();
            Removed               = new Biomass();
            NDemand               = new BiomassPoolType();
            DMDemand              = new BiomassPoolType();
            NSupply               = new BiomassSupplyType();
            DMSupply              = new BiomassSupplyType();
            potentialDMAllocation = new BiomassPoolType();
        }
Example #2
0
 protected void OnSimulationCommencing(object sender, EventArgs e)
 {
     Allocated = new PMF.Biomass();
     Senesced  = new Biomass();
     Detached  = new Biomass();
     Removed   = new Biomass();
 }
Example #3
0
 private void OnDoDailyInitialisation(object sender, EventArgs e)
 {
     if (Plant.IsAlive)
     {
         Allocated = new PMF.Biomass();
         Senesced  = new Biomass();
         Detached  = new Biomass();
         Removed   = new Biomass();
     }
 }
 protected void OnSimulationCommencing(object sender, EventArgs e)
 {
     Allocated = new PMF.Biomass();
     Senesced  = new Biomass();
     Detached  = new Biomass();
     Removed   = new Biomass();
     NDemand   = new BiomassPoolType();
     DMDemand  = new BiomassPoolType();
     NSupply   = new BiomassSupplyType();
     DMSupply  = new BiomassSupplyType();
 }