liyang 6 сар өмнө
parent
commit
5b90b3be24

+ 1 - 1
SimulationServer/Component/SJAllTotalTaskPerformance.cs

@@ -49,7 +49,7 @@ public class SJAllTotalTaskPerformanceComponent
             foreach (var item in mhRescueMission.aircraftSJDatas)
             {
                 识别成功率 += float.Parse(item.Value["识别成功率"][sIndex]);
-                if (任务准备时间 < float.Parse(item.Value["任务准备时间"][sIndex]))
+                if (任务准备时间 < float.Parse(item.Value["任务准备时间"][sIndex]))  // 所有任务最小
                     任务准备时间 = float.Parse(item.Value["任务准备时间"][sIndex]);
                 平均搜索时间 += float.Parse(item.Value["平均搜索时间"][sIndex]);
                 总飞行时间 += float.Parse(item.Value["总飞行时间"][sIndex]);

+ 7 - 1
SimulationServer/Entity/AircraftDY.cs

@@ -15,12 +15,18 @@ public class AircraftDY : AircraftEntity
 
     public override void Start()
     {
+        // 飞到目标点时间与人员存活时间做对比  有一个人活着,整个任务成功
         FXJHGenerate.FromStartToMission(FlightPlanEditor, ref TurningPoints);//生成从起点到任务段起点的航路点
-        // 吊运上升速度  吊运下降速度 Task文件读取
+        // 吊运上升速度  吊运下降速度 Task文件读取 // Editor里读天气根据时间
         double resulttime = get_result_time_rope(SHJParameter.H, SHJParameter.person_number, SHJParameter.windspeed, SHJParameter.vis, 0.75, 1.38).time;//索滑降模型输出的索滑降时间
         FXJHGenerate.SuoHuaJiang(resulttime, FlightPlanEditor, ref TurningPoints);
         FXJHGenerate.FromMissionToEnd(FlightPlanEditor, FXJHGenerate.SuoHuaJiangMissionEndPoint(FlightPlanEditor), ref TurningPoints);
         FXJHGenerate.FXJHTPDiedai(FlightPlanEditor, ref TurningPoints, Velocitys, FuelConsumptions);
+
+        for (int i = 0; i < TurningPoints.Count; i++) // 总飞行时间
+        {
+            TotalTime += TurningPoints[i].SegmentFlightTime; // 总时间   //仿真轮次1 数值1
+        }
     }
 
     // --接口

+ 5 - 3
SimulationServer/Entity/AircraftSJ.cs

@@ -2,6 +2,7 @@
 using Model;
 using MongoDB.Bson;
 using MuShiApp;
+using Org.BouncyCastle.Asn1.Pkcs;
 using SimulationCommon;
 using SimulationSingleServer.Utils;
 using Unity.Mathematics;
@@ -218,7 +219,7 @@ public class AircraftSJ : AircraftEntity
 
         Task.Run(() =>
         {
-            bool isseePerson = false;
+            bool isseePerson = false; // 没看到人是0 看到人调用下面方法 //人员存活率 读取Editor人数
             double temptime = 0; // 自增时间,每次增加1s
             CurrentLocation currentLocation = new CurrentLocation();
             double probability = 0;
@@ -312,7 +313,7 @@ public class AircraftSJ : AircraftEntity
             if (isseePerson)
             {
 
-                for (int i = 0; i < TurningPoints.Count - 1; i++)
+                for (int i = 0; i < TurningPoints.Count - 1; i++) // 总飞行时间
                 {
                     TotalTime += TurningPoints[i].SegmentFlightTime; // 总时间
                 }
@@ -323,7 +324,8 @@ public class AircraftSJ : AircraftEntity
                 double longitude = FlightPlanEditor.targetpoint[0].TargetPointLongitude; //落水人员经度,数据测试用
 
                 double survivalTime = SurvivalTimeModel.SurvivalTime(getNCData.tempreadNC, latitude, longitude, time, text_ReadNC.times, text_ReadNC.latitudes, text_ReadNC.longitudes, Days, Hour); //幸存时间
-
+                //  SHJParameter.person_number = Eidtor里读取   SHJParameter.windspeed Nc/Editor
+                //double resulttime = get_result_time_rope(30, SHJParameter.person_number, SHJParameter.windspeed, SHJParameter.vis, 0.75, 1.38).time;//索滑降模型输出的索滑降时间
                 if (survivalTime * 3600 > time)
                 {
                     Success = true;

+ 1 - 1
SimulationServer/bin/Debug/net7.0/Missions/editor_config.json

@@ -1,5 +1,5 @@
 {
-    "仿真次数": 3,
+    "仿真次数": 10,
     "想定信息": {
         "想定日期": "2024年6月4日",
         "想定时间": "00时00分00秒"

+ 5 - 9
SimulationServer/bin/Debug/net7.0/Missions/task_config.json

@@ -324,7 +324,7 @@
                 "任务类型": "索滑降救援",
                 "任务触发器": "时间触发",
                 "下一个任务ID": "",
-				"目标点": 5,
+				"目标点ID": 5,
                 "开始日期": "2023年4月10日",
                 "开始时间": "00时00分00秒",
                 "结束日期": "2023年4月15日",
@@ -494,7 +494,7 @@
             ]
         }
     ],
-    "空中吊运救援任务": [
+    "空中吊运救援任务": [  // 作为子任务,平均搜索时间为0 任务成功率 0
         {
             "任务信息": {
                 "任务名称": "空中吊运救援任务1",
@@ -503,16 +503,14 @@
                 "任务类型": "空中吊运救援",
                 "任务触发器": "时间触发",
                 "下一个任务ID": "",
-				"目标点": 4,				
+				"目标点ID": 4,				
                 "开始日期": "2023年4月10日",
                 "开始时间": "00时00分00秒",
                 "结束日期": "2023年4月15日",
                 "结束时间": "23时00分00秒",
                 "起飞准备时间": 600.0,
                 "任务结束条件": {
-                    "?结束条件": "注释:投送总人数=各个单机投送总人数之和",
-                    "结束条件": "满足投送总人数",
-                    "投送总人数": 5
+                    "结束条件": "全部人员获救"
                 }
             },
             "应用航空器": [
@@ -526,10 +524,8 @@
             "任务参数": [
                 {
                     "应用飞机编号": "3-6",
-                    "高度": 200.0,
+                    "高度": 30.0,
                     "吊运人数": 1,
-                    "风速": 5.0,
-                    "能见度": 5.0,
                     "吊运上升速度": 0.75,
                     "吊运下降速度": 1.38,
                     "任务点": [

BIN
SimulationServer/bin/Debug/net7.0/SimulationCommon.dll


BIN
SimulationServer/bin/Debug/net7.0/SimulationCommon.pdb


BIN
SimulationServer/bin/Debug/net7.0/SimulationServer.dll


BIN
SimulationServer/bin/Debug/net7.0/SimulationServer.exe


BIN
SimulationServer/bin/Debug/net7.0/SimulationServer.pdb