Exemplo n.º 1
0
 public void CheckSoil(object sender, EventArgs e)
 {
     try
     {
         Soil currentSoil = Apsim.Get(this.explorerPresenter.ApsimXFile, this.explorerPresenter.CurrentNodePath) as Soil;
         if (currentSoil != null)
         {
             SoilChecker.CheckWithStandardisation(currentSoil);
             explorerPresenter.MainPresenter.ShowMessage("Soil water parameters are valid.", Simulation.MessageType.Information);
         }
     }
     catch (Exception err)
     {
         explorerPresenter.MainPresenter.ShowError(err);
     }
 }
Exemplo n.º 2
0
        public void CheckSoil(object sender, EventArgs e)
        {
            Soil currentSoil = Apsim.Get(this.explorerPresenter.ApsimXFile, this.explorerPresenter.CurrentNodePath) as Soil;

            if (currentSoil != null)
            {
                string errorMessages = SoilChecker.Check(currentSoil);
                if (!string.IsNullOrEmpty(errorMessages))
                {
                    explorerPresenter.MainPresenter.ShowError(errorMessages);
                }
                else
                {
                    explorerPresenter.MainPresenter.ShowMessage("Soil water parameters are valid.", Simulation.MessageType.Information);
                }
            }
        }
Exemplo n.º 3
0
        private void OnDoInitialSummary(object sender, EventArgs e)
        {
            if (CaptureSummaryText)
            {
                CreateInitialConditionsTable();
            }


            //Do checks on the soil to make sure there are no problems with the initial parameterisation.

            IEnumerable <Soil> soils = simulation.FindAllDescendants <Soil>();

            foreach (Soil soil in soils)
            {
                SoilChecker.Check(soil);
            }
        }
Exemplo n.º 4
0
 public void CheckSoil(object sender, EventArgs e)
 {
     try
     {
         Soil currentSoil = this.explorerPresenter.ApsimXFile.FindByPath(this.explorerPresenter.CurrentNodePath)?.Value as Soil;
         if (currentSoil != null)
         {
             ISummary summary = currentSoil.FindInScope <ISummary>(this.explorerPresenter.CurrentNodePath);
             SoilChecker.CheckWithStandardisation(currentSoil, summary);
             explorerPresenter.MainPresenter.ShowMessage("Soil water parameters are valid.", Simulation.MessageType.Information);
         }
     }
     catch (Exception err)
     {
         explorerPresenter.MainPresenter.ShowError(err);
     }
 }
Exemplo n.º 5
0
        private void OnDoInitialSummary(object sender, EventArgs e)
        {
            if (CaptureSummaryText)
            {
                CreateInitialConditionsTable();
            }


            //Do checks on the soil to make sure there are no problems with the initial parameterisation.

            List <IModel> soils = Apsim.ChildrenRecursively(simulation, typeof(Soil));

            foreach (Soil soil in soils)
            {
                SoilChecker.Check(soil);
            }
        }
Exemplo n.º 6
0
        private void OnDoInitialSummary(object sender, EventArgs e)
        {
            if (CaptureSummaryText)
            {
                CreateInitialConditionsTable();
            }


            //Do checks on the soil to make sure there are no problems with the initial parameterisation.

            var soils = Apsim.ChildrenRecursively(simulation, typeof(Soils.Soil));

            foreach (Soils.Soil soil in soils)
            {
                string errorMessages = SoilChecker.Check(soil);
                if (!string.IsNullOrEmpty(errorMessages))
                {
                    WriteWarning(soil, errorMessages);
                }
            }
        }
Exemplo n.º 7
0
 private void OnDoInitialSummary(object sender, EventArgs e)
 {
     SoilChecker.Check(this);
 }