|
@@ -6,13 +6,7 @@ public class SJTotalTaskPerformance
|
|
|
{
|
|
|
public string 任务准备时间;
|
|
|
public string 任务成功率;
|
|
|
-
|
|
|
- // public string 识别成功率;
|
|
|
- // public string 平均搜索时间;
|
|
|
- // public string 平均救助时间;
|
|
|
- // public string 总飞行时间;
|
|
|
- // public string 海情覆盖率;
|
|
|
- // public string 人员存活率;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
public class SJTotalTaskPerformanceComponent : Component
|
|
@@ -24,29 +18,17 @@ public class SJTotalTaskPerformanceComponent : Component
|
|
|
var mission = GetParent<SeaSJRescueMission>();
|
|
|
|
|
|
float 识别成功率 = mission.aircrafts.FindAll(a => a.Success).Count / mission.aircrafts.Count;
|
|
|
- //SJTotalTaskPerformance.识别成功率 = 识别成功率 * 100 + "%";
|
|
|
|
|
|
double 任务准备时间 = 0;
|
|
|
- // double 平均搜索时间 = 0;
|
|
|
- // double 总飞行时间 = 0;
|
|
|
- // double 人员存活率 = 0;
|
|
|
int 任务成功次数 = 0;
|
|
|
foreach (var aircraft in mission.aircrafts)
|
|
|
{
|
|
|
任务准备时间 += aircraft.TaskReadyTime;
|
|
|
- // 平均搜索时间 += aircraft.SearchTime;
|
|
|
- // 总飞行时间 += aircraft.TotalTime;
|
|
|
- // 人员存活率 += aircraft.Success ? 1 : 0;
|
|
|
任务成功次数 += aircraft.Success ? 1 : 0;
|
|
|
}
|
|
|
|
|
|
SJTotalTaskPerformance.任务准备时间 = 任务准备时间.ToString();
|
|
|
- // SJTotalTaskPerformance.平均搜索时间 = (平均搜索时间 / mission.aircrafts.Count).ToString();
|
|
|
- // SJTotalTaskPerformance.平均救助时间 = 5.ToString();
|
|
|
- // SJTotalTaskPerformance.总飞行时间 = 总飞行时间.ToString();
|
|
|
- // SJTotalTaskPerformance.海情覆盖率 = "60%".ToString();
|
|
|
SJTotalTaskPerformance.任务成功率 = (任务成功次数 / mission.aircrafts.Count).ToString();
|
|
|
- //SJTotalTaskPerformance.人员存活率 = (人员存活率 / mission.aircrafts.Count).ToString();
|
|
|
}
|
|
|
|
|
|
public Dictionary<string, Dictionary<string, string>> GetReport()
|
|
@@ -54,14 +36,8 @@ public class SJTotalTaskPerformanceComponent : Component
|
|
|
Dictionary<string, Dictionary<string, string>> report = new Dictionary<string, Dictionary<string, string>>();
|
|
|
report["总任务表现"] = new Dictionary<string, string>
|
|
|
{
|
|
|
- //{ "识别成功率", SJTotalTaskPerformance.识别成功率.ToString() },
|
|
|
{ "任务准备时间", SJTotalTaskPerformance.任务准备时间.ToString() },
|
|
|
- //{ "平均搜索时间", SJTotalTaskPerformance.平均搜索时间.ToString() },
|
|
|
- //{ "平均救助时间", SJTotalTaskPerformance.平均救助时间.ToString() },
|
|
|
- //{ "总飞行时间", SJTotalTaskPerformance.总飞行时间.ToString() },
|
|
|
- //{ "海情覆盖率", SJTotalTaskPerformance.海情覆盖率.ToString() },
|
|
|
{ "任务成功率", SJTotalTaskPerformance.任务成功率.ToString() },
|
|
|
- //{ "人员存活率", SJTotalTaskPerformance.人员存活率.ToString() }
|
|
|
};
|
|
|
return report;
|
|
|
}
|