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
4a293366
Commit
4a293366
authored
Dec 22, 2023
by
hanbing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[update] 调整干线方案评价结果展示内容
parent
2f881a93
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
21 deletions
+31
-21
MainlineEvaluateServiceImpl.java
...t/wanji/opt/service/impl/MainlineEvaluateServiceImpl.java
+31
-21
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/service/impl/MainlineEvaluateServiceImpl.java
View file @
4a293366
...
@@ -1151,6 +1151,7 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
...
@@ -1151,6 +1151,7 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
// 获取协调方向评价指标
// 获取协调方向评价指标
int
coordSpeed
=
0
;
int
coordSpeed
=
0
;
int
cordDelay
=
0
;
int
cordDelay
=
0
;
int
cordMaxQueue
=
0
;
if
(
dirName
.
contains
(
"非协调"
))
{
if
(
dirName
.
contains
(
"非协调"
))
{
String
dirStr1
=
split
[
1
];
String
dirStr1
=
split
[
1
];
String
[]
split1
=
dirStr1
.
split
(
"("
);
String
[]
split1
=
dirStr1
.
split
(
"("
);
...
@@ -1169,6 +1170,10 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
...
@@ -1169,6 +1170,10 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
.
mapToDouble
(
CrossDirDataHistPO:
:
getDelayTime
)
.
mapToDouble
(
CrossDirDataHistPO:
:
getDelayTime
)
.
average
()
.
average
()
.
orElse
(
0.0
));
.
orElse
(
0.0
));
cordMaxQueue
=
(
int
)
(
totalCrossDirDataHistPOList1
.
stream
()
.
mapToDouble
(
CrossDirDataHistPO:
:
getQueueLength
)
.
average
()
.
orElse
(
0.0
));
}
}
}
else
{
}
else
{
coordSpeed
=
(
int
)
(
totalCrossDirDataHistPOList
.
stream
()
coordSpeed
=
(
int
)
(
totalCrossDirDataHistPOList
.
stream
()
...
@@ -1179,6 +1184,10 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
...
@@ -1179,6 +1184,10 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
.
mapToDouble
(
CrossDirDataHistPO:
:
getDelayTime
)
.
mapToDouble
(
CrossDirDataHistPO:
:
getDelayTime
)
.
average
()
.
average
()
.
orElse
(
0.0
));
.
orElse
(
0.0
));
cordMaxQueue
=
(
int
)
(
totalCrossDirDataHistPOList
.
stream
()
.
mapToDouble
(
CrossDirDataHistPO:
:
getQueueLength
)
.
average
()
.
orElse
(
0.0
));
}
}
// 生成评价结果
// 生成评价结果
...
@@ -1192,24 +1201,18 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
...
@@ -1192,24 +1201,18 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
Integer
greenwaveDir
=
greenwaveInfoPO
.
getDir
();
Integer
greenwaveDir
=
greenwaveInfoPO
.
getDir
();
if
(
greenwaveDir
==
0
||
greenwaveDir
==
1
)
{
// 单向绿波
if
(
greenwaveDir
==
0
||
greenwaveDir
==
1
)
{
// 单向绿波
if
(
Objects
.
equals
(
strategyCode
,
StrategyAndMetricsEnum
.
Strategy
.
LINE_EFFICIENCY
.
getCode
()))
{
if
(
Objects
.
equals
(
strategyCode
,
StrategyAndMetricsEnum
.
Strategy
.
LINE_EFFICIENCY
.
getCode
()))
{
if
(
saturation
<
0.8
)
{
if
(
noparkPassRate
>
0.8
&&
cordReliability
>
0.7
)
{
if
(
noparkPassRate
>
0.8
&&
cordReliability
>
0.7
)
{
// 协调不停车通过率需大于80%,并且协调方案可靠性需大于70%
// 协调不停车通过率需大于80%,并且协调方案可靠性需大于70%
evaluateList
.
add
(
"该方案符合控制策略"
);
evaluateList
.
add
(
"该方案符合控制策略"
);
}
else
if
(
uncoordinatePhaseQueue
<
0.5
)
{
}
else
if
(
uncoordinatePhaseQueue
<
0.5
)
{
// 如果以上不满足,则非协调相位二次排队需小于50%
// 如果以上不满足,则非协调相位二次排队需小于50%
evaluateList
.
add
(
"该方案符合控制策略"
);
evaluateList
.
add
(
"该方案符合控制策略"
);
}
else
{
evaluateList
.
add
(
"该方案不符合控制策略"
);
}
}
else
{
}
else
{
// 协调方案可靠性需大于70%
evaluateList
.
add
(
"该方案不符合控制策略"
);
if
(
cordReliability
>
0.7
)
{
evaluateList
.
add
(
"该方案符合控制策略"
);
}
else
{
evaluateList
.
add
(
"该方案不符合控制策略"
);
}
}
}
evaluateList
.
add
(
"协调不停车通过率"
+
noparkPassRate
*
100
+
StrategyAndMetricsEnum
.
Metrics
.
NO_PARK_PASS_RATE
.
getUnit
());
evaluateList
.
add
(
"协调方案可靠性"
+
cordReliability
*
100
+
StrategyAndMetricsEnum
.
Metrics
.
CORD_RELIABILITY
.
getUnit
());
evaluateList
.
add
(
"非协调方向二次排队"
+
uncoordinatePhaseQueue
+
StrategyAndMetricsEnum
.
Metrics
.
UNCOORDINATE_PHASE_QUEUE
.
getUnit
());
}
else
if
(
Objects
.
equals
(
strategyCode
,
StrategyAndMetricsEnum
.
Strategy
.
LINE_BALANCE
.
getCode
()))
{
}
else
if
(
Objects
.
equals
(
strategyCode
,
StrategyAndMetricsEnum
.
Strategy
.
LINE_BALANCE
.
getCode
()))
{
if
(
cordQueueRatio
<
0.6
)
{
if
(
cordQueueRatio
<
0.6
)
{
// 协调路段排队空间占比需小于60%
// 协调路段排队空间占比需小于60%
...
@@ -1220,6 +1223,8 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
...
@@ -1220,6 +1223,8 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
}
else
{
}
else
{
evaluateList
.
add
(
"该方案不符合控制策略"
);
evaluateList
.
add
(
"该方案不符合控制策略"
);
}
}
evaluateList
.
add
(
"协调方向最大排队长度"
+
cordMaxQueue
+
StrategyAndMetricsEnum
.
Metrics
.
MAX_QUEUE_LENGTH
.
getUnit
());
evaluateList
.
add
(
"非协调方向二次排队"
+
uncoordinatePhaseQueue
+
StrategyAndMetricsEnum
.
Metrics
.
UNCOORDINATE_PHASE_QUEUE
.
getUnit
());
}
}
}
else
{
// 双向绿波
}
else
{
// 双向绿波
if
(
Objects
.
equals
(
strategyCode
,
StrategyAndMetricsEnum
.
Strategy
.
LINE_EFFICIENCY
.
getCode
()))
{
if
(
Objects
.
equals
(
strategyCode
,
StrategyAndMetricsEnum
.
Strategy
.
LINE_EFFICIENCY
.
getCode
()))
{
...
@@ -1229,6 +1234,8 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
...
@@ -1229,6 +1234,8 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
}
else
{
}
else
{
evaluateList
.
add
(
"该方案不符合控制策略"
);
evaluateList
.
add
(
"该方案不符合控制策略"
);
}
}
evaluateList
.
add
(
"协调不停车通过率"
+
noparkPassRate
*
100
+
StrategyAndMetricsEnum
.
Metrics
.
NO_PARK_PASS_RATE
.
getUnit
());
evaluateList
.
add
(
"协调方案可靠性"
+
cordReliability
*
100
+
StrategyAndMetricsEnum
.
Metrics
.
CORD_RELIABILITY
.
getUnit
());
}
else
if
(
Objects
.
equals
(
strategyCode
,
StrategyAndMetricsEnum
.
Strategy
.
LINE_BALANCE
.
getCode
()))
{
}
else
if
(
Objects
.
equals
(
strategyCode
,
StrategyAndMetricsEnum
.
Strategy
.
LINE_BALANCE
.
getCode
()))
{
if
(
cordQueueRatio
<
0.6
)
{
if
(
cordQueueRatio
<
0.6
)
{
// 协调路段排队空间占比需小于60%
// 协调路段排队空间占比需小于60%
...
@@ -1239,10 +1246,13 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
...
@@ -1239,10 +1246,13 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
}
else
{
}
else
{
evaluateList
.
add
(
"该方案不符合控制策略"
);
evaluateList
.
add
(
"该方案不符合控制策略"
);
}
}
evaluateList
.
add
(
"协调方向最大排队长度"
+
cordMaxQueue
+
StrategyAndMetricsEnum
.
Metrics
.
MAX_QUEUE_LENGTH
.
getUnit
());
evaluateList
.
add
(
"非协调方向二次排队"
+
uncoordinatePhaseQueue
+
StrategyAndMetricsEnum
.
Metrics
.
UNCOORDINATE_PHASE_QUEUE
.
getUnit
());
}
}
}
}
evaluateList
.
add
(
"协调方向平均速度"
+
coordSpeed
+
"km/h"
);
evaluateList
.
add
(
"协调方向平均速度"
+
coordSpeed
+
"km/h"
);
evaluateList
.
add
(
"协调方向平均延误"
+
cordDelay
+
"s"
);
evaluateList
.
add
(
"协调方向平均延误"
+
cordDelay
+
"s"
);
String
s
=
evaluateList
.
get
(
0
);
String
s
=
evaluateList
.
get
(
0
);
if
(
s
.
contains
(
"不符合"
))
{
if
(
s
.
contains
(
"不符合"
))
{
evaluateList
.
add
(
"协调效果差"
);
evaluateList
.
add
(
"协调效果差"
);
...
@@ -1671,16 +1681,16 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
...
@@ -1671,16 +1681,16 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
private
void
fillBalanceMetrics
(
List
<
MainlineSchemeAnalysisVO
.
Metric
>
res
,
String
strategyCode
)
{
private
void
fillBalanceMetrics
(
List
<
MainlineSchemeAnalysisVO
.
Metric
>
res
,
String
strategyCode
)
{
if
(
Objects
.
equals
(
strategyCode
,
StrategyAndMetricsEnum
.
Strategy
.
LINE_BALANCE
.
getCode
()))
{
if
(
Objects
.
equals
(
strategyCode
,
StrategyAndMetricsEnum
.
Strategy
.
LINE_BALANCE
.
getCode
()))
{
MainlineSchemeAnalysisVO
.
Metric
metric
=
new
MainlineSchemeAnalysisVO
.
Metric
();
metric
.
setMetricName
(
StrategyAndMetricsEnum
.
Metrics
.
CORD_QUEUE_RATIO
.
getDescription
());
metric
.
setIsShown
(
0
);
res
.
add
(
metric
);
MainlineSchemeAnalysisVO
.
Metric
metric2
=
new
MainlineSchemeAnalysisVO
.
Metric
();
MainlineSchemeAnalysisVO
.
Metric
metric2
=
new
MainlineSchemeAnalysisVO
.
Metric
();
metric2
.
setMetricName
(
StrategyAndMetricsEnum
.
Metrics
.
MAX_QUEUE_LENGTH
.
getDescription
());
metric2
.
setMetricName
(
StrategyAndMetricsEnum
.
Metrics
.
MAX_QUEUE_LENGTH
.
getDescription
());
metric2
.
setIsShown
(
1
);
metric2
.
setIsShown
(
1
);
res
.
add
(
metric2
);
res
.
add
(
metric2
);
MainlineSchemeAnalysisVO
.
Metric
metric
=
new
MainlineSchemeAnalysisVO
.
Metric
();
metric
.
setMetricName
(
StrategyAndMetricsEnum
.
Metrics
.
CORD_QUEUE_RATIO
.
getDescription
());
metric
.
setIsShown
(
0
);
res
.
add
(
metric
);
MainlineSchemeAnalysisVO
.
Metric
metric1
=
new
MainlineSchemeAnalysisVO
.
Metric
();
MainlineSchemeAnalysisVO
.
Metric
metric1
=
new
MainlineSchemeAnalysisVO
.
Metric
();
metric1
.
setMetricName
(
StrategyAndMetricsEnum
.
Metrics
.
UNCOORDINATE_PHASE_QUEUE
.
getDescription
());
metric1
.
setMetricName
(
StrategyAndMetricsEnum
.
Metrics
.
UNCOORDINATE_PHASE_QUEUE
.
getDescription
());
metric1
.
setIsShown
(
0
);
metric1
.
setIsShown
(
0
);
...
...
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