/// <summary> /// Compare result and observed data /// </summary> /// <param name="result"></param> public SWATUnitColumnYearCompareResult(SWATUnitColumnYearResult result) { if (result == null) { return; } SWATUnitColumnYearObservationData observed = result.ObservedData; if (observed == null) { return; } _result1 = result; _data2 = observed; _interval = _result1.UnitResult.Interval; _chartColumns.Add(_result1.ColumnCompare); _chartColumns.Add(_data2.ColumnCompare); _tableColumns.Add(_result1.ColumnCompare); _tableColumns.Add(_data2.ColumnCompare); //_tableColumns.Add("ABSOLUTE"); //_tableColumns.Add("RELATIVE"); _statistic = new StatisticCompare(this, SeasonType.WholeYear); }
/// <summary> /// Compare two results /// </summary> /// <param name="result1"></param> /// <param name="result2"></param> public SWATUnitColumnYearCompareResult(SWATUnitColumnYearResult result1, SWATUnitColumnYearResult result2) { if (result1 == null || result2 == null) { return; } if (result1.UnitResult.Unit.Scenario.Scenario.Name.Equals(result2.UnitResult.Unit.Scenario.Scenario.Name)) //same scenario { if (result1.UnitResult.Unit.Scenario.ModelType == result2.UnitResult.Unit.Scenario.ModelType) //same model type { return; } } else //different scenario { if (result1.UnitResult.Unit.Scenario.ModelType != result2.UnitResult.Unit.Scenario.ModelType) //different model type { return; } } if (result1.UnitResult.Unit.Type != result2.UnitResult.Unit.Type || result1.UnitResult.Unit.ID != result2.UnitResult.Unit.ID) { return; //differnt unit type or id } if (!result1.UnitResult.Name.Equals(result2.UnitResult.Name) || result1.UnitResult.Interval != result2.UnitResult.Interval) { return; //differnt data table or interval } if (!result1.Column.Equals(result2.Column) || result1.Year != result2.Year) { return; //different data column or year } _result1 = result1; _data2 = result2; _interval = _result1.UnitResult.Interval; _chartColumns.Add(_result1.ColumnCompare); _chartColumns.Add(_data2.ColumnCompare); _tableColumns.Add(_result1.ColumnCompare); _tableColumns.Add(_data2.ColumnCompare); //_tableColumns.Add("ABSOLUTE"); //_tableColumns.Add("RELATIVE"); if (_result1.ObservedData != null) { _chartColumns.Add(_result1.ObservedData.ColumnCompare); _tableColumns.Add(_result1.ObservedData.ColumnCompare); } _statistic = new StatisticCompare(this, SeasonType.WholeYear); }
/// <summary> /// Compare two results /// </summary> /// <param name="result1"></param> /// <param name="result2"></param> public SWATUnitColumnYearCompareResult(SWATUnitColumnYearResult result1, SWATUnitColumnYearResult result2) { if(result1 == null || result2 == null) return; if (result1.UnitResult.Unit.Scenario.Scenario.Name.Equals(result2.UnitResult.Unit.Scenario.Scenario.Name)) //same scenario { if (result1.UnitResult.Unit.Scenario.ModelType == result2.UnitResult.Unit.Scenario.ModelType) //same model type return; } else //different scenario { if (result1.UnitResult.Unit.Scenario.ModelType != result2.UnitResult.Unit.Scenario.ModelType) //different model type return; } if (result1.UnitResult.Unit.Type != result2.UnitResult.Unit.Type || result1.UnitResult.Unit.ID != result2.UnitResult.Unit.ID) return; //differnt unit type or id if (!result1.UnitResult.Name.Equals(result2.UnitResult.Name) || result1.UnitResult.Interval != result2.UnitResult.Interval) return; //differnt data table or interval if (!result1.Column.Equals(result2.Column) || result1.Year != result2.Year) return; //different data column or year _result1 = result1; _data2 = result2; _interval = _result1.UnitResult.Interval; _chartColumns.Add(_result1.ColumnCompare); _chartColumns.Add(_data2.ColumnCompare); _tableColumns.Add(_result1.ColumnCompare); _tableColumns.Add(_data2.ColumnCompare); //_tableColumns.Add("ABSOLUTE"); //_tableColumns.Add("RELATIVE"); if (_result1.ObservedData != null) { _chartColumns.Add(_result1.ObservedData.ColumnCompare); _tableColumns.Add(_result1.ObservedData.ColumnCompare); } _statistic = new StatisticCompare(this,SeasonType.WholeYear); }
/// <summary> /// Compare result and observed data /// </summary> /// <param name="result"></param> public SWATUnitColumnYearCompareResult(SWATUnitColumnYearResult result) { if (result == null) return; SWATUnitColumnYearObservationData observed = result.ObservedData; if (observed == null) return; _result1 = result; _data2 = observed; _interval = _result1.UnitResult.Interval; _chartColumns.Add(_result1.ColumnCompare); _chartColumns.Add(_data2.ColumnCompare); _tableColumns.Add(_result1.ColumnCompare); _tableColumns.Add(_data2.ColumnCompare); //_tableColumns.Add("ABSOLUTE"); //_tableColumns.Add("RELATIVE"); _statistic = new StatisticCompare(this,SeasonType.WholeYear); }