using Yw.Model;
using Yw.Vmo;
namespace HStation.WinFrmUI
{
///
/// 精度评估项
///
public class SimulationPrintAccuracyItemViewModel
{
///
///
///
public SimulationPrintAccuracyItemViewModel() { }
///
///
///
public SimulationPrintAccuracyItemViewModel
(
HydroVisualInfo visual,
HydroMonitorVmo monitor,
HydroWorkingMonitorViewModel workingMonitor,
HydroCalcuVisualResult calcuVisualResult
)
{
this.EvaluateName = visual.Name;
this.EvaluateItem = HydroMonitorPropHelper.GetName(monitor.PropName);
this.PropName = monitor.PropName;
this.UnitName = HydroMonitorPropHelper.GetUnit(monitor.PropName);
this.MonitorValue = workingMonitor.PropValue;
if (this.MonitorValue.HasValue)
{
this.MonitorValue = Math.Abs(Math.Round(this.MonitorValue.Value, 2));
}
this.CalcuValue = calcuVisualResult?.GetCalcuValue(monitor.PropName);
if (this.CalcuValue.HasValue)
{
this.CalcuValue = Math.Abs(Math.Round(this.CalcuValue.Value, 2));
}
if (this.MonitorValue.HasValue && this.CalcuValue.HasValue)
{
if (this.MonitorValue.Value > 0)
{
this.EvaluateError = Math.Round(Math.Abs(this.CalcuValue.Value - this.MonitorValue.Value) / this.MonitorValue.Value * 100, 1);
}
}
}
///
/// 评估构件
///
[DisplayName("评估构件")]
public string EvaluateName { get; set; }
///
/// 评估项
///
[DisplayName("评估项")]
public string EvaluateItem { get; set; }
///
/// 属性名称
///
[DisplayName("属性名称")]
public string PropName { get; set; }
///
/// 单位
///
[DisplayName("单位")]
public string UnitName { get; set; }
///
/// 监测值
///
[DisplayName("监测值")]
public double? MonitorValue { get; set; }
///
/// 计算值
///
[DisplayName("计算值")]
public double? CalcuValue { get; set; }
///
/// 评估误差
///
[DisplayName("评估误差")]
public double? EvaluateError { get; set; }
}
}