示例#1
0
 private void PublishNewPotentialGrowth()
 {
     // Send out a NewPotentialGrowthEvent.
     if (NewPotentialGrowth != null)
     {
         NewPotentialGrowthType GrowthType = new NewPotentialGrowthType();
         GrowthType.sender = Plant.Name;
         GrowthType.frgr   = (float)Math.Min(Math.Min(Frgr, Fvpd), Ft);
         NewPotentialGrowth.Invoke(GrowthType);
     }
 }
示例#2
0
 private void PublishNewPotentialGrowth()
 {
     // Send out a NewPotentialGrowthEvent.
     if (NewPotentialGrowth != null)
     {
         NewPotentialGrowthType GrowthType = new NewPotentialGrowthType();
         GrowthType.sender = Plant.Name;
         GrowthType.frgr   = (float)Math.Min(Math.Min(TempStress.Value, NStress.Photo),
                                             Math.Min(SWStress.OxygenDeficitPhoto, PStress.Photo));
         NewPotentialGrowth.Invoke(GrowthType);
     }
 }
示例#3
0
    public void OnPrepare()
    {
        Util.Debug("\r\nPREPARE=%s", Today.ToString("d/M/yyyy"));
        Util.Debug("       =%i", Today.DayOfYear);

        foreach (Organ1 Organ in Organ1s)
        {
            Organ.OnPrepare();
        }

        NStress.DoPlantNStress();
        RadiationPartitioning.DoRadiationPartition();
        foreach (Organ1 Organ in Organ1s)
        {
            Organ.DoPotentialRUE();
        }

        // Calculate Plant Water Demand
        double SWDemandMaxFactor = EOCropFactor * EO;

        foreach (Organ1 Organ in Organ1s)
        {
            Organ.DoSWDemand(SWDemandMaxFactor);
        }

        DoNDemandEstimate();

        // PUBLISH NewPotentialGrowth event.
        NewPotentialGrowthType NewPotentialGrowthData = new NewPotentialGrowthType();

        NewPotentialGrowthData.frgr = (float)Math.Min(Math.Min(TempStress.Value, NStress.Photo),
                                                      Math.Min(SWStress.OxygenDeficitPhoto, 1.0 /*PStress.Photo*/));    // FIXME
        NewPotentialGrowthData.sender = Name;
        NewPotentialGrowth.Invoke(NewPotentialGrowthData);
        Util.Debug("NewPotentialGrowth.frgr=%f", NewPotentialGrowthData.frgr);
        //Prepare_p();   // FIXME
    }