Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
HYH.APSJ
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
佟礼
HYH.APSJ
Commits
250695e0
Commit
250695e0
authored
Feb 03, 2026
by
Tong Li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bom
parent
d5dfcb6f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
10 deletions
+22
-10
GeneticDecoder.java
src/main/java/com/aps/service/Algorithm/GeneticDecoder.java
+18
-9
MaterialRequirementService.java
...com/aps/service/Algorithm/MaterialRequirementService.java
+3
-0
PlanResultServiceTest.java
src/test/java/com/aps/demo/PlanResultServiceTest.java
+1
-1
No files found.
src/main/java/com/aps/service/Algorithm/GeneticDecoder.java
View file @
250695e0
...
@@ -144,17 +144,24 @@ public class GeneticDecoder {
...
@@ -144,17 +144,24 @@ public class GeneticDecoder {
return
chromosome
;
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
<>();
List
<
GlobalOperationInfo
>
globalOpList
=
new
ArrayList
<>();
int
globalOpId
=
chromosome
.
getGlobalOpList
()
int
globalOpId
=
chromosome
.
getGlobalOpList
()
.
stream
()
.
stream
()
.
mapToInt
(
GlobalOperationInfo:
:
getGlobalOpId
)
.
mapToInt
(
GlobalOperationInfo:
:
getGlobalOpId
)
.
max
().
orElse
(
0
)+
1
;
.
max
().
orElse
(
0
)+
1
;
CopyOnWriteArrayList
<
Entry
>
allOperations
=
chromosome
.
getAllOperations
()
.
stream
()
.
filter
(
t
->
t
.
isNewCreate
()==
true
)
.
collect
(
Collectors
.
toCollection
(
CopyOnWriteArrayList:
:
new
));
for
(
Entry
op
:
allOperations
)
{
for
(
Entry
op
:
allOperations
)
{
GlobalOperationInfo
info
=
new
GlobalOperationInfo
();
GlobalOperationInfo
info
=
new
GlobalOperationInfo
();
...
@@ -168,7 +175,7 @@ public class GeneticDecoder {
...
@@ -168,7 +175,7 @@ public class GeneticDecoder {
Initialization
initialization
=
new
Initialization
();
Initialization
initialization
=
new
Initialization
();
initialization
.
generateInitialSFPopulation
(
chromosome
,
globalOpList
);
initialization
.
generateInitialSFPopulation
(
chromosome
,
globalOpList
);
chromosome
.
getGlobalOpList
().
addAll
(
globalOpList
);
chromosome
.
getGlobalOpList
().
addAll
(
globalOpList
);
return
1
;
}
}
private
void
CreateNewOpSequence
(
Chromosome
chromosome
)
private
void
CreateNewOpSequence
(
Chromosome
chromosome
)
...
@@ -275,10 +282,12 @@ if(finishedOrder==null||finishedOrder.size()==0)
...
@@ -275,10 +282,12 @@ if(finishedOrder==null||finishedOrder.size()==0)
List
<
OrderMaterialRequirement
>
orderMaterials
=
materialRequirementService
.
buildMultiLevelRequirementNetwork
(
chromosome
,
sceneId
,
baseTime
,
_globalParam
);
List
<
OrderMaterialRequirement
>
orderMaterials
=
materialRequirementService
.
buildMultiLevelRequirementNetwork
(
chromosome
,
sceneId
,
baseTime
,
_globalParam
);
if
(
orderMaterials
!=
null
&&
orderMaterials
.
size
()>
0
&&
_globalParam
.
isIsCheckSf
())
{
if
(
_globalParam
.
isIsCheckSf
())
{
generateGlobalOpList
(
chromosome
);
int
isnew
=
generateGlobalOpList
(
chromosome
);
CreateNewOpSequence
(
chromosome
);
if
(
isnew
==
1
)
{
CreateNewOpSequence
(
chromosome
);
}
}
}
List
<
GlobalOperationInfo
>
globalOpList
=
chromosome
.
getGlobalOpList
();
List
<
GlobalOperationInfo
>
globalOpList
=
chromosome
.
getGlobalOpList
();
...
...
src/main/java/com/aps/service/Algorithm/MaterialRequirementService.java
View file @
250695e0
...
@@ -276,6 +276,8 @@ public class MaterialRequirementService {
...
@@ -276,6 +276,8 @@ public class MaterialRequirementService {
.
eq
(
Routingsupporting:
:
getIsdeleted
,
0
);
.
eq
(
Routingsupporting:
:
getIsdeleted
,
0
);
routingsupportings1
=
routingsupportingMapper
.
selectList
(
routingsupportingwrapper
);
routingsupportings1
=
routingsupportingMapper
.
selectList
(
routingsupportingwrapper
);
if
(
routingsupportings1
!=
null
&&
routingsupportings1
.
size
()>
0
)
{
routingsupportings
.
addAll
(
routingsupportings1
);
routingsupportings
.
addAll
(
routingsupportings1
);
List
<
String
>
routingsupportingids
=
routingsupportings1
.
stream
()
List
<
String
>
routingsupportingids
=
routingsupportings1
.
stream
()
...
@@ -338,6 +340,7 @@ public class MaterialRequirementService {
...
@@ -338,6 +340,7 @@ public class MaterialRequirementService {
}
}
}
}
}
}
}
}
}
if
(
routingIds1
!=
null
)
if
(
routingIds1
!=
null
)
{
{
...
...
src/test/java/com/aps/demo/PlanResultServiceTest.java
View file @
250695e0
...
@@ -39,7 +39,7 @@ public class PlanResultServiceTest {
...
@@ -39,7 +39,7 @@ public class PlanResultServiceTest {
// TestSortService sortService=new TestSortService();
// TestSortService sortService=new TestSortService();
// sortService.test1();
// sortService.test1();
// nsgaiiUtils.Test();
// nsgaiiUtils.Test();
planResultService
.
execute2
(
"
EDDAFBAC0BD84375B7CF89BC85255082
"
);
planResultService
.
execute2
(
"
18E5F8BE09B14EAE822651BFEF100900
"
);
// planResultService.execute2("726D4C1A712B4B1393175BD44B775B66");
// planResultService.execute2("726D4C1A712B4B1393175BD44B775B66");
// planResultService.execute2("265F24B6DF3C40E4B17D193B0CC8AAF2");
// planResultService.execute2("265F24B6DF3C40E4B17D193B0CC8AAF2");
// LocalDateTime t= LocalDateTime.of(2026, 02, 14, 1, 25, 52);
// LocalDateTime t= LocalDateTime.of(2026, 02, 14, 1, 25, 52);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment