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
3fd32773
Commit
3fd32773
authored
Dec 30, 2025
by
Tong Li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
遗传算法-初始话日历
parent
51143610
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
66602 deletions
+13
-66602
schedule_log.txt
schedule_log.txt
+0
-66591
GAScheduleResult.java
src/main/java/com/aps/entity/Algorithm/GAScheduleResult.java
+1
-1
GeneticDecoder.java
src/main/java/com/aps/service/Algorithm/GeneticDecoder.java
+4
-2
MachineSchedulerService.java
...in/java/com/aps/service/plan/MachineSchedulerService.java
+1
-4
PlanResultService.java
src/main/java/com/aps/service/plan/PlanResultService.java
+6
-3
PlanResultServiceTest.java
src/test/java/com/aps/demo/PlanResultServiceTest.java
+1
-1
No files found.
schedule_log.txt
deleted
100644 → 0
View file @
51143610
This diff is collapsed.
Click to expand it.
src/main/java/com/aps/entity/Algorithm/GAScheduleResult.java
View file @
3fd32773
...
...
@@ -32,7 +32,7 @@ public class GAScheduleResult {
private
double
OneTime
;
// 单件工时
private
double
ProcessingTime
;
// 绝对处理时间(分钟)
private
int
ChangeoverTime
;
private
int
preTime
;
private
int
seq
;
//工序顺序
public
int
getFlowTime
()
{
...
...
src/main/java/com/aps/service/Algorithm/GeneticDecoder.java
View file @
3fd32773
...
...
@@ -371,7 +371,7 @@ if(finishedOrder==null||finishedOrder.size()==0)
int
preTime
=
machineOption
.
getPreTime
();
int
setupTime
=
calculateSetupTime
(
chromosome
.
getResult
(),
operation
,
machine
,
machineOption
);
FileHelper
.
writeLogFile
(
" 处理时间: "
+
processingTime
+
", 后处理: "
+
teardownTime
+
FileHelper
.
writeLogFile
(
"
"
+
operation
.
getGroupId
()+
" : "
+
operation
.
getId
()+
",
处理时间: "
+
processingTime
+
", 后处理: "
+
teardownTime
+
", 前处理: "
+
preTime
+
", 换型: "
+
setupTime
+
", 数量: "
+
operation
.
getQuantity
());
...
...
@@ -500,13 +500,15 @@ if(finishedOrder==null||finishedOrder.size()==0)
result
.
setEndTime
(
endTime
);
result
.
setOneTime
(
processingTime
);
result
.
setQuantity
(
operation
.
getQuantity
());
result
.
setChangeoverTime
(
setupTime
);
result
.
setPreTime
(
preTime
);
result
.
setTeardownTime
(
teardownTime
);
if
(
existingResult
!=
null
)
{
result
.
setDesignatedStartTime
(
existingResult
.
getDesignatedStartTime
());
}
result
.
setOneTime
(
processingTime
);
result
.
setProcessingTime
(
processingTimeTotal
);
result
.
setGeneDetails
(
geneDetails
);
chromosome
.
getResult
().
add
(
result
);
...
...
src/main/java/com/aps/service/plan/MachineSchedulerService.java
View file @
3fd32773
...
...
@@ -59,10 +59,7 @@ public class MachineSchedulerService {
LocalDate
endDate
=
currentTime
.
plusDays
(
60
).
toLocalDate
();
List
<
TimeSegment
>
allSegments
=
new
ArrayList
<>();
if
(
machine
.
getName
().
contains
(
"铲车"
))
{
int
i
=
1
+
2
;
}
while
(!
currentDate
.
isAfter
(
endDate
))
{
// 检查是否在假期内
boolean
isHolidayPeriod
=
isHoliday
(
machine
,
currentDate
);
...
...
src/main/java/com/aps/service/plan/PlanResultService.java
View file @
3fd32773
...
...
@@ -350,7 +350,7 @@ order.setDueDate(LocalDateTime.of(2025, 12, 1,0,0,0));
kpiCalculator
.
calculatekpi
();
_sceneService
.
saveChromosomeToFile
(
chromosome
,
SceneId
);
// Chromosomes.forEach(this::WriteScheduleSummary
);
WriteScheduleSummary
(
chromosome
);
return
chromosome
;
...
...
@@ -683,7 +683,7 @@ order.setDueDate(LocalDateTime.of(2025, 12, 1,0,0,0));
for
(
GAScheduleResult
job
:
sortedJobs
)
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
String
.
format
(
"[%d-%d]:[%s-%s] Order %d, Machine %d, Operation %d, Batch %.1f, processingTime %
%.1f
"
,
"[%d-%d]:[%s-%s] Order %d, Machine %d, Operation %d, Batch %.1f, processingTime %
.1f, 后处理 %d, 后处理 %d, 离散参数 %d
"
,
job
.
getStartTime
(),
job
.
getEndTime
(),
ConvertTime
(
job
.
getStartTime
()),
...
...
@@ -693,7 +693,10 @@ order.setDueDate(LocalDateTime.of(2025, 12, 1,0,0,0));
job
.
getMachineId
(),
job
.
getOperationId
(),
job
.
getQuantity
(),
job
.
getProcessingTime
()
job
.
getProcessingTime
(),
job
.
getPreTime
(),
job
.
getTeardownTime
(),
job
.
getChangeoverTime
()
));
// 追加基因详情
...
...
src/test/java/com/aps/demo/PlanResultServiceTest.java
View file @
3fd32773
...
...
@@ -30,7 +30,7 @@ public class PlanResultServiceTest {
// RangeSubtractUtil.test();
// planResultService.testSceneChromsome("qwerty");
// Chromosome chromosome= planResultService.moveChromosome("qwerty",3);
planResultService
.
execute2
(
"
8835EF6E1C8A491D99B16DE59160ED64
"
);
planResultService
.
execute2
(
"
AA51A501E316468181296A664CF8B238
"
);
// planResultService.execute2("BE037838EF074B07B87D7DE763107398");
// planResultService.execute2("31EC5BAF7F6B41DFB79AB031D81C53C0");
// LocalDateTime t= LocalDateTime.of(2025, 11, 15, 6, 51, 11);
...
...
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