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
c0f28f4f
Commit
c0f28f4f
authored
Jan 23, 2026
by
DESKTOP-VKRD9QF\Administration
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://39.100.78.207:1213/tongli/hyh.apsj
parents
5b593fe9
9e01001a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
1 deletion
+29
-1
TimeSegment.java
src/main/java/com/aps/entity/basic/TimeSegment.java
+10
-0
GeneticDecoder.java
src/main/java/com/aps/service/Algorithm/GeneticDecoder.java
+18
-1
MachineCalculator.java
...ain/java/com/aps/service/Algorithm/MachineCalculator.java
+1
-0
No files found.
src/main/java/com/aps/entity/basic/TimeSegment.java
View file @
c0f28f4f
...
@@ -3,6 +3,7 @@ package com.aps.entity.basic;
...
@@ -3,6 +3,7 @@ package com.aps.entity.basic;
import
lombok.Data
;
import
lombok.Data
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.time.temporal.ChronoUnit
;
import
java.util.UUID
;
import
java.util.UUID
;
/**
/**
...
@@ -29,7 +30,16 @@ public class TimeSegment {
...
@@ -29,7 +30,16 @@ public class TimeSegment {
}
}
public
int
getProcessingTime
()
{
return
calProcessingTime
();
// 绝对处理时间(分钟)
}
public
int
calProcessingTime
()
{
// 计算单个片段的有效时长(分钟),并乘以效率值
double
segmentSeconds
=
ChronoUnit
.
SECONDS
.
between
(
this
.
start
,
this
.
end
)*
this
.
efficiency
;
return
(
int
)
segmentSeconds
;
}
// 全参构造(按需添加)
// 全参构造(按需添加)
...
...
src/main/java/com/aps/service/Algorithm/GeneticDecoder.java
View file @
c0f28f4f
...
@@ -519,8 +519,25 @@ if(finishedOrder==null||finishedOrder.size()==0)
...
@@ -519,8 +519,25 @@ if(finishedOrder==null||finishedOrder.size()==0)
}
}
}
}
int
processingTimeTotal1
=
0
;
processingTimeTotal1
=(
int
)
geneDetails
.
stream
().
filter
(
t
->
t
.
getUsedSegment
()==
null
).
mapToDouble
(
ScheduleResultDetail:
:
getProcessingTime
)
// 替换为实际字段名
.
sum
();
List
<
TimeSegment
>
UsedSegments
=
geneDetails
.
stream
().
filter
(
t
->
t
.
getUsedSegment
()!=
null
)
.
map
(
ScheduleResultDetail:
:
getUsedSegment
).
flatMap
(
List:
:
stream
)
// 收集为最终的 List
.
collect
(
Collectors
.
toList
());
if
(
UsedSegments
!=
null
&&
UsedSegments
.
size
()>
0
)
{
processingTimeTotal1
+=(
int
)
UsedSegments
.
stream
().
mapToDouble
(
TimeSegment:
:
getProcessingTime
)
// 替换为实际字段名
.
sum
();
}
result
.
setProcessingTime
(
processingTimeTotal1
);
result
.
setProcessingTime
(
processingTimeTotal
);
result
.
setGeneDetails
(
geneDetails
);
result
.
setGeneDetails
(
geneDetails
);
// System.out.println("huanxingshijian="+result.getChangeOverTime()+"-------------------"+result.getOrderId()+"--------"+result.getExecId()+"---------"+prev.getOrderId()+"--------"+prev.getExecId());
// System.out.println("huanxingshijian="+result.getChangeOverTime()+"-------------------"+result.getOrderId()+"--------"+result.getExecId()+"---------"+prev.getOrderId()+"--------"+prev.getExecId());
...
...
src/main/java/com/aps/service/Algorithm/MachineCalculator.java
View file @
c0f28f4f
...
@@ -310,6 +310,7 @@ public class MachineCalculator {
...
@@ -310,6 +310,7 @@ public class MachineCalculator {
time
.
setEndTime
((
int
)
ChronoUnit
.
SECONDS
.
between
(
baseTime
,
endCandidate
));
time
.
setEndTime
((
int
)
ChronoUnit
.
SECONDS
.
between
(
baseTime
,
endCandidate
));
time
.
setOneTime
(
oneTime
);
time
.
setOneTime
(
oneTime
);
time
.
setQuantity
(
quantity
);
time
.
setQuantity
(
quantity
);
times
.
add
(
time
);
times
.
add
(
time
);
CopyOnWriteArrayList
<
TimeSegment
>
usedSegments
=
RemoveMachineAvailable
(
machine
,
time
,
slot
);
CopyOnWriteArrayList
<
TimeSegment
>
usedSegments
=
RemoveMachineAvailable
(
machine
,
time
,
slot
);
...
...
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