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
b17004da
Commit
b17004da
authored
Apr 23, 2026
by
Tong Li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
半成品
parent
6086d002
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
5 deletions
+24
-5
GeneticDecoder.java
src/main/java/com/aps/service/Algorithm/GeneticDecoder.java
+12
-5
GeneticOperations.java
...ain/java/com/aps/service/Algorithm/GeneticOperations.java
+12
-0
No files found.
src/main/java/com/aps/service/Algorithm/GeneticDecoder.java
View file @
b17004da
...
@@ -1956,6 +1956,8 @@ public class GeneticDecoder {
...
@@ -1956,6 +1956,8 @@ public class GeneticDecoder {
.
sorted
(
Comparator
.
comparing
(
Entry:
:
getSequence
))
.
sorted
(
Comparator
.
comparing
(
Entry:
:
getSequence
))
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
List
<
GlobalOperationInfo
>
entrys
=
chromosome
.
getGlobalOpList
().
stream
().
filter
(
t
->
t
.
getOp
().
getGroupId
()==
groupId
).
collect
(
Collectors
.
toList
());
for
(
Entry
currentOp
:
orderOps
)
{
for
(
Entry
currentOp
:
orderOps
)
{
...
@@ -1966,15 +1968,20 @@ public class GeneticDecoder {
...
@@ -1966,15 +1968,20 @@ public class GeneticDecoder {
GlobalOperationInfo
global
=
entrys
.
stream
().
filter
(
t
->
t
.
getOp
().
getId
()==
currentOp
.
getId
())
.
findFirst
().
orElse
(
null
);
int
globalOpId
=
global
.
getGlobalOpId
();
int
machineSeq
=
chromosome
.
getMachineSelection
().
get
(
globalOpId
);
MachineOption
machineOption
=
currentOp
.
getMachineOptions
().
get
(
machineSeq
-
1
);
Long
machineId
=
machineOption
.
getMachineId
();
Long
machineId
=
currentOp
.
getSelectMachineID
();
// MachineOption machineOption= currentOp.getMachineOptions().stream()
// .filter(t->t.getMachineId().equals(machineId)).findFirst().orElse(null);
MachineOption
machineOption
=
currentOp
.
getMachineOptions
().
stream
()
.
filter
(
t
->
t
.
getMachineId
().
equals
(
machineId
)).
findFirst
().
orElse
(
null
);
double
processTime
=
machineOption
.
getProcessingTime
();
double
processTime
=
machineOption
.
getProcessingTime
();
OpMachine
opMachine
=
new
OpMachine
();
OpMachine
opMachine
=
new
OpMachine
();
opMachine
.
setGroupId
(
groupId
);
opMachine
.
setGroupId
(
groupId
);
...
...
src/main/java/com/aps/service/Algorithm/GeneticOperations.java
View file @
b17004da
package
com
.
aps
.
service
.
Algorithm
;
package
com
.
aps
.
service
.
Algorithm
;
import
com.aps.common.util.FileHelper
;
import
com.aps.common.util.ProductionDeepCopyUtil
;
import
com.aps.common.util.ProductionDeepCopyUtil
;
import
com.aps.entity.Algorithm.*
;
import
com.aps.entity.Algorithm.*
;
import
com.aps.entity.basic.Entry
;
import
com.aps.entity.basic.Entry
;
...
@@ -600,6 +601,12 @@ public class GeneticOperations {
...
@@ -600,6 +601,12 @@ public class GeneticOperations {
return
;
return
;
List
<
Order
>
orders
=
chromosome
.
getOrders
();
List
<
Order
>
orders
=
chromosome
.
getOrders
();
List
<
Integer
>
OperationSequencing
=
chromosome
.
getOperationSequencing
();
List
<
Integer
>
OperationSequencing
=
chromosome
.
getOperationSequencing
();
log
(
"删除前"
+
OperationSequencing
.
size
(),
true
);
log
(
String
.
format
(
"半成品订单-删除前,工序: %d,工序序列: %d,设备: %d,设备序列: %d"
,
allOperations
.
size
(),
OperationSequencing
.
size
(),
globalOpList
.
size
(),
chromosome
.
getMachineSelection
().
size
()),
true
);
List
<
Integer
>
newoorderids
=
orders
.
stream
()
List
<
Integer
>
newoorderids
=
orders
.
stream
()
.
filter
(
t
->
t
.
isNewSfCreate
())
.
filter
(
t
->
t
.
isNewSfCreate
())
.
map
(
Order:
:
getId
)
.
map
(
Order:
:
getId
)
...
@@ -637,6 +644,11 @@ public class GeneticOperations {
...
@@ -637,6 +644,11 @@ public class GeneticOperations {
orders
.
removeIf
(
t
->
newoorderids
.
contains
(
t
.
getId
()));
orders
.
removeIf
(
t
->
newoorderids
.
contains
(
t
.
getId
()));
}
}
}
}
private
void
log
(
String
message
,
boolean
enableLogging
)
{
if
(
enableLogging
)
{
FileHelper
.
writeLogFile
(
message
);
}
}
}
}
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