Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
ZHHT-IRN-BD-ANALYSIS
Project
Overview
Details
Activity
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
李凯旋
ZHHT-IRN-BD-ANALYSIS
Commits
a2f90c67
Commit
a2f90c67
authored
Jan 07, 2023
by
黄准
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
车道指标增加日志级别配置 方便现场调试程序
parent
3463a1c9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
LaneNormProcessFunction.java
.../java/com/zhht/irn/functions/LaneNormProcessFunction.java
+7
-9
No files found.
realtime/hologram-streaming/src/main/java/com/zhht/irn/functions/LaneNormProcessFunction.java
View file @
a2f90c67
...
...
@@ -235,12 +235,13 @@ public class LaneNormProcessFunction extends KeyedCoProcessFunction<String, Cycl
/**
* 北 直行
* @param
stageList
* @param
cycle
* @param position
* @param direction
* @return
*/
private
static
String
gettEffectGreenTimeForDirction
(
List
<
Stage
>
stageList
,
String
position
,
String
direction
,
String
loggerLevel
)
{
private
static
String
gettEffectGreenTimeForDirction
(
Cycle
cycle
,
String
position
,
String
direction
,
String
loggerLevel
)
{
List
<
Stage
>
stageList
=
cycle
.
getStageList
();
int
AllGreenTime
=
0
;
for
(
Stage
stage
:
stageList
)
{
List
<
StageForDirection
>
stageForDirectionList
=
stage
.
getStageForDirectionList
();
...
...
@@ -248,16 +249,13 @@ public class LaneNormProcessFunction extends KeyedCoProcessFunction<String, Cycl
if
(
position
.
equals
(
dir
.
getDirection
())
&&
direction
.
equals
(
dir
.
getTraffic_flow_direction
()))
{
AllGreenTime
+=
stage
.
getValidGreen
();
if
(
"debug"
.
equals
(
loggerLevel
))
{
System
.
out
.
println
(
position
+
direction
+
"命中->相位"
+
stage
.
getPhaseValue
()
+
"
相位有效绿灯时间为->"
+
stage
.
getValidGreen
()
);
System
.
out
.
println
(
"cycleorder->"
+
cycle
.
getCycleOrder
()+
" 路口id->"
+
cycle
.
getCrossCode
()+
" "
+
position
+
direction
+
"命中->相位"
+
stage
.
getPhaseValue
()
+
"
相位有效绿灯时间为->"
+
stage
.
getValidGreen
()
);
}
//同一个相位累加一次即可
break
;
}
}
}
if
(
"debug"
.
equals
(
loggerLevel
)){
System
.
out
.
println
(
position
+
direction
+
"流向有效绿灯时间为->"
+
AllGreenTime
);
}
return
AllGreenTime
+
""
;
}
...
...
@@ -324,7 +322,7 @@ public class LaneNormProcessFunction extends KeyedCoProcessFunction<String, Cycl
laneNorm
.
setResidualCapacity
(
new
BigDecimal
(
sum2
<=
0
?
0
d:
sum2
).
setScale
(
5
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
());
//laneNorm.setResidualCapacity(new BigDecimal(sum2).setScale(5, BigDecimal.ROUND_HALF_UP).doubleValue());
//有效绿灯时间 相位下此方向此流向有效绿灯时间之和
laneNorm
.
setEffectGreenTime
(
gettEffectGreenTimeForDirction
(
cycle
.
getStageList
()
,
position
,
name
,
loggerLevel
));
laneNorm
.
setEffectGreenTime
(
gettEffectGreenTimeForDirction
(
cycle
,
position
,
name
,
loggerLevel
));
//识别空间空间占有率 车道长度需要交通流量为0得数据
int
sum
=
list
.
stream
().
filter
(
recode
->
position
.
equals
(
recode
.
getDirection
())
&&
recode
.
getLaneName
().
indexOf
(
name
)
!=
-
1
).
mapToInt
(
LaneNorm:
:
getLaneLength
).
sum
();
int
sum1
=
collect
.
stream
().
mapToInt
(
LaneNorm:
:
getMaxQueueLength
).
sum
();
...
...
@@ -410,8 +408,8 @@ public class LaneNormProcessFunction extends KeyedCoProcessFunction<String, Cycl
for
(
Stage
stage
:
cycle1
.
getStageList
())
{
stage
.
setStageForDirectionList
(
getStageForDiretion
(
stage
,
dictResult
));
}
String
s
=
gettEffectGreenTimeForDirction
(
cycle
.
getStageList
()
,
"北"
,
"直行"
,
"debug"
);
System
.
out
.
println
(
s
);
String
s
=
gettEffectGreenTimeForDirction
(
cycle
,
"北"
,
"直行"
,
"debug"
);
//
System.out.println(s);
}
catch
(
Exception
e
){
System
.
out
.
println
(
e
);
...
...
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