Commit 250695e0 authored by Tong Li's avatar Tong Li

bom

parent d5dfcb6f
......@@ -144,17 +144,24 @@ public class GeneticDecoder {
return chromosome;
}
public void generateGlobalOpList(Chromosome chromosome) {
public int generateGlobalOpList(Chromosome chromosome) {
CopyOnWriteArrayList<Entry> allOperations= chromosome.getAllOperations()
.stream()
.filter(t->t.isNewCreate()==true)
.collect(Collectors.toCollection(CopyOnWriteArrayList::new));
if(allOperations==null&&allOperations.size()>0)
{
return 0;
}
List<GlobalOperationInfo> globalOpList = new ArrayList<>();
int globalOpId = chromosome.getGlobalOpList()
.stream()
.mapToInt(GlobalOperationInfo::getGlobalOpId)
.max().orElse(0)+1;
CopyOnWriteArrayList<Entry> allOperations= chromosome.getAllOperations()
.stream()
.filter(t->t.isNewCreate()==true)
.collect(Collectors.toCollection(CopyOnWriteArrayList::new));
for (Entry op : allOperations) {
GlobalOperationInfo info = new GlobalOperationInfo();
......@@ -168,7 +175,7 @@ public class GeneticDecoder {
Initialization initialization=new Initialization();
initialization.generateInitialSFPopulation(chromosome,globalOpList);
chromosome.getGlobalOpList().addAll(globalOpList);
return 1;
}
private void CreateNewOpSequence(Chromosome chromosome)
......@@ -275,10 +282,12 @@ if(finishedOrder==null||finishedOrder.size()==0)
List<OrderMaterialRequirement> orderMaterials = materialRequirementService.buildMultiLevelRequirementNetwork(chromosome, sceneId, baseTime,_globalParam);
if(orderMaterials!=null&&orderMaterials.size()>0&&_globalParam.isIsCheckSf()) {
generateGlobalOpList(chromosome);
if(_globalParam.isIsCheckSf()) {
int isnew= generateGlobalOpList(chromosome);
CreateNewOpSequence(chromosome);
if(isnew==1) {
CreateNewOpSequence(chromosome);
}
}
List<GlobalOperationInfo> globalOpList=chromosome.getGlobalOpList();
......
......@@ -276,6 +276,8 @@ public class MaterialRequirementService {
.eq(Routingsupporting::getIsdeleted, 0);
routingsupportings1 = routingsupportingMapper.selectList(routingsupportingwrapper);
if(routingsupportings1!=null&&routingsupportings1.size()>0)
{
routingsupportings.addAll(routingsupportings1);
List<String> routingsupportingids = routingsupportings1.stream()
......@@ -338,6 +340,7 @@ public class MaterialRequirementService {
}
}
}
}
}
if(routingIds1!=null)
{
......
......@@ -39,7 +39,7 @@ public class PlanResultServiceTest {
// TestSortService sortService=new TestSortService();
// sortService.test1();
// nsgaiiUtils.Test();
planResultService.execute2("EDDAFBAC0BD84375B7CF89BC85255082");
planResultService.execute2("18E5F8BE09B14EAE822651BFEF100900");
// planResultService.execute2("726D4C1A712B4B1393175BD44B775B66");
// planResultService.execute2("265F24B6DF3C40E4B17D193B0CC8AAF2");
// LocalDateTime t= LocalDateTime.of(2026, 02, 14, 1, 25, 52);
......
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