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
cf8215e1
Commit
cf8215e1
authored
May 21, 2026
by
Tong Li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优先级
parent
3d3915bf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
77 additions
and
505 deletions
+77
-505
aps.log
logs/aps.log
+66
-48
aps_error.log
logs/aps_error.log
+2
-450
Initialization.java
src/main/java/com/aps/service/Algorithm/Initialization.java
+5
-5
MachineCalculator.java
...ain/java/com/aps/service/Algorithm/MachineCalculator.java
+1
-0
application.yml
src/main/resources/application.yml
+1
-1
PlanResultServiceTest.java
src/test/java/com/aps/demo/PlanResultServiceTest.java
+2
-1
No files found.
logs/aps.log
View file @
cf8215e1
This diff is collapsed.
Click to expand it.
logs/aps_error.log
View file @
cf8215e1
This diff is collapsed.
Click to expand it.
src/main/java/com/aps/service/Algorithm/Initialization.java
View file @
cf8215e1
...
@@ -562,7 +562,7 @@ public class Initialization {
...
@@ -562,7 +562,7 @@ public class Initialization {
}
}
boolean
considerSequence
=
rnd
.
nextBoolean
();
boolean
considerSequence
=
rnd
.
nextBoolean
();
if
(
considerSequence
)
{
if
(
considerSequence
)
{
sortedOps
.
sort
(
Comparator
.
comparing
((
Entry
op
)
->
-
op
.
getPriority
())
sortedOps
.
sort
(
Comparator
.
comparing
((
Entry
op
)
->
op
.
getPriority
())
.
thenComparing
(
Entry:
:
getSequence
)
.
thenComparing
(
Entry:
:
getSequence
)
.
thenComparing
(
op
->
op
.
getProductId
()
!=
null
?
op
.
getProductId
()
:
""
)
// 相同物料排在一起,减少换型
.
thenComparing
(
op
->
op
.
getProductId
()
!=
null
?
op
.
getProductId
()
:
""
)
// 相同物料排在一起,减少换型
.
thenComparing
(
op
->
{
.
thenComparing
(
op
->
{
...
@@ -571,7 +571,7 @@ public class Initialization {
...
@@ -571,7 +571,7 @@ public class Initialization {
})
})
.
thenComparing
(
randomIds:
:
get
));
.
thenComparing
(
randomIds:
:
get
));
}
else
{
}
else
{
sortedOps
.
sort
(
Comparator
.
comparing
((
Entry
op
)
->
-
op
.
getPriority
())
sortedOps
.
sort
(
Comparator
.
comparing
((
Entry
op
)
->
op
.
getPriority
())
.
thenComparing
(
op
->
op
.
getProductId
()
!=
null
?
op
.
getProductId
()
:
""
)
// 相同物料排在一起,减少换型
.
thenComparing
(
op
->
op
.
getProductId
()
!=
null
?
op
.
getProductId
()
:
""
)
// 相同物料排在一起,减少换型
.
thenComparing
(
op
->
{
.
thenComparing
(
op
->
{
Order
order
=
orderMap
.
get
(
op
.
getGroupId
());
Order
order
=
orderMap
.
get
(
op
.
getGroupId
());
...
@@ -664,7 +664,7 @@ public class Initialization {
...
@@ -664,7 +664,7 @@ public class Initialization {
randomIds
.
put
(
allOperations
.
get
(
i
),
indices
.
get
(
i
));
randomIds
.
put
(
allOperations
.
get
(
i
),
indices
.
get
(
i
));
}
}
sortedOps
.
sort
(
Comparator
.
comparing
((
Entry
op
)
->
-
op
.
getPriority
())
sortedOps
.
sort
(
Comparator
.
comparing
((
Entry
op
)
->
op
.
getPriority
())
.
thenComparing
(
op
->
op
.
getProductId
()
!=
null
?
op
.
getProductId
()
:
""
)
.
thenComparing
(
op
->
op
.
getProductId
()
!=
null
?
op
.
getProductId
()
:
""
)
.
thenComparing
(
op
->
op
.
getMachineOptions
().
get
(
0
).
getProcessingTime
()
*
op
.
getQuantity
())
.
thenComparing
(
op
->
op
.
getMachineOptions
().
get
(
0
).
getProcessingTime
()
*
op
.
getQuantity
())
.
thenComparing
(
randomIds:
:
get
));
.
thenComparing
(
randomIds:
:
get
));
...
@@ -890,7 +890,7 @@ public class Initialization {
...
@@ -890,7 +890,7 @@ public class Initialization {
}
}
}
}
sortedOps
.
sort
(
Comparator
.
comparing
((
Entry
op
)
->
-
op
.
getPriority
())
sortedOps
.
sort
(
Comparator
.
comparing
((
Entry
op
)
->
op
.
getPriority
())
.
thenComparing
((
Entry
op
)
->
{
.
thenComparing
((
Entry
op
)
->
{
if
(
op
.
getMachineOptions
()
==
null
||
op
.
getMachineOptions
().
isEmpty
())
{
if
(
op
.
getMachineOptions
()
==
null
||
op
.
getMachineOptions
().
isEmpty
())
{
return
0.0
;
return
0.0
;
...
@@ -964,7 +964,7 @@ public class Initialization {
...
@@ -964,7 +964,7 @@ public class Initialization {
for
(
int
i
=
0
;
i
<
allOperations
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
allOperations
.
size
();
i
++)
{
randomIds
.
put
(
allOperations
.
get
(
i
),
indices
.
get
(
i
));
randomIds
.
put
(
allOperations
.
get
(
i
),
indices
.
get
(
i
));
}
}
sortedOps
.
sort
(
Comparator
.
comparing
((
Entry
op
)
->
-
op
.
getPriority
())
sortedOps
.
sort
(
Comparator
.
comparing
((
Entry
op
)
->
op
.
getPriority
())
.
thenComparing
(
op
->
op
.
getProductId
()
!=
null
?
op
.
getProductId
()
:
""
)
// 相同物料排在一起,减少换型
.
thenComparing
(
op
->
op
.
getProductId
()
!=
null
?
op
.
getProductId
()
:
""
)
// 相同物料排在一起,减少换型
.
thenComparing
(
randomIds:
:
get
));
.
thenComparing
(
randomIds:
:
get
));
...
...
src/main/java/com/aps/service/Algorithm/MachineCalculator.java
View file @
cf8215e1
...
@@ -95,6 +95,7 @@ public class MachineCalculator {
...
@@ -95,6 +95,7 @@ public class MachineCalculator {
int
remainingTime
=
processingTime
;
int
remainingTime
=
processingTime
;
final
LocalDateTime
processSearchEnd
=
cursor
;
final
LocalDateTime
processSearchEnd
=
cursor
;
List
<
TimeSegment
>
processSegments
=
machine
.
getAvailability
().
stream
()
List
<
TimeSegment
>
processSegments
=
machine
.
getAvailability
().
stream
()
.
filter
(
slot
->
!
slot
.
isUsed
())
.
filter
(
slot
->
!
slot
.
isUsed
())
.
filter
(
slot
->
slot
.
getType
()
!=
SegmentType
.
MAINTENANCE
)
.
filter
(
slot
->
slot
.
getType
()
!=
SegmentType
.
MAINTENANCE
)
...
...
src/main/resources/application.yml
View file @
cf8215e1
...
@@ -58,7 +58,7 @@ spring:
...
@@ -58,7 +58,7 @@ spring:
# url: jdbc:oracle:thin:@//39.100.77.7:1522/ORCLPDB1 # ORCL为你的Oracle实例名
# url: jdbc:oracle:thin:@//39.100.77.7:1522/ORCLPDB1 # ORCL为你的Oracle实例名
# username: mes # 替换为你的Oracle用户名
# username: mes # 替换为你的Oracle用户名
# password: root_mes123456 # 替换为你的Oracle密码
# password: root_mes123456 # 替换为你的Oracle密码
url
:
jdbc:oracle:thin:@//39.100.78.207:7002/ORCLPDB1
# ORCL为你的Oracle实例名
url
:
jdbc:oracle:thin:@//39.100.78.207:7002/ORCLPDB1
# ORCL为你的Oracle实例名
7005
username
:
mes
# 替换为你的Oracle用户名
username
:
mes
# 替换为你的Oracle用户名
password
:
root_mes123456
# 替换为你的Oracle密码
password
:
root_mes123456
# 替换为你的Oracle密码
# sqlserver:
# sqlserver:
...
...
src/test/java/com/aps/demo/PlanResultServiceTest.java
View file @
cf8215e1
...
@@ -41,7 +41,8 @@ public class PlanResultServiceTest {
...
@@ -41,7 +41,8 @@ public class PlanResultServiceTest {
// sortService.test1();
// sortService.test1();
// nsgaiiUtils.Test();
// nsgaiiUtils.Test();
planResultService
.
execute2
(
"64E64F6B68094AF38CEDC418630C3CC2"
);
//2000
// planResultService.execute2("64E64F6B68094AF38CEDC418630C3CC2");//2000
planResultService
.
execute2
(
"5C93A528725F40228889FCFC1E040B55"
);
//2000
// planResultService.execute2("15210B13B88A453F8B84AAC7F16C7541");//2000
// 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