Commit 6f822727 authored by Tong Li's avatar Tong Li

设备

parent 171ab53b
...@@ -221,14 +221,14 @@ public class GeneticAlgorithm { ...@@ -221,14 +221,14 @@ public class GeneticAlgorithm {
FileHelper.writeLogFile("迭代进化-----------结束-------"); FileHelper.writeLogFile("迭代进化-----------结束-------");
best.setBaseTime(param.getBaseTime()); best.setBaseTime(param.getBaseTime());
best.setOrderMaterials(orderMaterials);
best.setOperatRel(_entryRel);
if(best.getInitMachines()==null) if(best.getInitMachines()==null)
{ {
best.setInitMachines(machines); best.setInitMachines(ProductionDeepCopyUtil.deepCopyList(machines,Machine.class));
} }
best.setOrderMaterials(orderMaterials);
best.setOperatRel(_entryRel);
LocalDateTime endtime=LocalDateTime.now(); LocalDateTime endtime=LocalDateTime.now();
FileHelper.writeLogFile(String.format("排产-----------结束---%s----耗时%d----",allOperations.get(0).getSceneId(),DateTimeUtil.diffDuration(starttime,endtime).getSeconds()) ); FileHelper.writeLogFile(String.format("排产-----------结束---%s----耗时%d----",allOperations.get(0).getSceneId(),DateTimeUtil.diffDuration(starttime,endtime).getSeconds()) );
......
...@@ -84,6 +84,8 @@ public class GeneticDecoder { ...@@ -84,6 +84,8 @@ public class GeneticDecoder {
// 缓存命中:复用缓存结果 // 缓存命中:复用缓存结果
Chromosome cachedResult = decodingCache.get(cacheKey); Chromosome cachedResult = decodingCache.get(cacheKey);
// 赋值给染色体 // 赋值给染色体
chromosome.setInitMachines(ProductionDeepCopyUtil.deepCopyList(cachedResult.getInitMachines(),Machine.class));
chromosome.setObjectives(cachedResult.getObjectives()); chromosome.setObjectives(cachedResult.getObjectives());
chromosome.setMakespan(cachedResult.getMakespan()); chromosome.setMakespan(cachedResult.getMakespan());
chromosome.setTotalFlowTime(cachedResult.getTotalFlowTime()); chromosome.setTotalFlowTime(cachedResult.getTotalFlowTime());
......
...@@ -37,15 +37,15 @@ public class PlanResultServiceTest { ...@@ -37,15 +37,15 @@ public class PlanResultServiceTest {
// nsgaiiUtils.Test(); // nsgaiiUtils.Test();
//planResultService.execute2("C5FB5EF2A7334A0A92F826F4937E1008"); //planResultService.execute2("C5FB5EF2A7334A0A92F826F4937E1008");
// planResultService.execute2("8B13052B347B4FC4B21D59E685B06642"); planResultService.execute2("B6AE363FF5044DDF8DECE32D5FE0F7EA");
// LocalDateTime t= LocalDateTime.of(2025, 11, 15, 6, 51, 11); // LocalDateTime t= LocalDateTime.of(2025, 11, 15, 6, 51, 11);
// List<Integer> opids=new ArrayList<>(); // List<Integer> opids=new ArrayList<>();
// opids.add(1); // opids.add(1);
// planResultService.Move("B571EF6682DB463AB2977B1055A74112",opids,t,3403L); // planResultService.Move("B571EF6682DB463AB2977B1055A74112",opids,t,3403L);
// planResultService.Redecode("E2B98BDD535E467096E4444E7C739D8C"); // planResultService.Redecode("B6AE363FF5044DDF8DECE32D5FE0F7EA");
planResultService.SpiltOrder("A41D662EE0764D008173C5A0E42B15F6","5f9d5383-b89a-4a4f-8805-2f617c711968",new Double[]{500d, 500d}); // planResultService.SpiltOrder("A41D662EE0764D008173C5A0E42B15F6","5f9d5383-b89a-4a4f-8805-2f617c711968",new Double[]{500d, 500d});
} }
@Test @Test
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment