Commit 19a1519c authored by Tong Li's avatar Tong Li

遗传算法-

parent 28811d6c
......@@ -300,7 +300,12 @@ public class RoutingDataService {
if(PlanResources1!=null&&PlanResources1.size()>0)
{
for (PlanResource PlanResource : PlanResources1) {
machine.setCode(PlanResource.getCode());
machine.setName(PlanResource.getTitle());
if(PlanResource.getWorkSchedId()==null)
{
continue;
}
List<MesShiftWorkSched> ShiftWorkScheds = MesShiftWorkScheds.stream()
.filter(t -> (long) t.getWeekWorkSchedId() == PlanResource.getWorkSchedId())
.collect(Collectors.toList());
......@@ -315,7 +320,14 @@ public class RoutingDataService {
}
}
if(shifts1.size()==0)
{
throw new RuntimeException(String.format(
"设备%s没有设置日历",
machine.getCode()+":"+machine.getName()));
}
machine.setShifts(shifts1);
List<ProdEquipSpecialCal> Holidays = ProdEquipSpecialCals.stream()
......
......@@ -300,6 +300,7 @@ order.setDueDate(LocalDateTime.of(2025, 12, 1,0,0,0));
public Chromosome execute2(String SceneId) {
try {
SceneId="6AF8001449FC4D20A3C9992EC24CBF05";
ScheduleParams param = new ScheduleParams();
param.setBaseTime(LocalDateTime.of(2025, 11, 1, 0, 0, 0));
......@@ -356,7 +357,7 @@ order.setDueDate(LocalDateTime.of(2025, 12, 1,0,0,0));
return chromosome;
} catch (Exception e) {
throw new RuntimeException("调度执行失败", e);
throw new RuntimeException("调度执行失败:"+e.getMessage(), e);
}
}
......
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