Commit abbd34a4 authored by Tong Li's avatar Tong Li

禁用配套

parent 6d63a60c
...@@ -58,7 +58,7 @@ public class GeneticDecoder { ...@@ -58,7 +58,7 @@ public class GeneticDecoder {
private DiscreteParameterMatrixService discreteParameterMatrixService; private DiscreteParameterMatrixService discreteParameterMatrixService;
private String sceneId; private String sceneId;
private boolean rebuildStructureForCurrentDecode = true; private boolean rebuildStructureForCurrentDecode = false;
...@@ -402,11 +402,12 @@ public class GeneticDecoder { ...@@ -402,11 +402,12 @@ public class GeneticDecoder {
public void serialDecode(Chromosome chromosome) { public void serialDecode(Chromosome chromosome) {
chromosome.setScenarioID(sceneId);
if (rebuildStructureForCurrentDecode) { if (rebuildStructureForCurrentDecode) {
materialRequirementService.buildMultiLevelRequirementNetwork(chromosome, sceneId, baseTime,_globalParam); materialRequirementService.buildMultiLevelRequirementNetwork(chromosome, sceneId, baseTime,_globalParam);
} }
chromosome.setScenarioID(sceneId);
if(rebuildStructureForCurrentDecode && _globalParam.isIsCheckSf()) { if(rebuildStructureForCurrentDecode && _globalParam.isIsCheckSf()) {
int isnew= generateGlobalOpList(chromosome); int isnew= generateGlobalOpList(chromosome);
...@@ -1091,7 +1092,7 @@ public class GeneticDecoder { ...@@ -1091,7 +1092,7 @@ public class GeneticDecoder {
int setupTime=0; int setupTime=0;
long machineId = machine.getId(); long machineId = machine.getId();
boolean needMaterialCheck = (operation.getMaterialRequirements()!=null&&operation.getTargetFinishedOperationId()==null)||calbom; boolean needMaterialCheck =false;// (operation.getMaterialRequirements()!=null&&operation.getMaterialRequirements().size()>0&&operation.getTargetFinishedOperationId()==null)||calbom;
boolean commitMaterialCheck = needMaterialCheck; boolean commitMaterialCheck = needMaterialCheck;
int baseEarliestStartTime = earliestStartTime; int baseEarliestStartTime = earliestStartTime;
int candidateStartTime = earliestStartTime; int candidateStartTime = earliestStartTime;
......
...@@ -532,6 +532,7 @@ public class HillClimbing { ...@@ -532,6 +532,7 @@ public class HillClimbing {
// 检查是否所有工序都只有一个设备选项 // 检查是否所有工序都只有一个设备选项
boolean allSingleMachine = ops.stream() boolean allSingleMachine = ops.stream()
.filter(t->t.getMachineOptions()!=null)
.allMatch(op -> op.getMachineOptions().size() <= 1); .allMatch(op -> op.getMachineOptions().size() <= 1);
// 检查是否只有一个GroupId // 检查是否只有一个GroupId
......
...@@ -456,7 +456,7 @@ int opcount=allOperations.size(); ...@@ -456,7 +456,7 @@ int opcount=allOperations.size();
FileHelper.writeLogFile("解码---------------"+population.size() ); FileHelper.writeLogFile("解码---------------"+population.size() );
GeneticDecoder decoder = new GeneticDecoder(_GlobalParam, param.getBaseTime(), machines, orders, materials, machineScheduler,materialRequirementService, sceneId); GeneticDecoder decoder = new GeneticDecoder(_GlobalParam, param.getBaseTime(), machines, orders, materials, machineScheduler,materialRequirementService, sceneId);
boolean ismore=true; boolean ismore=false;
if(ismore) { if(ismore) {
CompletableFuture.allOf(population.stream() CompletableFuture.allOf(population.stream()
.map(chromosome -> CompletableFuture.runAsync(() -> decode(decoder, chromosome, param, allOperations, globalOpList), decodeExecutor)) .map(chromosome -> CompletableFuture.runAsync(() -> decode(decoder, chromosome, param, allOperations, globalOpList), decodeExecutor))
......
...@@ -275,8 +275,11 @@ public class RoutingDataService { ...@@ -275,8 +275,11 @@ public class RoutingDataService {
entry.setMachineOptions(mos); entry.setMachineOptions(mos);
} }
} }
if(entry.getMachineOptions()!=null)
{
entrys.add(entry);
}
entrys.add(entry);
} }
......
...@@ -40,7 +40,8 @@ public class PlanResultServiceTest { ...@@ -40,7 +40,8 @@ public class PlanResultServiceTest {
// sortService.test1(); // sortService.test1();
// nsgaiiUtils.Test(); // nsgaiiUtils.Test();
planResultService.execute2("E29F2B3ADA8149F6B916B5119296A92B");//2000 // planResultService.execute2("E29F2B3ADA8149F6B916B5119296A92B");//2000
planResultService.execute2("E2CD1FC6FF9B4B19A59FEC7F846D4952");//600
// planResultService.execute2("08B1D87FE1B84ECDBAC2E546DDB6FB81");//2000 // planResultService.execute2("08B1D87FE1B84ECDBAC2E546DDB6FB81");//2000
// planResultService.execute2("0428340BB4F540938F1FB5599F03E8A4");//5000 // planResultService.execute2("0428340BB4F540938F1FB5599F03E8A4");//5000
......
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