Commit 96d69acd authored by Tong Li's avatar Tong Li

速度优化

parent 76572cbe
......@@ -185,12 +185,12 @@ public class MachineCalculator {
List<TimeSegment> timeSegments= findAvailableSegments(machine, currentTime, machineTasks, remainingTime, isInterrupt);
int estimateIndex= (int) Math.ceil(remainingTime / (double) ONE_DAY_MINUTES);
List<TimeSegment> timeSegments1=null;
if(estimateIndex>10)
{
timeSegments1= getEnoughSegmentsByEstimateIndex(timeSegments,currentTime,remainingTime);
}
// if(estimateIndex>10)
// {
// timeSegments1= getEnoughSegmentsByEstimateIndex(timeSegments,currentTime,remainingTime);
// }
if(timeSegments1==null) {
// if(timeSegments1==null) {
int i = 0;
while (remainingTime > 0) {
TimeSegment shift = timeSegments.get(i);
......@@ -203,9 +203,9 @@ public class MachineCalculator {
RemoveMachineAvailable(machine, time,shift);
i++;
}
}else {
times= CaldScheduleResultDetail(timeSegments1,machine,st,remainingTime,oneTime);
}
// }else {
// times= CaldScheduleResultDetail(timeSegments1,machine,st,remainingTime,oneTime);
// }
return times;
}
......@@ -1014,7 +1014,7 @@ public class MachineCalculator {
}
}
private void RemoveMachineAvailable1(Machine machine, ScheduleResultDetail geneDetails) {
private void RemoveMachineAvailable1(Machine machine, ScheduleResultDetail geneDetails,TimeSegment targetSegment1) {
List<TimeSegment> timeSegments = new ArrayList<>();
List<TimeSegment> availabilitySnapshot = new ArrayList<>(machine.getAvailability());
......
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