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
8e292cd5
Commit
8e292cd5
authored
Jun 22, 2026
by
Tong Li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
cb20ded9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
712 additions
and
231 deletions
+712
-231
GeneticDecoder.java
src/main/java/com/aps/service/Algorithm/GeneticDecoder.java
+11
-11
TabuSearch.java
src/main/java/com/aps/service/Algorithm/TabuSearch.java
+238
-52
VariableNeighborhoodSearch.java
...com/aps/service/Algorithm/VariableNeighborhoodSearch.java
+458
-164
PlanResultService.java
src/main/java/com/aps/service/plan/PlanResultService.java
+2
-3
PlanResultServiceTest.java
src/test/java/com/aps/demo/PlanResultServiceTest.java
+3
-1
No files found.
src/main/java/com/aps/service/Algorithm/GeneticDecoder.java
View file @
8e292cd5
...
...
@@ -788,7 +788,7 @@ public class GeneticDecoder {
Entry
currentOp
=
orderOps
.
get
(
scheduledCount
);
FileHelper
.
writeLogFile
(
"工序:"
+
currentOp
.
getId
());
//
FileHelper.writeLogFile("工序:"+currentOp.getId());
int
opSequence
=
currentOp
.
getSequence
();
...
...
@@ -863,8 +863,8 @@ FileHelper.writeLogFile("工序:"+currentOp.getId());
orderProcessCounter
.
put
(
groupId
,
orderProcessCounter
.
get
(
groupId
)
+
1
);
orderLastEndTime
.
put
(
groupId
,
actualEndTime
);
if
(
false
){
//
if (isJit&& orderProcessCounter.get(groupId) >= entrysBygroupId.get(groupId).size()) {
if
(
isJit
&&
orderProcessCounter
.
get
(
groupId
)
>=
entrysBygroupId
.
get
(
groupId
).
size
())
{
List
<
Entry
>
orderOpsBySeq
=
entrysBygroupId
.
get
(
groupId
).
stream
()
.
sorted
(
Comparator
.
comparingInt
(
Entry:
:
getSequence
))
...
...
@@ -1504,10 +1504,10 @@ FileHelper.writeLogFile("工序:"+currentOp.getId());
Entry
op
=
entryIndexById
.
get
(
result
.
getOperationId
());
//
Map<String, MaterialDeduction> deductions = readOperationStockDeductions(op);
//
if (deductions != null && !deductions.isEmpty()) {
//
rollbackOperationStockDeduction(chromosome, deductions);
//
}
Map
<
String
,
MaterialDeduction
>
deductions
=
readOperationStockDeductions
(
op
);
if
(
deductions
!=
null
&&
!
deductions
.
isEmpty
())
{
rollbackOperationStockDeduction
(
chromosome
,
deductions
);
}
}
machineTasksCache
.
clear
();
...
...
@@ -1541,10 +1541,10 @@ FileHelper.writeLogFile("工序:"+currentOp.getId());
Entry
op
=
entryIndexById
.
get
(
result
.
getOperationId
());
//
Map<String, MaterialDeduction> deductions = readOperationStockDeductions(op);
//
if (deductions != null && !deductions.isEmpty()) {
//
rollbackOperationStockDeduction(chromosome, deductions);
//
}
Map
<
String
,
MaterialDeduction
>
deductions
=
readOperationStockDeductions
(
op
);
if
(
deductions
!=
null
&&
!
deductions
.
isEmpty
())
{
rollbackOperationStockDeduction
(
chromosome
,
deductions
);
}
Machine
machine
=
getMachineById
(
chromosome
,
result
.
getMachineId
());
if
(
machine
!=
null
)
{
AddMachineAvailable
(
machine
,
result
.
getGeneDetails
());
...
...
src/main/java/com/aps/service/Algorithm/TabuSearch.java
View file @
8e292cd5
This diff is collapsed.
Click to expand it.
src/main/java/com/aps/service/Algorithm/VariableNeighborhoodSearch.java
View file @
8e292cd5
This diff is collapsed.
Click to expand it.
src/main/java/com/aps/service/plan/PlanResultService.java
View file @
8e292cd5
...
...
@@ -297,8 +297,7 @@ public class PlanResultService {
if
(!
saved
)
{
throw
new
BusinessException
(
"排产计算结果保存失败,请稍后重试或联系管理员"
);
}
WriteScheduleSummary
(
chromosome
);
//WriteScheduleSummary(chromosome);
return
chromosome
;
...
...
@@ -2062,7 +2061,7 @@ public class PlanResultService {
public
void
WriteScheduleSummary
(
Chromosome
schedule
)
{
WriteOperationIntegrityLog
(
schedule
);
//
WriteOperationIntegrityLog(schedule);
// 写入日志
FileHelper
.
writeLogFile
(
"\n=== Schedule Summary === "
);
FileHelper
.
writeLogFile
(
String
.
format
(
"ID: %s"
,
schedule
.
getID
()));
...
...
src/test/java/com/aps/demo/PlanResultServiceTest.java
View file @
8e292cd5
...
...
@@ -43,7 +43,9 @@ public class PlanResultServiceTest {
// planResultService.execute2("64E64F6B68094AF38CEDC418630C3CC2");//2000
// planResultService.execute2("E1448B3C9C8743DEAB39708F2CFE348A");//倒排bomces
planResultService
.
execute2
(
"197083D0D26A449EB179AC103C753FD3"
);
// planResultService.execute2("197083D0D26A449EB179AC103C753FD3");
planResultService
.
execute2
(
"F8F147BD627C47B1A190399DD7A697F6"
);
// planResultService.execute2("9FEDFD92BB6A4675BF9B1CC64505D1AB");
// planResultService.execute2("15210B13B88A453F8B84AAC7F16C7541");//2000
...
...
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