Commit 2bf4f011 authored by Tong Li's avatar Tong Li

倒排

parent fb4f76cb
......@@ -488,7 +488,7 @@ public class GeneticDecoder {
public void serialDecode(Chromosome chromosome) {
long decodeStart = System.nanoTime();
chromosome.setScenarioID(sceneId);
boolean isJit=_globalParam.isJit();
boolean isJit=true;
if (rebuildStructureForCurrentDecode) {
long t1 = System.nanoTime();
//创建半成品订单
......@@ -1408,11 +1408,11 @@ public class GeneticDecoder {
int bomtime = 0;
if (needMaterialCheck&&islockMachineTime) {
bomtime = getOperationBOMTime(operation, chromosome,earliestStartTime, 2);
if(!isJit) {
bomtime = getOperationBOMTime(operation, chromosome, earliestStartTime, 2);
earliestStartTime = Math.max(earliestStartTime, bomtime);
}
}
// 正式落排前,再取一次当前机台最后一道工序,保证换型计算基于最新排程结果。
......@@ -1524,7 +1524,16 @@ public class GeneticDecoder {
// }
//扣库存
if (needMaterialCheck && islockMachineTime) {
if(!isJit) {
EditOperationBOMTime(operation, chromosome, startTime, machineTasksCache, entryIndexById, scheduleIndexById);
}else {
int bomtime1 = getOperationBOMTime(operation, chromosome, startTime, 2);
if(bomtime1<=startTime)
{
EditOperationBOMTime(operation, chromosome, startTime, machineTasksCache, entryIndexById, scheduleIndexById);
}
}
}
//换型时间是否占用设备加工时间
//10:00 开始上班 前面的任务:24:00 结束 开始换型 休息时间 10小时
......
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