LingxinMeng před 1 rokem
rodič
revize
81b1821a31

+ 1 - 1
simulation-resource-scheduler/src/main/java/com/css/simulation/resource/scheduler/domain/service/TaskDomainService.java

@@ -182,7 +182,7 @@ public class TaskDomainService {
                     String scoreCommand = "python3 " + scoreDirectoryOfUser + "main.py " + (linuxTempPath + runResultFilePath + "/Ego.csv") + " " + (linuxTempPath + runResultFilePath + "/evaluation.csv") + " " + taskOfLeaf.getSceneType() + " " + ruleName; // 指定打分脚本
                     String scoreResult;
                     ScoreEntity score = null;
-                    log.info("开始执行打分命令:" + scoreCommand);
+                    log.info("开始执行打分命令:{}", scoreCommand);
                     Runtime r = Runtime.getRuntime();
                     Process p = r.exec(scoreCommand, null, new File(scoreDirectoryOfUser));
                     BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));

+ 17 - 0
simulation-resource-scheduler/src/main/java/com/css/simulation/resource/scheduler/test/Main.java

@@ -0,0 +1,17 @@
+package com.css.simulation.resource.scheduler.test;
+
+import com.css.simulation.resource.scheduler.app.entity.VehicleEntity;
+import com.css.simulation.resource.scheduler.infra.entity.SensorsEntity;
+import com.css.simulation.resource.scheduler.infra.entity.TaskMessageEntity;
+
+public class Main {
+
+    public static void main(String[] args) {
+        TaskMessageEntity task = new TaskMessageEntity();
+        task.setVehicle(VehicleEntity.builder()
+                .sensors(SensorsEntity.builder()
+
+                        .build())
+                .build());
+    }
+}

+ 8 - 2
simulation-resource-server/src/main/java/com/css/simulation/resource/server/app/impl/SimulationProjectServiceImpl.java

@@ -438,14 +438,20 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
         }
         //修正算法名称
         {
-            String algorithmName = null;
-            String algorithmDescription = null;
+            String algorithmName;
+            String algorithmDescription;
             {
                 if (DictConstants.ALGORITHM_UPLOAD_MODE_PLATFORM.equals(algorithmType)) {
+                    log.info("使用外部算法平台的算法{}", algorithmId);
                     List<AlgorithmVO> select = algorithmExpandMapper.select(AlgorithmParameter.builder().algorithmId(algorithmId).build());
                     AlgorithmVO algorithmVO = select.get(0);
                     algorithmName = algorithmVO.getAlgorithmName() + "-" + algorithmVO.getAlgorithmVersion();
                     algorithmDescription = select.get(0).getDescription();
+                } else {
+                    log.info("使用内部上传的算法{}", algorithmId);
+                    AlgorithmPO algorithmPO = algorithmMapper.selectDetailsById(algorithmId);
+                    algorithmName = algorithmPO.getAlgorithmName();
+                    algorithmDescription = algorithmPO.getDescription();
                 }
                 // 暂时不处理非算法平台的算法
                 projectDetailsVO.setAlgorithmName(algorithmName);

+ 1 - 1
simulation-resource-server/src/main/resources/bootstrap.yaml

@@ -2,7 +2,7 @@ spring:
   application:
     name: simulation-resource-server
   profiles:
-    active: dev
+    active: mlx
   jackson:
     time-zone: GMT+8
     date-format: yyyy-MM-dd HH:mm:ss