Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
traffic-signal-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
signal
traffic-signal-platform
Commits
68bd44da
Commit
68bd44da
authored
Oct 26, 2023
by
hanbing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[update] 干线评价,增加排队长度指标
parent
51b67285
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
4 deletions
+36
-4
MainlineEvaluateServiceImpl.java
...t/wanji/opt/service/impl/MainlineEvaluateServiceImpl.java
+36
-4
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/service/impl/MainlineEvaluateServiceImpl.java
View file @
68bd44da
...
...
@@ -1019,6 +1019,12 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
.
average
()
.
orElse
(
0.0
);
dirValue
=
(
int
)
Math
.
round
(
average
);
}
else
if
(
Objects
.
equals
(
metricName
,
StrategyAndMetricsEnum
.
Metrics
.
MAX_QUEUE_LENGTH
.
getDescription
()))
{
double
max
=
crossDirDataHistPOList
.
stream
()
.
mapToDouble
(
CrossDirDataHistPO:
:
getQueueLength
)
.
max
()
.
orElse
(
0.0
);
dirValue
=
(
int
)
Math
.
round
(
max
);
}
return
dirValue
;
}
...
...
@@ -1349,6 +1355,26 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
int
value
=
(
int
)
sumOfAverages
;
curveElement
.
setValue
(
value
);
curveElementList
.
add
(
curveElement
);
}
}
else
if
(
Objects
.
equals
(
metricName
,
StrategyAndMetricsEnum
.
Metrics
.
MAX_QUEUE_LENGTH
.
getDescription
()))
{
for
(
String
hourMinute
:
timeArray
)
{
MainlineSchemeEvaluateVO
.
CurveElement
curveElement
=
new
MainlineSchemeEvaluateVO
.
CurveElement
();
curveElement
.
setMetricTime
(
hourMinute
);
List
<
CrossDirDataHistPO
>
crossDirDataHistPOList
=
groupedByTime
.
get
(
hourMinute
);
double
sumOfMax
=
crossDirDataHistPOList
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
CrossDirDataHistPO:
:
getCrossId
))
.
entrySet
().
stream
()
.
mapToDouble
(
entry
->
entry
.
getValue
().
stream
()
.
mapToDouble
(
CrossDirDataHistPO:
:
getQueueLength
)
.
max
()
.
orElse
(
0.0
))
.
max
().
orElse
(
0.0
);
int
value
=
(
int
)
sumOfMax
;
curveElement
.
setValue
(
value
);
curveElementList
.
add
(
curveElement
);
}
...
...
@@ -1640,6 +1666,11 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
metric
.
setIsShown
(
0
);
res
.
add
(
metric
);
MainlineSchemeAnalysisVO
.
Metric
metric2
=
new
MainlineSchemeAnalysisVO
.
Metric
();
metric2
.
setMetricName
(
StrategyAndMetricsEnum
.
Metrics
.
MAX_QUEUE_LENGTH
.
getDescription
());
metric2
.
setIsShown
(
1
);
res
.
add
(
metric2
);
MainlineSchemeAnalysisVO
.
Metric
metric1
=
new
MainlineSchemeAnalysisVO
.
Metric
();
metric1
.
setMetricName
(
StrategyAndMetricsEnum
.
Metrics
.
UNCOORDINATE_PHASE_QUEUE
.
getDescription
());
metric1
.
setIsShown
(
0
);
...
...
@@ -1658,6 +1689,11 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
metric2
.
setIsShown
(
0
);
res
.
add
(
metric2
);
MainlineSchemeAnalysisVO
.
Metric
metric8
=
new
MainlineSchemeAnalysisVO
.
Metric
();
metric8
.
setMetricName
(
StrategyAndMetricsEnum
.
Metrics
.
MAX_QUEUE_LENGTH
.
getDescription
());
metric8
.
setIsShown
(
1
);
res
.
add
(
metric8
);
MainlineSchemeAnalysisVO
.
Metric
metric3
=
new
MainlineSchemeAnalysisVO
.
Metric
();
metric3
.
setMetricName
(
StrategyAndMetricsEnum
.
Metrics
.
GREEN_LIGHT_EFFICIENCY
.
getDescription
());
metric3
.
setIsShown
(
1
);
...
...
@@ -1693,10 +1729,6 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
List
<
GreenwaveHistPO
>
filteredList
,
Map
<
String
,
LineSchemeDTO
>
lineSchemeBuffer
,
int
boStartTimeStamp
,
int
boEndTimeStamp
,
Date
boStartTime
,
Date
boEndTime
)
{
List
<
CrossDataHistPO
>
baseCrossDataHistPOList
=
crossDataHistMapper
.
selectByStartEnd
(
boStartTimeStamp
,
boEndTimeStamp
);
List
<
GreenwaveCrossPO
>
baseGreenwaveCrossPOList
=
greenwaveCrossMapper
.
selectAll
();
List
<
BaseCrossInfoPO
>
baseCrossInfoPOList
=
baseCrossInfoMapper
.
selectAll
();
Set
<
String
>
qualifiedSet
=
new
HashSet
<>();
Set
<
String
>
notQualifiedSet
=
new
HashSet
<>();
...
...
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