예제 #1
0
파일: Labour.cs 프로젝트: Scicrop/ApsimX
 /// <summary>
 /// Calculate the AE of an individual based on provided relationship
 /// </summary>
 /// <returns>value</returns>
 public double?CalculateAE(double ageInMonths)
 {
     if (adultEquivalentRelationship != null)
     {
         return(adultEquivalentRelationship.SolveY(ageInMonths, true));
     }
     else
     {
         return(null);
     }
 }
예제 #2
0
 /// <summary>
 /// Calculate the AE of an individual based on provided relationship
 /// </summary>
 /// <returns>value</returns>
 public double?CalculateAE(double ageInMonths)
 {
     if (adultEquivalentRelationship != null)
     {
         return(adultEquivalentRelationship.SolveY(ageInMonths));
     }
     else
     {
         // no AE relationship provided.
         return(null);
     }
 }
예제 #3
0
파일: Labour.cs 프로젝트: ver078/ApsimX
 /// <summary>
 /// Calculate the AE of an individual based on provided relationship
 /// </summary>
 /// <returns>value</returns>
 public double?CalculateAE(double ageInMonths)
 {
     if (adultEquivalentRelationship != null)
     {
         return(adultEquivalentRelationship.SolveY(ageInMonths, true));
     }
     else
     {
         // no AE relationship provided.
         //string warningString = "No Adult Equivalent (AE) relationship is provided for [r="+this.Name+"]\nEach individual present is assumed to be an AE\nAdd a [Relationship] below [r=Labour] to define AE as a function of age in months";
         //if (!WarningsNotFound.Contains(warningString))
         //{
         //    WarningsNotFound.Add(warningString);
         //    Summary.WriteWarning(this, warningString);
         //}
         return(null);
     }
 }