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
fc778193
Commit
fc778193
authored
Dec 19, 2025
by
Tong Li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
遗传算法-移动多工单,删除订单
parent
bb843694
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
599 additions
and
66623 deletions
+599
-66623
chromosome_result_B571EF6682DB463AB2977B1055A74112.json
...t/chromosome_result_B571EF6682DB463AB2977B1055A74112.json
+407
-271
schedule_log.txt
schedule_log.txt
+78
-66299
ParamValidator.java
src/main/java/com/aps/common/util/ParamValidator.java
+22
-0
ResourceGanttController.java
...ava/com/aps/controller/gantt/ResourceGanttController.java
+4
-2
GeneticAlgorithm.java
...main/java/com/aps/service/Algorithm/GeneticAlgorithm.java
+2
-3
GeneticDecoder.java
src/main/java/com/aps/service/Algorithm/GeneticDecoder.java
+1
-1
GeneticOperations.java
...ain/java/com/aps/service/Algorithm/GeneticOperations.java
+2
-0
Initialization.java
src/main/java/com/aps/service/Algorithm/Initialization.java
+7
-6
KpiCalculator.java
src/main/java/com/aps/service/Algorithm/KpiCalculator.java
+2
-1
ScheduleOperationService.java
...a/com/aps/service/Algorithm/ScheduleOperationService.java
+63
-35
PlanResultService.java
src/main/java/com/aps/service/plan/PlanResultService.java
+4
-3
PlanResultServiceTest.java
src/test/java/com/aps/demo/PlanResultServiceTest.java
+7
-2
No files found.
result/chromosome_result_B571EF6682DB463AB2977B1055A74112.json
View file @
fc778193
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
"Id"
:
1
,
"Id"
:
1
,
"GroupId"
:
1
,
"GroupId"
:
1
,
"OrderId"
:
"fcc0892a-0483-4da7-8414-9ce98be36e53"
,
"OrderId"
:
"fcc0892a-0483-4da7-8414-9ce98be36e53"
,
"SceneId"
:
null
,
"routingId"
:
null
,
"routingId"
:
null
,
"routingDetailId"
:
555853
,
"routingDetailId"
:
555853
,
"taskSeq"
:
10
,
"taskSeq"
:
10
,
...
@@ -83,7 +84,40 @@
...
@@ -83,7 +84,40 @@
"LatestCompletionTime"
:
null
,
"LatestCompletionTime"
:
null
,
"priority"
:
1.0
,
"priority"
:
1.0
,
"id"
:
1
,
"id"
:
1
,
"latestCompletionTime"
:
null
,
"materialRequirements"
:
null
,
"dependentOnOrderIds"
:
[
],
"targetFinishedOperationId"
:
0
,
"selectMachineID"
:
3403
,
"nextEntryIds"
:
[
{
"prevOperationId"
:
0
,
"nextOperationId"
:
2
,
"dependencyType"
:
"FinishToStart"
,
"id"
:
0
}
],
"isInterrupt"
:
true
,
"mainId"
:
null
,
"groupId"
:
1
,
"groupId"
:
1
,
"machineOptions"
:
[
{
"machineId"
:
3403
,
"processingTime"
:
0.72
,
"setupTime"
:
0
,
"teardownTime"
:
0
,
"contantTime"
:
1
,
"preTime"
:
0
},
{
"machineId"
:
3402
,
"processingTime"
:
0.72
,
"setupTime"
:
0
,
"teardownTime"
:
0
,
"contantTime"
:
1
,
"preTime"
:
0
}
],
"sceneId"
:
null
,
"quantity"
:
50000.0
,
"sequence"
:
1
,
"prevEntryIds"
:
[
],
"orderId"
:
"fcc0892a-0483-4da7-8414-9ce98be36e53"
,
"discreteParameter"
:
[
{
"discreteParameter"
:
[
{
"id"
:
14
,
"id"
:
14
,
"creationTime"
:
"2025-12-03T14:03:46"
,
"creationTime"
:
"2025-12-03T14:03:46"
,
...
@@ -119,40 +153,8 @@
...
@@ -119,40 +153,8 @@
"parameterId"
:
"87fd2237-7c4e-402e-8bde-85a0268bdbe1"
,
"parameterId"
:
"87fd2237-7c4e-402e-8bde-85a0268bdbe1"
,
"parameterName"
:
"ces133"
"parameterName"
:
"ces133"
}
],
}
],
"materialRequirements"
:
null
,
"dependentOnOrderIds"
:
[
],
"orderId"
:
"fcc0892a-0483-4da7-8414-9ce98be36e53"
,
"quantity"
:
50000.0
,
"execId"
:
"65ffe1c733cc4a888ca3dcc28a7ab65a"
,
"execId"
:
"65ffe1c733cc4a888ca3dcc28a7ab65a"
,
"sequence"
:
1
,
"equipTypeID"
:
1661
"equipTypeID"
:
1661
,
"prevEntryIds"
:
[
],
"nextEntryIds"
:
[
{
"prevOperationId"
:
0
,
"nextOperationId"
:
2
,
"dependencyType"
:
"FinishToStart"
,
"id"
:
0
}
],
"machineOptions"
:
[
{
"machineId"
:
3403
,
"processingTime"
:
0.72
,
"setupTime"
:
0
,
"teardownTime"
:
0
,
"contantTime"
:
1
,
"preTime"
:
0
},
{
"machineId"
:
3402
,
"processingTime"
:
0.72
,
"setupTime"
:
0
,
"teardownTime"
:
0
,
"contantTime"
:
1
,
"preTime"
:
0
}
],
"selectMachineID"
:
3403
,
"latestCompletionTime"
:
null
,
"targetFinishedOperationId"
:
0
,
"isInterrupt"
:
true
,
"mainId"
:
null
},
},
"globalOpId"
:
0
"globalOpId"
:
0
},
{
},
{
...
@@ -162,6 +164,7 @@
...
@@ -162,6 +164,7 @@
"Id"
:
2
,
"Id"
:
2
,
"GroupId"
:
1
,
"GroupId"
:
1
,
"OrderId"
:
"fcc0892a-0483-4da7-8414-9ce98be36e53"
,
"OrderId"
:
"fcc0892a-0483-4da7-8414-9ce98be36e53"
,
"SceneId"
:
null
,
"routingId"
:
null
,
"routingId"
:
null
,
"routingDetailId"
:
555854
,
"routingDetailId"
:
555854
,
"taskSeq"
:
10
,
"taskSeq"
:
10
,
...
@@ -205,22 +208,15 @@
...
@@ -205,22 +208,15 @@
"LatestCompletionTime"
:
null
,
"LatestCompletionTime"
:
null
,
"priority"
:
1.0
,
"priority"
:
1.0
,
"id"
:
2
,
"id"
:
2
,
"groupId"
:
1
,
"latestCompletionTime"
:
null
,
"discreteParameter"
:
[
],
"materialRequirements"
:
null
,
"materialRequirements"
:
null
,
"dependentOnOrderIds"
:
[
],
"dependentOnOrderIds"
:
[
],
"orderId"
:
"fcc0892a-0483-4da7-8414-9ce98be36e53"
,
"targetFinishedOperationId"
:
0
,
"quantity"
:
50000.0
,
"selectMachineID"
:
3243
,
"execId"
:
"36200a5d39aa43eb956824baa3d7961c"
,
"sequence"
:
2
,
"equipTypeID"
:
1621
,
"prevEntryIds"
:
[
{
"prevOperationId"
:
1
,
"nextOperationId"
:
0
,
"dependencyType"
:
"FinishToStart"
,
"id"
:
0
}
],
"nextEntryIds"
:
[
],
"nextEntryIds"
:
[
],
"isInterrupt"
:
true
,
"mainId"
:
null
,
"groupId"
:
1
,
"machineOptions"
:
[
{
"machineOptions"
:
[
{
"machineId"
:
3243
,
"machineId"
:
3243
,
"processingTime"
:
1.2
,
"processingTime"
:
1.2
,
...
@@ -236,11 +232,19 @@
...
@@ -236,11 +232,19 @@
"contantTime"
:
1
,
"contantTime"
:
1
,
"preTime"
:
0
"preTime"
:
0
}
],
}
],
"selectMachineID"
:
3243
,
"sceneId"
:
null
,
"latestCompletionTime"
:
null
,
"quantity"
:
50000.0
,
"targetFinishedOperationId"
:
0
,
"sequence"
:
2
,
"isInterrupt"
:
true
,
"prevEntryIds"
:
[
{
"mainId"
:
null
"prevOperationId"
:
1
,
"nextOperationId"
:
0
,
"dependencyType"
:
"FinishToStart"
,
"id"
:
0
}
],
"orderId"
:
"fcc0892a-0483-4da7-8414-9ce98be36e53"
,
"discreteParameter"
:
[
],
"execId"
:
"36200a5d39aa43eb956824baa3d7961c"
,
"equipTypeID"
:
1621
},
},
"globalOpId"
:
1
"globalOpId"
:
1
},
{
},
{
...
@@ -250,6 +254,7 @@
...
@@ -250,6 +254,7 @@
"Id"
:
3
,
"Id"
:
3
,
"GroupId"
:
2
,
"GroupId"
:
2
,
"OrderId"
:
"14a5bbda-bcf6-41d1-a342-bb07c2d41b4f"
,
"OrderId"
:
"14a5bbda-bcf6-41d1-a342-bb07c2d41b4f"
,
"SceneId"
:
null
,
"routingId"
:
null
,
"routingId"
:
null
,
"routingDetailId"
:
527109
,
"routingDetailId"
:
527109
,
"taskSeq"
:
10
,
"taskSeq"
:
10
,
...
@@ -281,17 +286,15 @@
...
@@ -281,17 +286,15 @@
"LatestCompletionTime"
:
null
,
"LatestCompletionTime"
:
null
,
"priority"
:
1.0
,
"priority"
:
1.0
,
"id"
:
3
,
"id"
:
3
,
"groupId"
:
2
,
"latestCompletionTime"
:
null
,
"discreteParameter"
:
[
],
"materialRequirements"
:
null
,
"materialRequirements"
:
null
,
"dependentOnOrderIds"
:
[
],
"dependentOnOrderIds"
:
[
],
"orderId"
:
"14a5bbda-bcf6-41d1-a342-bb07c2d41b4f"
,
"targetFinishedOperationId"
:
0
,
"quantity"
:
20.0
,
"selectMachineID"
:
2183
,
"execId"
:
"3dbe438ec2714f3d830bb186df914370"
,
"sequence"
:
1
,
"equipTypeID"
:
746
,
"prevEntryIds"
:
[
],
"nextEntryIds"
:
[
],
"nextEntryIds"
:
[
],
"isInterrupt"
:
true
,
"mainId"
:
null
,
"groupId"
:
2
,
"machineOptions"
:
[
{
"machineOptions"
:
[
{
"machineId"
:
2183
,
"machineId"
:
2183
,
"processingTime"
:
3600.0
,
"processingTime"
:
3600.0
,
...
@@ -300,11 +303,14 @@
...
@@ -300,11 +303,14 @@
"contantTime"
:
0
,
"contantTime"
:
0
,
"preTime"
:
0
"preTime"
:
0
}
],
}
],
"selectMachineID"
:
2183
,
"sceneId"
:
null
,
"latestCompletionTime"
:
null
,
"quantity"
:
20.0
,
"targetFinishedOperationId"
:
0
,
"sequence"
:
1
,
"isInterrupt"
:
true
,
"prevEntryIds"
:
[
],
"mainId"
:
null
"orderId"
:
"14a5bbda-bcf6-41d1-a342-bb07c2d41b4f"
,
"discreteParameter"
:
[
],
"execId"
:
"3dbe438ec2714f3d830bb186df914370"
,
"equipTypeID"
:
746
},
},
"globalOpId"
:
2
"globalOpId"
:
2
}
],
}
],
...
@@ -312,6 +318,7 @@
...
@@ -312,6 +318,7 @@
"Id"
:
1
,
"Id"
:
1
,
"GroupId"
:
1
,
"GroupId"
:
1
,
"OrderId"
:
"fcc0892a-0483-4da7-8414-9ce98be36e53"
,
"OrderId"
:
"fcc0892a-0483-4da7-8414-9ce98be36e53"
,
"SceneId"
:
null
,
"routingId"
:
null
,
"routingId"
:
null
,
"routingDetailId"
:
555853
,
"routingDetailId"
:
555853
,
"taskSeq"
:
10
,
"taskSeq"
:
10
,
...
@@ -389,7 +396,40 @@
...
@@ -389,7 +396,40 @@
"LatestCompletionTime"
:
null
,
"LatestCompletionTime"
:
null
,
"priority"
:
1.0
,
"priority"
:
1.0
,
"id"
:
1
,
"id"
:
1
,
"latestCompletionTime"
:
null
,
"materialRequirements"
:
null
,
"dependentOnOrderIds"
:
[
],
"targetFinishedOperationId"
:
0
,
"selectMachineID"
:
3403
,
"nextEntryIds"
:
[
{
"prevOperationId"
:
0
,
"nextOperationId"
:
2
,
"dependencyType"
:
"FinishToStart"
,
"id"
:
0
}
],
"isInterrupt"
:
true
,
"mainId"
:
null
,
"groupId"
:
1
,
"groupId"
:
1
,
"machineOptions"
:
[
{
"machineId"
:
3403
,
"processingTime"
:
0.72
,
"setupTime"
:
0
,
"teardownTime"
:
0
,
"contantTime"
:
1
,
"preTime"
:
0
},
{
"machineId"
:
3402
,
"processingTime"
:
0.72
,
"setupTime"
:
0
,
"teardownTime"
:
0
,
"contantTime"
:
1
,
"preTime"
:
0
}
],
"sceneId"
:
null
,
"quantity"
:
50000.0
,
"sequence"
:
1
,
"prevEntryIds"
:
[
],
"orderId"
:
"fcc0892a-0483-4da7-8414-9ce98be36e53"
,
"discreteParameter"
:
[
{
"discreteParameter"
:
[
{
"id"
:
14
,
"id"
:
14
,
"creationTime"
:
"2025-12-03T14:03:46"
,
"creationTime"
:
"2025-12-03T14:03:46"
,
...
@@ -425,44 +465,13 @@
...
@@ -425,44 +465,13 @@
"parameterId"
:
"87fd2237-7c4e-402e-8bde-85a0268bdbe1"
,
"parameterId"
:
"87fd2237-7c4e-402e-8bde-85a0268bdbe1"
,
"parameterName"
:
"ces133"
"parameterName"
:
"ces133"
}
],
}
],
"materialRequirements"
:
null
,
"dependentOnOrderIds"
:
[
],
"orderId"
:
"fcc0892a-0483-4da7-8414-9ce98be36e53"
,
"quantity"
:
50000.0
,
"execId"
:
"65ffe1c733cc4a888ca3dcc28a7ab65a"
,
"execId"
:
"65ffe1c733cc4a888ca3dcc28a7ab65a"
,
"sequence"
:
1
,
"equipTypeID"
:
1661
"equipTypeID"
:
1661
,
"prevEntryIds"
:
[
],
"nextEntryIds"
:
[
{
"prevOperationId"
:
0
,
"nextOperationId"
:
2
,
"dependencyType"
:
"FinishToStart"
,
"id"
:
0
}
],
"machineOptions"
:
[
{
"machineId"
:
3403
,
"processingTime"
:
0.72
,
"setupTime"
:
0
,
"teardownTime"
:
0
,
"contantTime"
:
1
,
"preTime"
:
0
},
{
"machineId"
:
3402
,
"processingTime"
:
0.72
,
"setupTime"
:
0
,
"teardownTime"
:
0
,
"contantTime"
:
1
,
"preTime"
:
0
}
],
"selectMachineID"
:
3403
,
"latestCompletionTime"
:
null
,
"targetFinishedOperationId"
:
0
,
"isInterrupt"
:
true
,
"mainId"
:
null
},
{
},
{
"Id"
:
2
,
"Id"
:
2
,
"GroupId"
:
1
,
"GroupId"
:
1
,
"OrderId"
:
"fcc0892a-0483-4da7-8414-9ce98be36e53"
,
"OrderId"
:
"fcc0892a-0483-4da7-8414-9ce98be36e53"
,
"SceneId"
:
null
,
"routingId"
:
null
,
"routingId"
:
null
,
"routingDetailId"
:
555854
,
"routingDetailId"
:
555854
,
"taskSeq"
:
10
,
"taskSeq"
:
10
,
...
@@ -506,22 +515,15 @@
...
@@ -506,22 +515,15 @@
"LatestCompletionTime"
:
null
,
"LatestCompletionTime"
:
null
,
"priority"
:
1.0
,
"priority"
:
1.0
,
"id"
:
2
,
"id"
:
2
,
"groupId"
:
1
,
"latestCompletionTime"
:
null
,
"discreteParameter"
:
[
],
"materialRequirements"
:
null
,
"materialRequirements"
:
null
,
"dependentOnOrderIds"
:
[
],
"dependentOnOrderIds"
:
[
],
"orderId"
:
"fcc0892a-0483-4da7-8414-9ce98be36e53"
,
"targetFinishedOperationId"
:
0
,
"quantity"
:
50000.0
,
"selectMachineID"
:
3243
,
"execId"
:
"36200a5d39aa43eb956824baa3d7961c"
,
"sequence"
:
2
,
"equipTypeID"
:
1621
,
"prevEntryIds"
:
[
{
"prevOperationId"
:
1
,
"nextOperationId"
:
0
,
"dependencyType"
:
"FinishToStart"
,
"id"
:
0
}
],
"nextEntryIds"
:
[
],
"nextEntryIds"
:
[
],
"isInterrupt"
:
true
,
"mainId"
:
null
,
"groupId"
:
1
,
"machineOptions"
:
[
{
"machineOptions"
:
[
{
"machineId"
:
3243
,
"machineId"
:
3243
,
"processingTime"
:
1.2
,
"processingTime"
:
1.2
,
...
@@ -537,15 +539,24 @@
...
@@ -537,15 +539,24 @@
"contantTime"
:
1
,
"contantTime"
:
1
,
"preTime"
:
0
"preTime"
:
0
}
],
}
],
"selectMachineID"
:
3243
,
"sceneId"
:
null
,
"latestCompletionTime"
:
null
,
"quantity"
:
50000.0
,
"targetFinishedOperationId"
:
0
,
"sequence"
:
2
,
"isInterrupt"
:
true
,
"prevEntryIds"
:
[
{
"mainId"
:
null
"prevOperationId"
:
1
,
"nextOperationId"
:
0
,
"dependencyType"
:
"FinishToStart"
,
"id"
:
0
}
],
"orderId"
:
"fcc0892a-0483-4da7-8414-9ce98be36e53"
,
"discreteParameter"
:
[
],
"execId"
:
"36200a5d39aa43eb956824baa3d7961c"
,
"equipTypeID"
:
1621
},
{
},
{
"Id"
:
3
,
"Id"
:
3
,
"GroupId"
:
2
,
"GroupId"
:
2
,
"OrderId"
:
"14a5bbda-bcf6-41d1-a342-bb07c2d41b4f"
,
"OrderId"
:
"14a5bbda-bcf6-41d1-a342-bb07c2d41b4f"
,
"SceneId"
:
null
,
"routingId"
:
null
,
"routingId"
:
null
,
"routingDetailId"
:
527109
,
"routingDetailId"
:
527109
,
"taskSeq"
:
10
,
"taskSeq"
:
10
,
...
@@ -577,17 +588,15 @@
...
@@ -577,17 +588,15 @@
"LatestCompletionTime"
:
null
,
"LatestCompletionTime"
:
null
,
"priority"
:
1.0
,
"priority"
:
1.0
,
"id"
:
3
,
"id"
:
3
,
"groupId"
:
2
,
"latestCompletionTime"
:
null
,
"discreteParameter"
:
[
],
"materialRequirements"
:
null
,
"materialRequirements"
:
null
,
"dependentOnOrderIds"
:
[
],
"dependentOnOrderIds"
:
[
],
"orderId"
:
"14a5bbda-bcf6-41d1-a342-bb07c2d41b4f"
,
"targetFinishedOperationId"
:
0
,
"quantity"
:
20.0
,
"selectMachineID"
:
2183
,
"execId"
:
"3dbe438ec2714f3d830bb186df914370"
,
"sequence"
:
1
,
"equipTypeID"
:
746
,
"prevEntryIds"
:
[
],
"nextEntryIds"
:
[
],
"nextEntryIds"
:
[
],
"isInterrupt"
:
true
,
"mainId"
:
null
,
"groupId"
:
2
,
"machineOptions"
:
[
{
"machineOptions"
:
[
{
"machineId"
:
2183
,
"machineId"
:
2183
,
"processingTime"
:
3600.0
,
"processingTime"
:
3600.0
,
...
@@ -596,11 +605,14 @@
...
@@ -596,11 +605,14 @@
"contantTime"
:
0
,
"contantTime"
:
0
,
"preTime"
:
0
"preTime"
:
0
}
],
}
],
"selectMachineID"
:
2183
,
"sceneId"
:
null
,
"latestCompletionTime"
:
null
,
"quantity"
:
20.0
,
"targetFinishedOperationId"
:
0
,
"sequence"
:
1
,
"isInterrupt"
:
true
,
"prevEntryIds"
:
[
],
"mainId"
:
null
"orderId"
:
"14a5bbda-bcf6-41d1-a342-bb07c2d41b4f"
,
"discreteParameter"
:
[
],
"execId"
:
"3dbe438ec2714f3d830bb186df914370"
,
"equipTypeID"
:
746
}
],
}
],
"orders"
:
[
{
"orders"
:
[
{
"id"
:
0
,
"id"
:
0
,
...
@@ -629,8 +641,8 @@
...
@@ -629,8 +641,8 @@
"FinishOrderId"
:
null
,
"FinishOrderId"
:
null
,
"delayHours"
:
0.0
,
"delayHours"
:
0.0
,
"orderId"
:
"14a5bbda-bcf6-41d1-a342-bb07c2d41b4f"
,
"orderId"
:
"14a5bbda-bcf6-41d1-a342-bb07c2d41b4f"
,
"
finishOrderId"
:
null
,
"
syquantity"
:
200000.0
,
"
syquantity"
:
200000.0
"
finishOrderId"
:
null
},
{
},
{
"id"
:
0
,
"id"
:
0
,
"orderCode"
:
"002"
,
"orderCode"
:
"002"
,
...
@@ -658,10 +670,11 @@
...
@@ -658,10 +670,11 @@
"FinishOrderId"
:
null
,
"FinishOrderId"
:
null
,
"delayHours"
:
0.0
,
"delayHours"
:
0.0
,
"orderId"
:
"fcc0892a-0483-4da7-8414-9ce98be36e53"
,
"orderId"
:
"fcc0892a-0483-4da7-8414-9ce98be36e53"
,
"
finishOrderId"
:
null
,
"
syquantity"
:
50000.0
,
"
syquantity"
:
50000.0
"
finishOrderId"
:
null
}
],
}
],
"machineMaxRate"
:
83.33
,
"orderMaterials"
:
null
,
"machineMaxRate"
:
96.77
,
"machineMinRate"
:
0.0
,
"machineMinRate"
:
0.0
,
"machineWaitTime"
:
4295.033333333334
,
"machineWaitTime"
:
4295.033333333334
,
"orderOnTime"
:
100.0
,
"orderOnTime"
:
100.0
,
...
@@ -675,106 +688,151 @@
...
@@ -675,106 +688,151 @@
"orderMinFlow"
:
0.0
,
"orderMinFlow"
:
0.0
,
"orderAvgFlow"
:
0.0
,
"orderAvgFlow"
:
0.0
,
"result"
:
[
{
"result"
:
[
{
"ExecId"
:
"
65ffe1c733cc4a888ca3dcc28a7ab65a
"
,
"ExecId"
:
"
3dbe438ec2714f3d830bb186df914370
"
,
"OrderId"
:
"
fcc0892a-0483-4da7-8414-9ce98be36e53
"
,
"OrderId"
:
"
14a5bbda-bcf6-41d1-a342-bb07c2d41b4f
"
,
"productId"
:
"
cbd0dd08-e92e-f846-8577-c359540fb09a
"
,
"productId"
:
"
d5d0dd08-e3b6-c94c-8073-bad6ae137269
"
,
"teardownTime"
:
0
,
"teardownTime"
:
0
,
"designatedStartTime"
:
-1
,
"designatedStartTime"
:
-1
,
"forcedMachineId"
:
-1
,
"forcedMachineId"
:
-1
,
"startTime"
:
27000
,
"seq"
:
0
,
"endTime"
:
63000
,
"groupId"
:
1
,
"orderId"
:
"fcc0892a-0483-4da7-8414-9ce98be36e53"
,
"quantity"
:
50000.0
,
"operationId"
:
1
,
"processingTime"
:
36000.0
,
"machineId"
:
3403
,
"changeoverTime"
:
0
,
"changeoverTime"
:
0
,
"execId"
:
"65ffe1c733cc4a888ca3dcc28a7ab65a"
,
"groupId"
:
2
,
"processingTime"
:
72000.0
,
"machineId"
:
2183
,
"quantity"
:
20.0
,
"startTime"
:
27000
,
"endTime"
:
149400
,
"orderId"
:
"14a5bbda-bcf6-41d1-a342-bb07c2d41b4f"
,
"operationId"
:
3
,
"geneDetails"
:
[
{
"geneDetails"
:
[
{
"key"
:
"306c7f03-660d-475a-ada9-97d1fd9fbcf9"
,
"key"
:
"48f10834-a9be-4097-8dca-2a1be5404ddc"
,
"processingTime"
:
36000
,
"quantity"
:
10.0
,
"startTime"
:
27000
,
"startTime"
:
27000
,
"endTime"
:
63000
,
"endTime"
:
63000
,
"quantity"
:
50000.0
,
"oneTime"
:
3600.0
},
{
"key"
:
"936d981f-bd02-4691-a93b-33eb69fc3216"
,
"processingTime"
:
36000
,
"processingTime"
:
36000
,
"oneTime"
:
0.72
"quantity"
:
10.0
,
"startTime"
:
113400
,
"endTime"
:
149400
,
"oneTime"
:
3600.0
}
],
}
],
"oneTime"
:
0.72
,
"isLocked"
:
false
,
"isLocked"
:
false
,
"flowTime"
:
36000
"execId"
:
"3dbe438ec2714f3d830bb186df914370"
,
"oneTime"
:
3600.0
,
"flowTime"
:
122400
},
{
},
{
"ExecId"
:
"
36200a5d39aa43eb956824baa3d7961c
"
,
"ExecId"
:
"
65ffe1c733cc4a888ca3dcc28a7ab65a
"
,
"OrderId"
:
"fcc0892a-0483-4da7-8414-9ce98be36e53"
,
"OrderId"
:
"fcc0892a-0483-4da7-8414-9ce98be36e53"
,
"productId"
:
"cbd0dd08-e92e-f846-8577-c359540fb09a"
,
"productId"
:
"cbd0dd08-e92e-f846-8577-c359540fb09a"
,
"teardownTime"
:
0
,
"teardownTime"
:
0
,
"designatedStartTime"
:
-
1
,
"designatedStartTime"
:
123427
1
,
"forcedMachineId"
:
-1
,
"forcedMachineId"
:
-1
,
"s
tartTime"
:
6300
0
,
"s
eq"
:
0
,
"
endTime"
:
13740
0
,
"
changeoverTime"
:
0
,
"groupId"
:
1
,
"groupId"
:
1
,
"orderId"
:
"fcc0892a-0483-4da7-8414-9ce98be36e53"
,
"processingTime"
:
36000.0
,
"machineId"
:
3403
,
"quantity"
:
50000.0
,
"quantity"
:
50000.0
,
"operationId"
:
2
,
"startTime"
:
1236600
,
"processingTime"
:
60000.0
,
"endTime"
:
1272600
,
"machineId"
:
3243
,
"orderId"
:
"fcc0892a-0483-4da7-8414-9ce98be36e53"
,
"changeoverTime"
:
0
,
"operationId"
:
1
,
"execId"
:
"36200a5d39aa43eb956824baa3d7961c"
,
"geneDetails"
:
[
{
"geneDetails"
:
[
{
"key"
:
"80a684a3-74b0-4b87-aea8-c56e0f7f62be"
,
"key"
:
"47e0b2d2-8407-4a20-840e-b2d9aeb6470b"
,
"startTime"
:
63000
,
"endTime"
:
99000
,
"quantity"
:
30000.0
,
"processingTime"
:
36000
,
"processingTime"
:
36000
,
"oneTime"
:
1.2
"quantity"
:
50000.0
,
},
{
"startTime"
:
1236600
,
"key"
:
"7098f1f3-0f4d-490d-baa0-1d6fa04a3255"
,
"endTime"
:
1272600
,
"startTime"
:
113400
,
"oneTime"
:
0.72
"endTime"
:
137400
,
"quantity"
:
20000.0
,
"processingTime"
:
24000
,
"oneTime"
:
1.2
}
],
}
],
"oneTime"
:
1.2
,
"isLocked"
:
false
,
"isLocked"
:
false
,
"flowTime"
:
74400
"execId"
:
"65ffe1c733cc4a888ca3dcc28a7ab65a"
,
"oneTime"
:
0.72
,
"flowTime"
:
36000
},
{
},
{
"ExecId"
:
"3
dbe438ec2714f3d830bb186df914370
"
,
"ExecId"
:
"3
6200a5d39aa43eb956824baa3d7961c
"
,
"OrderId"
:
"
14a5bbda-bcf6-41d1-a342-bb07c2d41b4f
"
,
"OrderId"
:
"
fcc0892a-0483-4da7-8414-9ce98be36e53
"
,
"productId"
:
"
d5d0dd08-e3b6-c94c-8073-bad6ae137269
"
,
"productId"
:
"
cbd0dd08-e92e-f846-8577-c359540fb09a
"
,
"teardownTime"
:
0
,
"teardownTime"
:
0
,
"designatedStartTime"
:
-1
,
"designatedStartTime"
:
-1
,
"forcedMachineId"
:
-1
,
"forcedMachineId"
:
-1
,
"startTime"
:
27000
,
"seq"
:
0
,
"endTime"
:
149400
,
"groupId"
:
2
,
"orderId"
:
"14a5bbda-bcf6-41d1-a342-bb07c2d41b4f"
,
"quantity"
:
20.0
,
"operationId"
:
3
,
"processingTime"
:
72000.0
,
"machineId"
:
2183
,
"changeoverTime"
:
0
,
"changeoverTime"
:
0
,
"execId"
:
"3dbe438ec2714f3d830bb186df914370"
,
"groupId"
:
1
,
"processingTime"
:
60000.0
,
"machineId"
:
3243
,
"quantity"
:
50000.0
,
"startTime"
:
1272600
,
"endTime"
:
1347000
,
"orderId"
:
"fcc0892a-0483-4da7-8414-9ce98be36e53"
,
"operationId"
:
2
,
"geneDetails"
:
[
{
"geneDetails"
:
[
{
"key"
:
"48f10834-a9be-4097-8dca-2a1be5404ddc"
,
"key"
:
"389863ab-4fe5-44bc-b69b-a369a04e7d82"
,
"startTime"
:
27000
,
"endTime"
:
63000
,
"quantity"
:
10.0
,
"processingTime"
:
36000
,
"processingTime"
:
36000
,
"oneTime"
:
3600.0
"quantity"
:
30000.0
,
"startTime"
:
1272600
,
"endTime"
:
1308600
,
"oneTime"
:
1.2
},
{
},
{
"key"
:
"9
36d981f-bd02-4691-a93b-33eb69fc3216
"
,
"key"
:
"9
d0f6fb8-9be8-43a2-b410-285594db7f49
"
,
"
startTime"
:
1134
00
,
"
processingTime"
:
240
00
,
"
endTime"
:
14940
0
,
"
quantity"
:
20000.
0
,
"
quantity"
:
10.
0
,
"
startTime"
:
132300
0
,
"
processingTime"
:
36
000
,
"
endTime"
:
1347
000
,
"oneTime"
:
3600.0
"oneTime"
:
1.2
}
],
}
],
"oneTime"
:
3600.0
,
"isLocked"
:
false
,
"isLocked"
:
false
,
"flowTime"
:
122400
"execId"
:
"36200a5d39aa43eb956824baa3d7961c"
,
"oneTime"
:
1.2
,
"flowTime"
:
74400
}
],
}
],
"id"
:
"e8e060fa-c33d-43ff-90a4-3f28824eb085"
,
"id"
:
"e8e060fa-c33d-43ff-90a4-3f28824eb085"
,
"machineSelection"
:
[
1
,
1
,
1
],
"crowdingDistance"
:
"Infinity"
,
"totalChangeoverTime"
:
0.0
,
"operationSequencing"
:
[
2
,
1
,
1
],
"weightedObjective"
:
0.0
,
"machineLoadStd"
:
0.9987918166792348
,
"baseTime"
:
"2025-11-01T00:00:00"
,
"baseTime"
:
"2025-11-01T00:00:00"
,
"makespan"
:
1347000.0
,
"delayTime"
:
0.0
,
"totalFlowTime"
:
232800.0
,
"operatRel"
:
[
{
"nodeInfoList"
:
[
{
"originalId"
:
"65ffe1c733cc4a888ca3dcc28a7ab65a"
,
"globalSerial"
:
1
,
"groupSerial"
:
1
,
"newParentIds"
:
[
],
"newChildIds"
:
[
2
]
},
{
"originalId"
:
"36200a5d39aa43eb956824baa3d7961c"
,
"globalSerial"
:
2
,
"groupSerial"
:
2
,
"newParentIds"
:
[
1
],
"newChildIds"
:
[
]
}
],
"originalToGlobalSerial"
:
{
"36200a5d39aa43eb956824baa3d7961c"
:
2
,
"65ffe1c733cc4a888ca3dcc28a7ab65a"
:
1
}
},
{
"nodeInfoList"
:
[
{
"originalId"
:
"3dbe438ec2714f3d830bb186df914370"
,
"globalSerial"
:
3
,
"groupSerial"
:
1
,
"newParentIds"
:
[
],
"newChildIds"
:
[
]
}
],
"originalToGlobalSerial"
:
{
"3dbe438ec2714f3d830bb186df914370"
:
3
}
}
],
"scenarioID"
:
"B571EF6682DB463AB2977B1055A74112"
,
"operationStr"
:
"2|1|1"
,
"fitness"
:
0.4820972833156857
,
"machines"
:
[
{
"machines"
:
[
{
"id"
:
2183
,
"id"
:
2183
,
"name"
:
null
,
"name"
:
null
,
...
@@ -1356,9 +1414,10 @@
...
@@ -1356,9 +1414,10 @@
"used"
:
false
,
"used"
:
false
,
"holiday"
:
false
"holiday"
:
false
}
],
}
],
"code"
:
null
,
"holidays"
:
[
],
"holidays"
:
[
],
"actualWorkTime"
:
72000.0
,
"actualWorkTime"
:
72000.0
,
"rate"
:
83.33
,
"rate"
:
96.77
,
"shiftsChanged"
:
null
,
"shiftsChanged"
:
null
,
"maintenanceWindowsChanged"
:
null
"maintenanceWindowsChanged"
:
null
},
{
},
{
...
@@ -1399,20 +1458,11 @@
...
@@ -1399,20 +1458,11 @@
"earliestTime"
:
0
,
"earliestTime"
:
0
,
"totalTaskTime"
:
0
,
"totalTaskTime"
:
0
,
"type"
:
"REGULAR"
,
"type"
:
"REGULAR"
,
"used"
:
true
,
"used"
:
false
,
"holiday"
:
false
},
{
"key"
:
"7098f1f3-0f4d-490d-baa0-1d6fa04a3255"
,
"start"
:
"2025-11-02T07:30:00"
,
"end"
:
"2025-11-02T14:10:00"
,
"earliestTime"
:
0
,
"totalTaskTime"
:
0
,
"type"
:
"REGULAR"
,
"used"
:
true
,
"holiday"
:
false
"holiday"
:
false
},
{
},
{
"key"
:
"721f79db-04a4-4c0f-bcd0-330c02265f25"
,
"key"
:
"721f79db-04a4-4c0f-bcd0-330c02265f25"
,
"start"
:
"2025-11-02T
14:1
0:00"
,
"start"
:
"2025-11-02T
07:3
0:00"
,
"end"
:
"2025-11-03T03:30:00"
,
"end"
:
"2025-11-03T03:30:00"
,
"earliestTime"
:
0
,
"earliestTime"
:
0
,
"totalTaskTime"
:
0
,
"totalTaskTime"
:
0
,
...
@@ -1534,11 +1584,20 @@
...
@@ -1534,11 +1584,20 @@
"earliestTime"
:
0
,
"earliestTime"
:
0
,
"totalTaskTime"
:
0
,
"totalTaskTime"
:
0
,
"type"
:
"REGULAR"
,
"type"
:
"REGULAR"
,
"used"
:
fals
e
,
"used"
:
tru
e
,
"holiday"
:
false
"holiday"
:
false
},
{
},
{
"key"
:
"
d3e7b298-0c49-4e69-a340-66b55e98de
49"
,
"key"
:
"
9d0f6fb8-9be8-43a2-b410-285594db7f
49"
,
"start"
:
"2025-11-16T07:30:00"
,
"start"
:
"2025-11-16T07:30:00"
,
"end"
:
"2025-11-16T14:10:00"
,
"earliestTime"
:
0
,
"totalTaskTime"
:
0
,
"type"
:
"REGULAR"
,
"used"
:
true
,
"holiday"
:
false
},
{
"key"
:
"d3e7b298-0c49-4e69-a340-66b55e98de49"
,
"start"
:
"2025-11-16T14:10:00"
,
"end"
:
"2025-11-17T03:30:00"
,
"end"
:
"2025-11-17T03:30:00"
,
"earliestTime"
:
0
,
"earliestTime"
:
0
,
"totalTaskTime"
:
0
,
"totalTaskTime"
:
0
,
...
@@ -1951,9 +2010,10 @@
...
@@ -1951,9 +2010,10 @@
"used"
:
false
,
"used"
:
false
,
"holiday"
:
false
"holiday"
:
false
}
],
}
],
"code"
:
null
,
"holidays"
:
[
],
"holidays"
:
[
],
"actualWorkTime"
:
60000.0
,
"actualWorkTime"
:
60000.0
,
"rate"
:
69.44
,
"rate"
:
80.65
,
"shiftsChanged"
:
null
,
"shiftsChanged"
:
null
,
"maintenanceWindowsChanged"
:
null
"maintenanceWindowsChanged"
:
null
},
{
},
{
...
@@ -2537,6 +2597,7 @@
...
@@ -2537,6 +2597,7 @@
"used"
:
false
,
"used"
:
false
,
"holiday"
:
false
"holiday"
:
false
}
],
}
],
"code"
:
null
,
"holidays"
:
[
],
"holidays"
:
[
],
"actualWorkTime"
:
0.0
,
"actualWorkTime"
:
0.0
,
"rate"
:
0.0
,
"rate"
:
0.0
,
...
@@ -3123,6 +3184,7 @@
...
@@ -3123,6 +3184,7 @@
"used"
:
false
,
"used"
:
false
,
"holiday"
:
false
"holiday"
:
false
}
],
}
],
"code"
:
null
,
"holidays"
:
[
],
"holidays"
:
[
],
"actualWorkTime"
:
0.0
,
"actualWorkTime"
:
0.0
,
"rate"
:
0.0
,
"rate"
:
0.0
,
...
@@ -3166,7 +3228,7 @@
...
@@ -3166,7 +3228,7 @@
"earliestTime"
:
0
,
"earliestTime"
:
0
,
"totalTaskTime"
:
0
,
"totalTaskTime"
:
0
,
"type"
:
"REGULAR"
,
"type"
:
"REGULAR"
,
"used"
:
tru
e
,
"used"
:
fals
e
,
"holiday"
:
false
"holiday"
:
false
},
{
},
{
"key"
:
"f64e0997-b4cc-4316-bb99-aed6409e316d"
,
"key"
:
"f64e0997-b4cc-4316-bb99-aed6409e316d"
,
...
@@ -3292,7 +3354,7 @@
...
@@ -3292,7 +3354,7 @@
"earliestTime"
:
0
,
"earliestTime"
:
0
,
"totalTaskTime"
:
0
,
"totalTaskTime"
:
0
,
"type"
:
"REGULAR"
,
"type"
:
"REGULAR"
,
"used"
:
fals
e
,
"used"
:
tru
e
,
"holiday"
:
false
"holiday"
:
false
},
{
},
{
"key"
:
"849cd537-e702-4188-a26a-b89d3e3f2c62"
,
"key"
:
"849cd537-e702-4188-a26a-b89d3e3f2c62"
,
...
@@ -3709,55 +3771,119 @@
...
@@ -3709,55 +3771,119 @@
"used"
:
false
,
"used"
:
false
,
"holiday"
:
false
"holiday"
:
false
}
],
}
],
"code"
:
null
,
"holidays"
:
[
],
"holidays"
:
[
],
"actualWorkTime"
:
36000.0
,
"actualWorkTime"
:
36000.0
,
"rate"
:
4
1.67
,
"rate"
:
4
8.39
,
"shiftsChanged"
:
null
,
"shiftsChanged"
:
null
,
"maintenanceWindowsChanged"
:
null
"maintenanceWindowsChanged"
:
null
}
],
}
],
"scenarioID"
:
"B571EF6682DB463AB2977B1055A74112"
,
"rank"
:
0
,
"totalChangeoverTime"
:
0.0
,
"objectives"
:
[
1347000.0
,
232800.0
,
0.0
,
0.9987918166792348
,
0.0
],
"makespan"
:
149400.0
,
"machineStr"
:
"1,1,1"
,
"operatRel"
:
[
{
"resultOld"
:
[
{
"nodeInfoList"
:
[
{
"ExecId"
:
"65ffe1c733cc4a888ca3dcc28a7ab65a"
,
"originalId"
:
"65ffe1c733cc4a888ca3dcc28a7ab65a"
,
"OrderId"
:
"fcc0892a-0483-4da7-8414-9ce98be36e53"
,
"globalSerial"
:
1
,
"productId"
:
"cbd0dd08-e92e-f846-8577-c359540fb09a"
,
"groupSerial"
:
1
,
"teardownTime"
:
0
,
"newParentIds"
:
[
],
"designatedStartTime"
:
1234271
,
"newChildIds"
:
[
2
]
"forcedMachineId"
:
3403
,
"seq"
:
0
,
"changeoverTime"
:
0
,
"groupId"
:
1
,
"processingTime"
:
36000.0
,
"machineId"
:
3403
,
"quantity"
:
50000.0
,
"startTime"
:
27000
,
"endTime"
:
63000
,
"orderId"
:
"fcc0892a-0483-4da7-8414-9ce98be36e53"
,
"operationId"
:
1
,
"geneDetails"
:
[
{
"key"
:
"306c7f03-660d-475a-ada9-97d1fd9fbcf9"
,
"processingTime"
:
36000
,
"quantity"
:
50000.0
,
"startTime"
:
27000
,
"endTime"
:
63000
,
"oneTime"
:
0.72
}
],
"isLocked"
:
false
,
"execId"
:
"65ffe1c733cc4a888ca3dcc28a7ab65a"
,
"oneTime"
:
0.72
,
"flowTime"
:
36000
},
{
"ExecId"
:
"36200a5d39aa43eb956824baa3d7961c"
,
"OrderId"
:
"fcc0892a-0483-4da7-8414-9ce98be36e53"
,
"productId"
:
"cbd0dd08-e92e-f846-8577-c359540fb09a"
,
"teardownTime"
:
0
,
"designatedStartTime"
:
-1
,
"forcedMachineId"
:
-1
,
"seq"
:
0
,
"changeoverTime"
:
0
,
"groupId"
:
1
,
"processingTime"
:
60000.0
,
"machineId"
:
3243
,
"quantity"
:
50000.0
,
"startTime"
:
63000
,
"endTime"
:
137400
,
"orderId"
:
"fcc0892a-0483-4da7-8414-9ce98be36e53"
,
"operationId"
:
2
,
"geneDetails"
:
[
{
"key"
:
"80a684a3-74b0-4b87-aea8-c56e0f7f62be"
,
"processingTime"
:
36000
,
"quantity"
:
30000.0
,
"startTime"
:
63000
,
"endTime"
:
99000
,
"oneTime"
:
1.2
},
{
},
{
"originalId"
:
"36200a5d39aa43eb956824baa3d7961c"
,
"key"
:
"7098f1f3-0f4d-490d-baa0-1d6fa04a3255"
,
"globalSerial"
:
2
,
"processingTime"
:
24000
,
"groupSerial"
:
2
,
"quantity"
:
20000.0
,
"newParentIds"
:
[
1
],
"startTime"
:
113400
,
"newChildIds"
:
[
]
"endTime"
:
137400
,
"oneTime"
:
1.2
}
],
}
],
"
originalToGlobalSerial"
:
{
"
isLocked"
:
false
,
"36200a5d39aa43eb956824baa3d7961c"
:
2
,
"execId"
:
"36200a5d39aa43eb956824baa3d7961c"
,
"65ffe1c733cc4a888ca3dcc28a7ab65a"
:
1
"oneTime"
:
1.2
,
}
"flowTime"
:
74400
},
{
},
{
"nodeInfoList"
:
[
{
"ExecId"
:
"3dbe438ec2714f3d830bb186df914370"
,
"originalId"
:
"3dbe438ec2714f3d830bb186df914370"
,
"OrderId"
:
"14a5bbda-bcf6-41d1-a342-bb07c2d41b4f"
,
"globalSerial"
:
3
,
"productId"
:
"d5d0dd08-e3b6-c94c-8073-bad6ae137269"
,
"groupSerial"
:
1
,
"teardownTime"
:
0
,
"newParentIds"
:
[
],
"designatedStartTime"
:
-1
,
"newChildIds"
:
[
]
"forcedMachineId"
:
-1
,
"seq"
:
0
,
"changeoverTime"
:
0
,
"groupId"
:
2
,
"processingTime"
:
72000.0
,
"machineId"
:
2183
,
"quantity"
:
20.0
,
"startTime"
:
27000
,
"endTime"
:
149400
,
"orderId"
:
"14a5bbda-bcf6-41d1-a342-bb07c2d41b4f"
,
"operationId"
:
3
,
"geneDetails"
:
[
{
"key"
:
"48f10834-a9be-4097-8dca-2a1be5404ddc"
,
"processingTime"
:
36000
,
"quantity"
:
10.0
,
"startTime"
:
27000
,
"endTime"
:
63000
,
"oneTime"
:
3600.0
},
{
"key"
:
"936d981f-bd02-4691-a93b-33eb69fc3216"
,
"processingTime"
:
36000
,
"quantity"
:
10.0
,
"startTime"
:
113400
,
"endTime"
:
149400
,
"oneTime"
:
3600.0
}
],
}
],
"originalToGlobalSerial"
:
{
"isLocked"
:
false
,
"3dbe438ec2714f3d830bb186df914370"
:
3
"execId"
:
"3dbe438ec2714f3d830bb186df914370"
,
}
"oneTime"
:
3600.0
,
"flowTime"
:
122400
}
],
}
],
"operationStr"
:
"1|1|2"
,
"scenarioName"
:
null
,
"totalFlowTime"
:
232800.0
,
"fitness"
:
0.4820972833156857
,
"delayTime"
:
0.0
,
"machineLoadStd"
:
0.9104720809707942
,
"weightedObjective"
:
0.0
,
"machineSelection"
:
[
1
,
1
,
1
],
"operationSequencing"
:
[
1
,
1
,
2
],
"crowdingDistance"
:
"Infinity"
,
"rank"
:
0
,
"initMachines"
:
[
{
"initMachines"
:
[
{
"id"
:
2183
,
"id"
:
2183
,
"name"
:
null
,
"name"
:
null
,
...
@@ -3796,7 +3922,7 @@
...
@@ -3796,7 +3922,7 @@
"earliestTime"
:
0
,
"earliestTime"
:
0
,
"totalTaskTime"
:
0
,
"totalTaskTime"
:
0
,
"type"
:
"REGULAR"
,
"type"
:
"REGULAR"
,
"used"
:
fals
e
,
"used"
:
tru
e
,
"holiday"
:
false
"holiday"
:
false
},
{
},
{
"key"
:
"936d981f-bd02-4691-a93b-33eb69fc3216"
,
"key"
:
"936d981f-bd02-4691-a93b-33eb69fc3216"
,
...
@@ -3805,7 +3931,7 @@
...
@@ -3805,7 +3931,7 @@
"earliestTime"
:
0
,
"earliestTime"
:
0
,
"totalTaskTime"
:
0
,
"totalTaskTime"
:
0
,
"type"
:
"REGULAR"
,
"type"
:
"REGULAR"
,
"used"
:
fals
e
,
"used"
:
tru
e
,
"holiday"
:
false
"holiday"
:
false
},
{
},
{
"key"
:
"a97c4750-faab-4799-8c36-775522070aef"
,
"key"
:
"a97c4750-faab-4799-8c36-775522070aef"
,
...
@@ -4339,9 +4465,10 @@
...
@@ -4339,9 +4465,10 @@
"used"
:
false
,
"used"
:
false
,
"holiday"
:
false
"holiday"
:
false
}
],
}
],
"code"
:
null
,
"holidays"
:
[
],
"holidays"
:
[
],
"actualWorkTime"
:
0.0
,
"actualWorkTime"
:
7200
0.0
,
"rate"
:
0.0
,
"rate"
:
96.77
,
"shiftsChanged"
:
null
,
"shiftsChanged"
:
null
,
"maintenanceWindowsChanged"
:
null
"maintenanceWindowsChanged"
:
null
},
{
},
{
...
@@ -4508,11 +4635,20 @@
...
@@ -4508,11 +4635,20 @@
"earliestTime"
:
0
,
"earliestTime"
:
0
,
"totalTaskTime"
:
0
,
"totalTaskTime"
:
0
,
"type"
:
"REGULAR"
,
"type"
:
"REGULAR"
,
"used"
:
fals
e
,
"used"
:
tru
e
,
"holiday"
:
false
"holiday"
:
false
},
{
},
{
"key"
:
"
d3e7b298-0c49-4e69-a340-66b55e98de
49"
,
"key"
:
"
9d0f6fb8-9be8-43a2-b410-285594db7f
49"
,
"start"
:
"2025-11-16T07:30:00"
,
"start"
:
"2025-11-16T07:30:00"
,
"end"
:
"2025-11-16T14:10:00"
,
"earliestTime"
:
0
,
"totalTaskTime"
:
0
,
"type"
:
"REGULAR"
,
"used"
:
true
,
"holiday"
:
false
},
{
"key"
:
"d3e7b298-0c49-4e69-a340-66b55e98de49"
,
"start"
:
"2025-11-16T14:10:00"
,
"end"
:
"2025-11-17T03:30:00"
,
"end"
:
"2025-11-17T03:30:00"
,
"earliestTime"
:
0
,
"earliestTime"
:
0
,
"totalTaskTime"
:
0
,
"totalTaskTime"
:
0
,
...
@@ -4925,9 +5061,10 @@
...
@@ -4925,9 +5061,10 @@
"used"
:
false
,
"used"
:
false
,
"holiday"
:
false
"holiday"
:
false
}
],
}
],
"code"
:
null
,
"holidays"
:
[
],
"holidays"
:
[
],
"actualWorkTime"
:
0.0
,
"actualWorkTime"
:
6000
0.0
,
"rate"
:
0.0
,
"rate"
:
80.65
,
"shiftsChanged"
:
null
,
"shiftsChanged"
:
null
,
"maintenanceWindowsChanged"
:
null
"maintenanceWindowsChanged"
:
null
},
{
},
{
...
@@ -5511,6 +5648,7 @@
...
@@ -5511,6 +5648,7 @@
"used"
:
false
,
"used"
:
false
,
"holiday"
:
false
"holiday"
:
false
}
],
}
],
"code"
:
null
,
"holidays"
:
[
],
"holidays"
:
[
],
"actualWorkTime"
:
0.0
,
"actualWorkTime"
:
0.0
,
"rate"
:
0.0
,
"rate"
:
0.0
,
...
@@ -6097,6 +6235,7 @@
...
@@ -6097,6 +6235,7 @@
"used"
:
false
,
"used"
:
false
,
"holiday"
:
false
"holiday"
:
false
}
],
}
],
"code"
:
null
,
"holidays"
:
[
],
"holidays"
:
[
],
"actualWorkTime"
:
0.0
,
"actualWorkTime"
:
0.0
,
"rate"
:
0.0
,
"rate"
:
0.0
,
...
@@ -6266,7 +6405,7 @@
...
@@ -6266,7 +6405,7 @@
"earliestTime"
:
0
,
"earliestTime"
:
0
,
"totalTaskTime"
:
0
,
"totalTaskTime"
:
0
,
"type"
:
"REGULAR"
,
"type"
:
"REGULAR"
,
"used"
:
fals
e
,
"used"
:
tru
e
,
"holiday"
:
false
"holiday"
:
false
},
{
},
{
"key"
:
"849cd537-e702-4188-a26a-b89d3e3f2c62"
,
"key"
:
"849cd537-e702-4188-a26a-b89d3e3f2c62"
,
...
@@ -6683,14 +6822,11 @@
...
@@ -6683,14 +6822,11 @@
"used"
:
false
,
"used"
:
false
,
"holiday"
:
false
"holiday"
:
false
}
],
}
],
"code"
:
null
,
"holidays"
:
[
],
"holidays"
:
[
],
"actualWorkTime"
:
0.0
,
"actualWorkTime"
:
3600
0.0
,
"rate"
:
0.0
,
"rate"
:
48.39
,
"shiftsChanged"
:
null
,
"shiftsChanged"
:
null
,
"maintenanceWindowsChanged"
:
null
"maintenanceWindowsChanged"
:
null
}
],
}
]
"objectives"
:
[
149400.0
,
232800.0
,
0.0
,
0.9104720809707942
,
0.0
],
"resultOld"
:
[
],
"scenarioName"
:
null
,
"machineStr"
:
"1,1,1"
}
}
\ No newline at end of file
schedule_log.txt
View file @
fc778193
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/main/java/com/aps/common/util/ParamValidator.java
View file @
fc778193
...
@@ -12,6 +12,7 @@ import java.time.format.DateTimeFormatter;
...
@@ -12,6 +12,7 @@ import java.time.format.DateTimeFormatter;
import
java.time.format.DateTimeParseException
;
import
java.time.format.DateTimeParseException
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
@Slf4j
@Slf4j
@UtilityClass
@UtilityClass
...
@@ -241,4 +242,25 @@ public class ParamValidator {
...
@@ -241,4 +242,25 @@ public class ParamValidator {
})
})
.
toArray
(
Double
[]::
new
);
.
toArray
(
Double
[]::
new
);
}
}
public
static
List
<
Integer
>
convertToIntArray
(
List
<?>
sourceList
,
String
fieldName
)
{
requireNotEmpty
(
sourceList
,
fieldName
);
return
sourceList
.
stream
()
.
map
(
item
->
{
if
(
item
instanceof
Number
)
{
return
((
Integer
)
item
);
}
else
if
(
item
instanceof
String
)
{
try
{
return
Integer
.
parseInt
(((
String
)
item
).
trim
());
}
catch
(
NumberFormatException
e
)
{
throw
new
IllegalArgumentException
(
fieldName
+
"包含无效的数字: "
+
item
);
}
}
else
{
throw
new
IllegalArgumentException
(
fieldName
+
"包含不支持的数据类型: "
+
(
item
!=
null
?
item
.
getClass
().
getSimpleName
()
:
"null"
));
}
})
.
collect
(
Collectors
.
toList
());
}
}
}
\ No newline at end of file
src/main/java/com/aps/controller/gantt/ResourceGanttController.java
View file @
fc778193
...
@@ -144,15 +144,17 @@ public class ResourceGanttController {
...
@@ -144,15 +144,17 @@ public class ResourceGanttController {
// 1. 提取参数
// 1. 提取参数
String
sceneId
=
ParamValidator
.
getString
(
params
,
"sceneId"
,
"场景ID"
);
String
sceneId
=
ParamValidator
.
getString
(
params
,
"sceneId"
,
"场景ID"
);
Integer
opid
=
ParamValidator
.
getInteger
(
params
,
"id"
,
"操作ID"
);
List
<?>
opid
=
ParamValidator
.
getList
(
params
,
"id"
,
"操作ID"
);
LocalDateTime
newStartTime
=
ParamValidator
.
getDateTime
(
params
,
"newStartTime"
,
"新的开始时间"
);
LocalDateTime
newStartTime
=
ParamValidator
.
getDateTime
(
params
,
"newStartTime"
,
"新的开始时间"
);
Long
newMachineId
=
ParamValidator
.
getLong
(
params
,
"newMachineId"
,
"新机器ID"
);
Long
newMachineId
=
ParamValidator
.
getLong
(
params
,
"newMachineId"
,
"新机器ID"
);
// 2. 验证场景
// 2. 验证场景
ParamValidator
.
validateSceneExists
(
sceneService
,
sceneId
);
ParamValidator
.
validateSceneExists
(
sceneService
,
sceneId
);
List
<
Integer
>
opids
=
ParamValidator
.
convertToIntArray
(
opid
,
"操作IDS"
);
// 3. 执行业务
// 3. 执行业务
Chromosome
result
=
planResultService
.
Move
(
sceneId
,
opid
,
newStartTime
,
newMachineId
);
Chromosome
result
=
planResultService
.
Move
(
sceneId
,
opid
s
,
newStartTime
,
newMachineId
);
return
R
.
ok
(
result
);
return
R
.
ok
(
result
);
}
}
...
...
src/main/java/com/aps/service/Algorithm/GeneticAlgorithm.java
View file @
fc778193
...
@@ -66,7 +66,7 @@ public class GeneticAlgorithm {
...
@@ -66,7 +66,7 @@ public class GeneticAlgorithm {
}
}
System
.
out
.
println
(
"开始"
);
System
.
out
.
println
(
"开始"
);
Initialization
initialization
=
new
Initialization
(
_GlobalParam
,
allOperations
,
orders
);
Initialization
initialization
=
new
Initialization
(
_GlobalParam
,
allOperations
,
orders
,
machines
);
GeneticOperations
geneticOps
=
new
GeneticOperations
(
_GlobalParam
,
allOperations
,
param
);
GeneticOperations
geneticOps
=
new
GeneticOperations
(
_GlobalParam
,
allOperations
,
param
);
...
@@ -183,8 +183,7 @@ public class GeneticAlgorithm {
...
@@ -183,8 +183,7 @@ public class GeneticAlgorithm {
}
}
}
}
best
.
setBaseTime
(
param
.
getBaseTime
());
best
.
setBaseTime
(
param
.
getBaseTime
());
best
.
setInitMachines
(
ProductionDeepCopyUtil
.
deepCopyList
(
machines
));
best
.
setOrders
(
orders
);
best
.
setOrderMaterials
(
orderMaterials
);
best
.
setOrderMaterials
(
orderMaterials
);
best
.
setOperatRel
(
_entryRel
);
best
.
setOperatRel
(
_entryRel
);
// 步骤3:返回最优解
// 步骤3:返回最优解
...
...
src/main/java/com/aps/service/Algorithm/GeneticDecoder.java
View file @
fc778193
...
@@ -78,7 +78,7 @@ public class GeneticDecoder {
...
@@ -78,7 +78,7 @@ public class GeneticDecoder {
chromosome
.
setTotalChangeoverTime
(
cachedResult
.
getTotalChangeoverTime
());
chromosome
.
setTotalChangeoverTime
(
cachedResult
.
getTotalChangeoverTime
());
chromosome
.
setMachineLoadStd
(
cachedResult
.
getMachineLoadStd
());
chromosome
.
setMachineLoadStd
(
cachedResult
.
getMachineLoadStd
());
chromosome
.
setDelayTime
(
cachedResult
.
getDelayTime
());
chromosome
.
setDelayTime
(
cachedResult
.
getDelayTime
());
chromosome
.
setResult
(
ProductionDeepCopyUtil
.
deepCopy
(
cachedResult
.
getResult
()
));
chromosome
.
setResult
(
cachedResult
.
getResult
(
));
// Chromosome chromosomen= ProductionDeepCopyUtil.deepCopy(cachedResult);
// Chromosome chromosomen= ProductionDeepCopyUtil.deepCopy(cachedResult);
return
chromosome
;
return
chromosome
;
...
...
src/main/java/com/aps/service/Algorithm/GeneticOperations.java
View file @
fc778193
...
@@ -136,11 +136,13 @@ public class GeneticOperations {
...
@@ -136,11 +136,13 @@ public class GeneticOperations {
Chromosome
child1
=
new
Chromosome
();
Chromosome
child1
=
new
Chromosome
();
child1
.
setOrders
(
parent1
.
getOrders
());
child1
.
setOrders
(
parent1
.
getOrders
());
child1
.
setMachines
(
parent1
.
getMachines
());
child1
.
setMachineSelection
(
child1Ms
);
child1
.
setMachineSelection
(
child1Ms
);
child1
.
setOperationSequencing
(
child1Os
);
child1
.
setOperationSequencing
(
child1Os
);
Chromosome
child2
=
new
Chromosome
();
Chromosome
child2
=
new
Chromosome
();
child2
.
setOrders
(
parent1
.
getOrders
());
child2
.
setOrders
(
parent1
.
getOrders
());
child2
.
setMachines
(
parent1
.
getMachines
());
child2
.
setMachineSelection
(
child2Ms
);
child2
.
setMachineSelection
(
child2Ms
);
child2
.
setOperationSequencing
(
child2Os
);
child2
.
setOperationSequencing
(
child2Os
);
...
...
src/main/java/com/aps/service/Algorithm/Initialization.java
View file @
fc778193
package
com
.
aps
.
service
.
Algorithm
;
package
com
.
aps
.
service
.
Algorithm
;
import
com.aps.common.util.ProductionDeepCopyUtil
;
import
com.aps.entity.Algorithm.Chromosome
;
import
com.aps.entity.Algorithm.Chromosome
;
import
com.aps.entity.Algorithm.GlobalOperationInfo
;
import
com.aps.entity.Algorithm.GlobalOperationInfo
;
import
com.aps.entity.Algorithm.ScheduleParams
;
import
com.aps.entity.Algorithm.ScheduleParams
;
import
com.aps.entity.basic.Entry
;
import
com.aps.entity.basic.*
;
import
com.aps.entity.basic.GlobalParam
;
import
com.aps.entity.basic.MachineOption
;
import
com.aps.entity.basic.Order
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -22,10 +20,13 @@ public class Initialization {
...
@@ -22,10 +20,13 @@ public class Initialization {
private
static
List
<
Order
>
orders
;
private
static
List
<
Order
>
orders
;
public
Initialization
(
GlobalParam
globalParam
,
List
<
Entry
>
allOperations
,
List
<
Order
>
_orders
)
{
private
static
List
<
Machine
>
machines
;
public
Initialization
(
GlobalParam
globalParam
,
List
<
Entry
>
allOperations
,
List
<
Order
>
_orders
,
List
<
Machine
>
_machines
)
{
Initialization
.
allOperations
=
allOperations
;
Initialization
.
allOperations
=
allOperations
;
_globalParam
=
globalParam
;
_globalParam
=
globalParam
;
orders
=
_orders
;
orders
=
_orders
;
machines
=
_machines
;
}
}
/**
/**
* 预生成全局工序列表(按“订单0→订单1→…+订单内工序1→2→…”排序,分配GlobalOpId)
* 预生成全局工序列表(按“订单0→订单1→…+订单内工序1→2→…”排序,分配GlobalOpId)
...
@@ -59,7 +60,7 @@ int populationSize=param.getPopulationSize();
...
@@ -59,7 +60,7 @@ int populationSize=param.getPopulationSize();
.
parallel
()
// 开启并行
.
parallel
()
// 开启并行
.
forEach
(
i
->
{
.
forEach
(
i
->
{
Chromosome
chromo
=
new
Chromosome
();
// 初始化染色体
Chromosome
chromo
=
new
Chromosome
();
// 初始化染色体
chromo
.
setInitMachines
(
ProductionDeepCopyUtil
.
deepCopyList
(
machines
));
chromo
.
setOrders
(
orders
);
chromo
.
setOrders
(
orders
);
// 全局选择(GS):按GlobalOpId顺序生成MachineSelection
// 全局选择(GS):按GlobalOpId顺序生成MachineSelection
if
(
i
<
gsCount
)
{
if
(
i
<
gsCount
)
{
...
...
src/main/java/com/aps/service/Algorithm/KpiCalculator.java
View file @
fc778193
package
com
.
aps
.
service
.
Algorithm
;
package
com
.
aps
.
service
.
Algorithm
;
import
com.aps.common.util.ProductionDeepCopyUtil
;
import
com.aps.entity.Algorithm.Chromosome
;
import
com.aps.entity.Algorithm.Chromosome
;
import
com.aps.entity.Algorithm.GAScheduleResult
;
import
com.aps.entity.Algorithm.GAScheduleResult
;
import
com.aps.entity.basic.Machine
;
import
com.aps.entity.basic.Machine
;
...
@@ -128,7 +129,7 @@ public class KpiCalculator {
...
@@ -128,7 +129,7 @@ public class KpiCalculator {
private
void
calculateMachine
()
{
private
void
calculateMachine
()
{
// 按设备ID分组工序列表(对应C# GroupBy + ToList)
// 按设备ID分组工序列表(对应C# GroupBy + ToList)
List
<
GAScheduleResult
>
list
=
chromosome
.
getResult
();
List
<
GAScheduleResult
>
list
=
chromosome
.
getResult
()
;
Map
<
Long
,
List
<
GAScheduleResult
>>
machineTasks
=
list
.
stream
()
Map
<
Long
,
List
<
GAScheduleResult
>>
machineTasks
=
list
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
GAScheduleResult:
:
getMachineId
));
.
collect
(
Collectors
.
groupingBy
(
GAScheduleResult:
:
getMachineId
));
...
...
src/main/java/com/aps/service/Algorithm/ScheduleOperationService.java
View file @
fc778193
...
@@ -27,55 +27,83 @@ public class ScheduleOperationService {
...
@@ -27,55 +27,83 @@ public class ScheduleOperationService {
/**
/**
* 移动工序方法
* 移动工序方法
* @param chromosome 染色体对象
* @param chromosome 染色体对象
* @param opId 工序ID
* @param opId 工序ID
* @param newStartTime 新开始时间
* @param newStartTime 新开始时间
* @param newMachineId 新设备ID
* @param newMachineId 新设备ID
*/
*/
public
void
moveOperation
(
Chromosome
chromosome
,
int
opId
,
int
newStartTime
,
public
void
moveOperation
(
Chromosome
chromosome
,
List
<
Integer
>
opIds
,
int
newStartTime
,
Long
newMachineId
,
GlobalParam
globalParam
)
{
Long
newMachineId
,
GlobalParam
globalParam
)
{
List
<
Entry
>
allOperations
=
chromosome
.
getAllOperations
();
List
<
Entry
>
allOperations
=
chromosome
.
getAllOperations
();
// 获取目标结果和工序
GAScheduleResult
targetResult
=
chromosome
.
getResult
().
stream
()
.
filter
(
r
->
r
.
getOperationId
()
==
opId
)
.
findFirst
()
.
orElseThrow
(()
->
new
NoSuchElementException
(
"Operation not found: "
+
opId
));
Entry
targetOp
=
allOperations
.
stream
()
Map
<
Integer
,
Integer
>
opTimeMap
=
chromosome
.
getResult
().
stream
()
.
filter
(
o
->
o
.
getId
()
==
opId
)
.
collect
(
Collectors
.
toMap
(
.
findFirst
()
GAScheduleResult:
:
getOperationId
,
.
orElseThrow
(()
->
new
NoSuchElementException
(
"Operation not found: "
+
opId
));
r
->
r
.
getStartTime
()
));
int
machineOptionIndex
=
targetOp
.
getMachineOptions
().
stream
()
for
(
Integer
opId:
opIds
)
{
.
map
(
MachineOption:
:
getMachineId
)
.
collect
(
Collectors
.
toList
())
.
indexOf
(
newMachineId
)
+
1
;
if
(
machineOptionIndex
==
0
)
{
throw
new
NoSuchElementException
(
"Machine not found: "
+
newMachineId
);
}
// 设置约束
// 获取目标结果和工序
targetResult
.
setDesignatedStartTime
(
newStartTime
);
GAScheduleResult
targetResult
=
chromosome
.
getResult
().
stream
()
targetResult
.
setForcedMachineId
(
newMachineId
);
.
filter
(
r
->
r
.
getOperationId
()
==
opId
)
.
findFirst
()
.
orElseThrow
(()
->
new
NoSuchElementException
(
"Operation not found: "
+
opId
));
// 更新设备选择序列
Entry
targetOp
=
allOperations
.
stream
()
int
globalOpIndex
=
chromosome
.
getGlobalOpList
().
stream
()
.
filter
(
o
->
o
.
getId
()
==
opId
)
.
filter
(
g
->
g
.
getOp
().
getId
()
==
opId
)
.
findFirst
()
.
findFirst
()
.
orElseThrow
(()
->
new
NoSuchElementException
(
"Operation not found: "
+
opId
));
.
map
(
GlobalOperationInfo:
:
getGlobalOpId
)
.
orElseThrow
(()
->
new
NoSuchElementException
(
"Global operation not found: "
+
opId
));
int
machineOptionIndex
=
targetOp
.
getMachineOptions
().
stream
()
.
map
(
MachineOption:
:
getMachineId
)
.
collect
(
Collectors
.
toList
())
.
indexOf
(
newMachineId
)
+
1
;
if
(
machineOptionIndex
==
0
)
{
throw
new
NoSuchElementException
(
"Machine not found: "
+
newMachineId
);
}
// 设置约束
targetResult
.
setDesignatedStartTime
(
newStartTime
);
targetResult
.
setForcedMachineId
(
newMachineId
);
// 更新设备选择序列
int
globalOpIndex
=
chromosome
.
getGlobalOpList
().
stream
()
.
filter
(
g
->
g
.
getOp
().
getId
()
==
opId
)
.
findFirst
()
.
map
(
GlobalOperationInfo:
:
getGlobalOpId
)
.
orElseThrow
(()
->
new
NoSuchElementException
(
"Global operation not found: "
+
opId
));
chromosome
.
getMachineSelection
().
set
(
globalOpIndex
,
machineOptionIndex
);
chromosome
.
getMachineSelection
().
set
(
globalOpIndex
,
machineOptionIndex
);
if
(
targetOp
.
getSequence
()==
1
)
{
opTimeMap
.
put
(
opId
,
newStartTime
);
}
else
{
Entry
targetOp1
=
allOperations
.
stream
()
.
filter
(
o
->
o
.
getGroupId
()
==
targetOp
.
getGroupId
()
&&
o
.
getSequence
()==
targetOp
.
getSequence
()-
1
)
.
findFirst
()
.
orElseThrow
(()
->
new
NoSuchElementException
(
"Operation not found: "
+
opId
));
GAScheduleResult
targetResult1
=
chromosome
.
getResult
().
stream
()
.
filter
(
r
->
r
.
getOperationId
()
==
targetOp1
.
getId
())
.
findFirst
()
.
orElseThrow
(()
->
new
NoSuchElementException
(
"Operation not found: "
+
opId
));
if
(
targetResult1
.
getStartTime
()<
newStartTime
)
{
opTimeMap
.
put
(
opId
,
newStartTime
);
}
else
{
opTimeMap
.
put
(
opId
,
targetResult1
.
getStartTime
()+
1
);
}
}
newStartTime
=
newStartTime
+(
int
)
targetResult
.
getProcessingTime
();
}
// 生成新的工序顺序
// 生成新的工序顺序
Map
<
Integer
,
Integer
>
opTimeMap
=
chromosome
.
getResult
().
stream
()
.
collect
(
Collectors
.
toMap
(
GAScheduleResult:
:
getOperationId
,
r
->
r
.
getOperationId
()
==
opId
?
newStartTime
:
r
.
getStartTime
()
));
List
<
Integer
>
operationSequencing
=
allOperations
.
stream
()
List
<
Integer
>
operationSequencing
=
allOperations
.
stream
()
.
sorted
((
op1
,
op2
)
->
{
.
sorted
((
op1
,
op2
)
->
{
...
@@ -96,7 +124,6 @@ public class ScheduleOperationService {
...
@@ -96,7 +124,6 @@ public class ScheduleOperationService {
}
}
public
void
SpiltOperation
(
Chromosome
chromosome
,
int
opId
,
Double
[]
splitCounts
,
GlobalParam
globalParam
)
public
void
SpiltOperation
(
Chromosome
chromosome
,
int
opId
,
Double
[]
splitCounts
,
GlobalParam
globalParam
)
{
{
List
<
Entry
>
allOperations
=
chromosome
.
getAllOperations
();
List
<
Entry
>
allOperations
=
chromosome
.
getAllOperations
();
...
@@ -693,9 +720,10 @@ public class ScheduleOperationService {
...
@@ -693,9 +720,10 @@ public class ScheduleOperationService {
public
void
redecode
(
Chromosome
chromosome
,
LocalDateTime
baseTime
,
GlobalParam
globalParam
)
public
void
redecode
(
Chromosome
chromosome
,
LocalDateTime
baseTime
,
GlobalParam
globalParam
)
{
{
MachineSchedulerService
machineScheduler
=
new
MachineSchedulerService
(
baseTime
);
MachineSchedulerService
machineScheduler
=
new
MachineSchedulerService
(
baseTime
);
chromosome
.
setMachines
(
chromosome
.
getInitMachines
());
GeneticDecoder
decoder
=
new
GeneticDecoder
(
globalParam
,
baseTime
,
chromosome
.
getInitMachines
(),
GeneticDecoder
decoder
=
new
GeneticDecoder
(
globalParam
,
baseTime
,
chromosome
.
getInitMachines
(),
chromosome
.
getOrders
(),
null
,
machineScheduler
,
chromosome
.
getOrderMaterials
());
chromosome
.
getOrders
(),
null
,
machineScheduler
,
chromosome
.
getOrderMaterials
());
chromosome
.
setMachines
(
chromosome
.
getInitMachines
());
chromosome
.
setResultOld
(
ProductionDeepCopyUtil
.
deepCopyList
(
chromosome
.
getResult
()));
chromosome
.
setResultOld
(
ProductionDeepCopyUtil
.
deepCopyList
(
chromosome
.
getResult
()));
chromosome
.
getResult
().
clear
();
chromosome
.
getResult
().
clear
();
...
...
src/main/java/com/aps/service/plan/PlanResultService.java
View file @
fc778193
...
@@ -301,6 +301,7 @@ order.setDueDate(LocalDateTime.of(2025, 12, 1,0,0,0));
...
@@ -301,6 +301,7 @@ order.setDueDate(LocalDateTime.of(2025, 12, 1,0,0,0));
public
Chromosome
execute2
(
String
SceneId
)
{
public
Chromosome
execute2
(
String
SceneId
)
{
try
{
try
{
SceneId
=
"6AF8001449FC4D20A3C9992EC24CBF05"
;
SceneId
=
"6AF8001449FC4D20A3C9992EC24CBF05"
;
ScheduleParams
param
=
new
ScheduleParams
();
ScheduleParams
param
=
new
ScheduleParams
();
param
.
setBaseTime
(
LocalDateTime
.
of
(
2025
,
11
,
1
,
0
,
0
,
0
));
param
.
setBaseTime
(
LocalDateTime
.
of
(
2025
,
11
,
1
,
0
,
0
,
0
));
...
@@ -325,7 +326,7 @@ order.setDueDate(LocalDateTime.of(2025, 12, 1,0,0,0));
...
@@ -325,7 +326,7 @@ order.setDueDate(LocalDateTime.of(2025, 12, 1,0,0,0));
// 3. 构建订单-工序数据
// 3. 构建订单-工序数据
List
<
Order
>
orders
=
InitOrder
(
ProdLaunchOrders
);
List
<
Order
>
orders
=
InitOrder
(
ProdLaunchOrders
);
List
<
Material
>
Materials
=
InitMaterial
();
List
<
Material
>
Materials
=
null
;
//
InitMaterial();
Map
<
Integer
,
Object
>
list
=
InitEntrys
(
SceneId
,
ProdEquipments
,
orders
);
Map
<
Integer
,
Object
>
list
=
InitEntrys
(
SceneId
,
ProdEquipments
,
orders
);
List
<
Entry
>
entrys
=(
List
<
Entry
>)
list
.
get
(
1
);
List
<
Entry
>
entrys
=(
List
<
Entry
>)
list
.
get
(
1
);
...
@@ -404,7 +405,7 @@ order.setDueDate(LocalDateTime.of(2025, 12, 1,0,0,0));
...
@@ -404,7 +405,7 @@ order.setDueDate(LocalDateTime.of(2025, 12, 1,0,0,0));
return
chromosome
;
return
chromosome
;
}
}
public
Chromosome
Move
(
String
SceneId
,
int
opId
,
LocalDateTime
newStartTime
,
public
Chromosome
Move
(
String
SceneId
,
List
<
Integer
>
opId
,
LocalDateTime
newStartTime
,
Long
newMachineId
)
{
Long
newMachineId
)
{
...
@@ -604,7 +605,7 @@ order.setDueDate(LocalDateTime.of(2025, 12, 1,0,0,0));
...
@@ -604,7 +605,7 @@ order.setDueDate(LocalDateTime.of(2025, 12, 1,0,0,0));
public
void
WriteScheduleSummary
(
Chromosome
schedule
)
{
public
void
WriteScheduleSummary
(
Chromosome
schedule
)
{
// 写入日志
// 写入日志
FileHelper
.
writeLogFile
(
String
.
format
(
"\n=== Schedule Summary === %f"
,
schedule
.
getFitness
())
);
FileHelper
.
writeLogFile
(
"\n=== Schedule Summary === "
);
FileHelper
.
writeLogFile
(
String
.
format
(
"Operation: %s"
,
schedule
.
getOperationStr
()));
FileHelper
.
writeLogFile
(
String
.
format
(
"Operation: %s"
,
schedule
.
getOperationStr
()));
FileHelper
.
writeLogFile
(
String
.
format
(
"Makespan: %f minutes"
,
schedule
.
getMakespan
()));
FileHelper
.
writeLogFile
(
String
.
format
(
"Makespan: %f minutes"
,
schedule
.
getMakespan
()));
FileHelper
.
writeLogFile
(
String
.
format
(
"Total Tardiness: %f hours"
,
schedule
.
getDelayTime
()));
FileHelper
.
writeLogFile
(
String
.
format
(
"Total Tardiness: %f hours"
,
schedule
.
getDelayTime
()));
...
...
src/test/java/com/aps/demo/PlanResultServiceTest.java
View file @
fc778193
...
@@ -26,9 +26,14 @@ public class PlanResultServiceTest {
...
@@ -26,9 +26,14 @@ public class PlanResultServiceTest {
@Test
@Test
public
void
testExecute
()
{
public
void
testExecute
()
{
LocalDateTime
t
=
LocalDateTime
.
of
(
2025
,
10
,
31
,
6
,
51
,
11
);
// planResultService.execute2(""
);
planResultService
.
Move
(
"86ED02C9BAB54BB6B8F413938A3F2869"
,
1
,
t
,
3402L
);
LocalDateTime
t
=
LocalDateTime
.
of
(
2025
,
11
,
15
,
6
,
51
,
11
);
List
<
Integer
>
opids
=
new
ArrayList
<>();
opids
.
add
(
1
);
planResultService
.
Move
(
"B571EF6682DB463AB2977B1055A74112"
,
opids
,
t
,
3403L
);
// planResultService.Move("B571EF6682DB463AB2977B1055A74112",2,t,3243L);
}
}
@Test
@Test
...
...
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