12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- using KYFramework;
- using Model;
- namespace SimulationServer;
- public class TaskPerformance
- {
- //任务准备时间
- public string 任务准备时间;
- //单机入场时间
- public string 单机入场时间;
- //单机有效任务时长
- public string 单机有效任务时长;
- //单机总投送人数
- public string 单机总投送人数;
- //单机总洒水量
- public string 单机总洒水量;
- //单机总灭火剂投放量
- public string 单机总灭火剂投放量;
- //单机单次投送人数
- public string 单机单次投送人数;
- //单机单次洒水量
- public string 单机单次洒水量;
- //单机单次灭火剂投放量
- public string 单机单次灭火剂投放量;
- }
- // 任务表现组件
- public class TaskPerformanceComponent : Component
- {
- public TaskPerformance TaskPerformance = new TaskPerformance();
-
- public void FillData(AircraftDB db)
- {
- var aircraft = GetParent<AircraftMH>();
-
- TaskPerformance.任务准备时间 = aircraft.TaskReadyTime.ToString();
- TaskPerformance.单机入场时间 = aircraft.FirstTime.ToString("#0.00");
- TaskPerformance.单机有效任务时长 = aircraft.EffMisTime.ToString("#0.00");
- TaskPerformance.单机总投送人数 = aircraft.FlightPlanEditor.aircraftparameter.MaxPassengerNumber.ToString();
- TaskPerformance.单机总洒水量 = ((double)db.fsslwater * aircraft.waterTimes).ToString();
- TaskPerformance.单机总灭火剂投放量 = "0";
- TaskPerformance.单机单次投送人数 = aircraft.FlightPlanEditor.aircraftparameter.MaxPassengerNumber.ToString();
- TaskPerformance.单机单次洒水量 = db.fsslwater.ToString();
- TaskPerformance.单机单次灭火剂投放量 = "0";
-
- }
- public Dictionary<string, Dictionary<string, string>> GetReport()
- {
- Dictionary<string, Dictionary<string, string>> report = new Dictionary<string, Dictionary<string, string>>();
- report["任务表现"] = new Dictionary<string, string>
- {
- { "任务准备时间/s", TaskPerformance.任务准备时间.ToString() },
- { "单机入场时间/s", TaskPerformance.单机入场时间.ToString() },
- { "单机有效任务时长/s", TaskPerformance.单机有效任务时长.ToString() },
- { "单机总投送人数/人", TaskPerformance.单机总投送人数.ToString() },
- { "单机总洒水量/kg", TaskPerformance.单机总洒水量.ToString() },
- { "单机总灭火剂投放量/kg", TaskPerformance.单机总灭火剂投放量.ToString() },
- { "单机单次投送人数/人", TaskPerformance.单机单次投送人数.ToString() },
- { "单机单次洒水量/kg", TaskPerformance.单机单次洒水量.ToString() },
- { "单机单次灭火剂投放量/kg", TaskPerformance.单机单次灭火剂投放量.ToString() }
- };
- return report;
- }
- }
|