Commit be8c854e authored by Tong Li's avatar Tong Li

配套bug

parent 490858d6
......@@ -504,7 +504,7 @@ public class GeneticDecoder {
public void serialDecode(Chromosome chromosome) {
long decodeStart = System.nanoTime();
chromosome.setScenarioID(sceneId);
boolean isJit=_globalParam.isJit();
boolean isJit=true;//_globalParam.isJit();
......@@ -645,12 +645,20 @@ public class GeneticDecoder {
for (Map.Entry<Integer, List<Entry>> entry : entrysBygroupId.entrySet()) {
int groupId = entry.getKey();
Entry firstOp = entry.getValue().get(0);
if(isJit) {
if (Entry.SchedulingMode.BACKWARD.name().equals(
firstOp.getSchedulingMode()) && semiFinishedOrderIds.contains(groupId)) {
orderSchedulingInfo.put(groupId,
new AbstractMap.SimpleEntry<>(true, 0));
}
}else {
if (Entry.SchedulingMode.BACKWARD.name().equals(
firstOp.getSchedulingMode())&&semiFinishedOrderIds.contains(groupId)) {
firstOp.getSchedulingMode())) {
orderSchedulingInfo.put(groupId,
new AbstractMap.SimpleEntry<>(true, 0));
}
}
}
......@@ -687,7 +695,7 @@ public class GeneticDecoder {
int scheduledCount = orderProcessCounter.get(groupId);
if(groupId==51)
if(groupId==7)
{
int k=0;
}
......@@ -1479,6 +1487,9 @@ public class GeneticDecoder {
.collect(Collectors.toList());
for (GAScheduleResult result : resultsToRemove) {
Machine machine = getMachineById(chromosome, result.getMachineId());
if (machine != null) {
AddMachineAvailable(machine, result.getGeneDetails());
......@@ -1495,7 +1506,6 @@ public class GeneticDecoder {
machineTasksCache.clear();
return new ArrayList<>(repairOperationIds);
}
private int processOperation(Entry currentOp, Long machineId, double processTime,
OpMachine machineOption, Chromosome chromosome,
Map<Long, Machine> machineIdMap,
......@@ -1701,7 +1711,7 @@ public class GeneticDecoder {
Map<Integer, Object> result = machineCalculator.CreateScheduleResult(machine, operation,
processingTimeTotal, earliestStartTime, AvailableTimeSegment, processingTime,
operation.getQuantity(), operation.getIsInterrupt() != 1, setupTime,
_globalParam.is_smoothChangeOverInWeek(), setupStartTime, true, isJit);
_globalParam.is_smoothChangeOverInWeek(), setupStartTime, islockMachineTime, isJit);
setupTime = (int) result.get(1);
operation.setChangeLineTime(setupTime);
geneDetails = (CopyOnWriteArrayList<ScheduleResultDetail>) result.get(2);
......
......@@ -234,7 +234,7 @@ if(isJit)
// CopyOnWriteArrayList<ScheduleResultDetail> geneDetails = estimateCalendarAwareDuration(machine,op,machineTasks, start, rawDur,mo.getProcessingTime(),isJit);
if(result!=null) {
start = result.getStartTime();
start = result.getStartTime()-result.getChangeOverTime();
end = result.getEndTime();
}else {
return -1;
......
......@@ -177,8 +177,8 @@ public class PlanResultService {
* 后续会按场景创建人自动回退到可用的策略配置。
*/
public Chromosome execute2(String SceneId) {
// return execute2(SceneId, 2361l, 241l, null);
return execute2(SceneId, 2321l, 207l, null);
return execute2(SceneId, 2361l, 241l, null);
// return execute2(SceneId, 2321l, 207l, null);
}
......
......@@ -42,8 +42,8 @@ public class PlanResultServiceTest {
// nsgaiiUtils.Test();
// planResultService.execute2("64E64F6B68094AF38CEDC418630C3CC2");//2000
// planResultService.execute2("E1448B3C9C8743DEAB39708F2CFE348A");//倒排bomces
planResultService.execute2("197083D0D26A449EB179AC103C753FD3");
planResultService.execute2("E1448B3C9C8743DEAB39708F2CFE348A");//倒排bomces
// planResultService.execute2("197083D0D26A449EB179AC103C753FD3");
// planResultService.execute2("9FEDFD92BB6A4675BF9B1CC64505D1AB");
// planResultService.execute2("15210B13B88A453F8B84AAC7F16C7541");//2000
......
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