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
299c0aa2
Commit
299c0aa2
authored
Oct 19, 2023
by
hanbing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[update] 信号优化,干线方案分析-评价结果数量修改
parent
62ab87ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
19 deletions
+20
-19
MainlineEvaluateServiceImpl.java
...t/wanji/opt/service/impl/MainlineEvaluateServiceImpl.java
+20
-19
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/service/impl/MainlineEvaluateServiceImpl.java
View file @
299c0aa2
...
@@ -686,10 +686,10 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
...
@@ -686,10 +686,10 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
res
.
setSceneData
(
calcSceneData
(
filteredList
));
res
.
setSceneData
(
calcSceneData
(
filteredList
));
fillLineSchemeBuffer
(
filteredList
,
lineSchemeBuffer
);
fillLineSchemeBuffer
(
filteredList
,
lineSchemeBuffer
);
res
.
setCrossData
(
calcCrossData
(
filteredList
));
res
.
setCrossData
(
calcCrossData
(
filteredList
));
res
.
setEvaluateData
(
calcEvaluateData
(
filteredList
,
lineSchemeBuffer
,
poStartTimeStamp
,
poEndTimeStamp
));
// 时段合并
// 时段合并
mergeLineSchemeBuffer
(
lineSchemeBuffer
,
mainlineName
);
mergeLineSchemeBuffer
(
lineSchemeBuffer
,
mainlineName
);
res
.
setGreenwaveData
(
buildGreenwaveData
(
lineSchemeBuffer
));
res
.
setEvaluateData
(
calcEvaluateData
(
filteredList
,
lineSchemeBuffer
,
poStartTimeStamp
,
poEndTimeStamp
));
res
.
setGreenwaveData
(
buildGreenwaveData
(
lineSchemeBuffer
));
return
res
;
return
res
;
}
}
...
@@ -1609,8 +1609,8 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
...
@@ -1609,8 +1609,8 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
List
<
GreenwaveCrossPO
>
baseGreenwaveCrossPOList
=
greenwaveCrossMapper
.
selectAll
();
List
<
GreenwaveCrossPO
>
baseGreenwaveCrossPOList
=
greenwaveCrossMapper
.
selectAll
();
List
<
BaseCrossInfoPO
>
baseCrossInfoPOList
=
baseCrossInfoMapper
.
selectAll
();
List
<
BaseCrossInfoPO
>
baseCrossInfoPOList
=
baseCrossInfoMapper
.
selectAll
();
int
qualified
=
0
;
Set
<
String
>
qualifiedSet
=
new
HashSet
<>()
;
int
notQualified
=
0
;
Set
<
String
>
notQualifiedSet
=
new
HashSet
<>()
;
for
(
GreenwaveHistPO
greenwaveHistPO
:
filteredList
)
{
for
(
GreenwaveHistPO
greenwaveHistPO
:
filteredList
)
{
Double
noparkPassRate
=
greenwaveHistPO
.
getNoparkPassRate
();
Double
noparkPassRate
=
greenwaveHistPO
.
getNoparkPassRate
();
Double
cordReliability
=
greenwaveHistPO
.
getCordReliability
();
Double
cordReliability
=
greenwaveHistPO
.
getCordReliability
();
...
@@ -1656,61 +1656,62 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
...
@@ -1656,61 +1656,62 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
.
orElse
(
0.0
);
.
orElse
(
0.0
);
Integer
dir
=
greenwaveHistPO
.
getDir
();
Integer
dir
=
greenwaveHistPO
.
getDir
();
if
(
dir
==
0
||
dir
==
1
)
{
// 单向绿波
if
(
dir
==
0
||
dir
==
1
)
{
// 单向绿波
if
(
Objects
.
equals
(
strategyCode
,
StrategyAndMetricsEnum
.
Strategy
.
LINE_EFFICIENCY
.
getCode
()))
{
if
(
Objects
.
equals
(
strategyCode
,
StrategyAndMetricsEnum
.
Strategy
.
LINE_EFFICIENCY
.
getCode
()))
{
if
(
saturation
<
0.8
)
{
if
(
saturation
<
0.8
)
{
if
(
noparkPassRate
>
0.8
&&
cordReliability
>
0.7
)
{
if
(
noparkPassRate
>
0.8
&&
cordReliability
>
0.7
)
{
// 协调不停车通过率需大于80%,并且协调方案可靠性需大于70%
// 协调不停车通过率需大于80%,并且协调方案可靠性需大于70%
qualified
++
;
qualified
Set
.
add
(
matchingKey
)
;
}
else
if
(
uncoordinatePhaseQueue
<
0.5
)
{
}
else
if
(
uncoordinatePhaseQueue
<
0.5
)
{
// 如果以上不满足,则非协调相位二次排队需小于50%
// 如果以上不满足,则非协调相位二次排队需小于50%
qualified
++
;
qualified
Set
.
add
(
matchingKey
)
;
}
else
{
}
else
{
notQualified
++
;
notQualified
Set
.
add
(
matchingKey
)
;
}
}
}
else
{
}
else
{
// 协调方案可靠性需大于70%
// 协调方案可靠性需大于70%
if
(
cordReliability
>
0.7
)
{
if
(
cordReliability
>
0.7
)
{
qualified
++
;
qualified
Set
.
add
(
matchingKey
)
;
}
else
{
}
else
{
notQualified
++
;
notQualified
Set
.
add
(
matchingKey
)
;
}
}
}
}
}
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%
qualified
++
;
qualified
Set
.
add
(
matchingKey
)
;
}
else
if
(
uncoordinatePhaseQueue
<
1.0
)
{
}
else
if
(
uncoordinatePhaseQueue
<
1.0
)
{
// 如果以上不满足,则非协调相位二次排队需小于100%
// 如果以上不满足,则非协调相位二次排队需小于100%
qualified
++
;
qualified
Set
.
add
(
matchingKey
)
;
}
else
{
}
else
{
notQualified
++
;
notQualified
Set
.
add
(
matchingKey
)
;
}
}
}
}
}
else
{
// 双向绿波
}
else
{
// 双向绿波
if
(
Objects
.
equals
(
strategyCode
,
StrategyAndMetricsEnum
.
Strategy
.
LINE_EFFICIENCY
.
getCode
()))
{
if
(
Objects
.
equals
(
strategyCode
,
StrategyAndMetricsEnum
.
Strategy
.
LINE_EFFICIENCY
.
getCode
()))
{
// 协调不停车通过率需大于50%,并且协调方案可靠性需大于70%
// 协调不停车通过率需大于50%,并且协调方案可靠性需大于70%
if
(
noparkPassRate
>
0.5
&&
cordReliability
>
0.7
)
{
if
(
noparkPassRate
>
0.5
&&
cordReliability
>
0.7
)
{
qualified
++
;
qualified
Set
.
add
(
matchingKey
)
;
}
else
{
}
else
{
notQualified
++
;
notQualified
Set
.
add
(
matchingKey
)
;
}
}
}
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%
qualified
++
;
qualified
Set
.
add
(
matchingKey
)
;
}
else
if
(
uncoordinatePhaseQueue
<
1.0
)
{
}
else
if
(
uncoordinatePhaseQueue
<
1.0
)
{
// 如果以上不满足,则非协调相位二次排队需小于100%
// 如果以上不满足,则非协调相位二次排队需小于100%
qualified
++
;
qualified
Set
.
add
(
matchingKey
)
;
}
else
{
}
else
{
notQualified
++
;
notQualified
Set
.
add
(
matchingKey
)
;
}
}
}
}
}
}
}
}
List
<
String
>
res
=
new
ArrayList
<>();
List
<
String
>
res
=
new
ArrayList
<>();
res
.
add
(
"符合控制策略方案数 "
+
qualified
+
"个"
);
res
.
add
(
"符合控制策略方案数 "
+
qualified
Set
.
size
()
+
"个"
);
res
.
add
(
"不符合控制策略方案数 "
+
notQualified
+
"个"
);
res
.
add
(
"不符合控制策略方案数 "
+
notQualified
Set
.
size
()
+
"个"
);
return
res
;
return
res
;
}
}
...
...
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