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
e537c6a0
Commit
e537c6a0
authored
Jan 04, 2025
by
duanruiming
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
927788f3
acb62a59
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
MainlineEvaluateServiceImpl.java
...t/wanji/opt/service/impl/MainlineEvaluateServiceImpl.java
+4
-4
GreenwaveHistMapper.xml
...service/src/main/resources/mapper/GreenwaveHistMapper.xml
+7
-7
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/service/impl/MainlineEvaluateServiceImpl.java
View file @
e537c6a0
...
@@ -267,7 +267,7 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
...
@@ -267,7 +267,7 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
.
average
()
.
average
()
.
orElse
(
0.0
);
.
orElse
(
0.0
);
double
round
=
(
double
)
(
Math
.
round
(
v
));
double
round
=
(
double
)
(
Math
.
round
(
v
));
vo
.
setValue
(
round
);
vo
.
setValue
(
v
);
}
else
if
(
Objects
.
equals
(
metricCode
,
StrategyAndMetricsEnum
.
Metrics
.
GREEN_LIGHT_EFFICIENCY
.
getCode
()))
{
}
else
if
(
Objects
.
equals
(
metricCode
,
StrategyAndMetricsEnum
.
Metrics
.
GREEN_LIGHT_EFFICIENCY
.
getCode
()))
{
double
v
=
filteredList
.
stream
()
double
v
=
filteredList
.
stream
()
.
mapToDouble
(
CrossDataHistPOExt:
:
getGreenLightEfficiency
)
.
mapToDouble
(
CrossDataHistPOExt:
:
getGreenLightEfficiency
)
...
@@ -400,7 +400,7 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
...
@@ -400,7 +400,7 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
.
average
()
.
average
()
.
orElse
(
0.0
);
.
orElse
(
0.0
);
double
round
=
(
double
)
(
Math
.
round
(
v
));
double
round
=
(
double
)
(
Math
.
round
(
v
));
vo
.
setValue
(
round
);
vo
.
setValue
(
v
);
}
else
if
(
Objects
.
equals
(
metricCode
,
StrategyAndMetricsEnum
.
Metrics
.
GREEN_LIGHT_EFFICIENCY
.
getCode
()))
{
}
else
if
(
Objects
.
equals
(
metricCode
,
StrategyAndMetricsEnum
.
Metrics
.
GREEN_LIGHT_EFFICIENCY
.
getCode
()))
{
double
v
=
filteredList
.
stream
()
double
v
=
filteredList
.
stream
()
.
mapToDouble
(
CrossDirDataHistPO:
:
getGreenLightEfficiency
)
.
mapToDouble
(
CrossDirDataHistPO:
:
getGreenLightEfficiency
)
...
@@ -515,7 +515,7 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
...
@@ -515,7 +515,7 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
.
average
()
.
average
()
.
orElse
(
0.0
);
.
orElse
(
0.0
);
double
round
=
(
double
)
(
Math
.
round
(
v
));
double
round
=
(
double
)
(
Math
.
round
(
v
));
vo
.
setValue
(
round
);
vo
.
setValue
(
v
);
}
else
if
(
Objects
.
equals
(
metricCode
,
StrategyAndMetricsEnum
.
Metrics
.
GREEN_LIGHT_EFFICIENCY
.
getCode
()))
{
}
else
if
(
Objects
.
equals
(
metricCode
,
StrategyAndMetricsEnum
.
Metrics
.
GREEN_LIGHT_EFFICIENCY
.
getCode
()))
{
double
v
=
filteredList
.
stream
()
double
v
=
filteredList
.
stream
()
.
mapToDouble
(
CrossTurnDataHistPO:
:
getGreenLightEfficiency
)
.
mapToDouble
(
CrossTurnDataHistPO:
:
getGreenLightEfficiency
)
...
@@ -635,7 +635,7 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
...
@@ -635,7 +635,7 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
.
average
()
.
average
()
.
orElse
(
0.0
);
.
orElse
(
0.0
);
double
round
=
(
double
)
(
Math
.
round
(
v
));
double
round
=
(
double
)
(
Math
.
round
(
v
));
vo
.
setValue
(
round
);
vo
.
setValue
(
v
);
}
else
if
(
Objects
.
equals
(
metricCode
,
StrategyAndMetricsEnum
.
Metrics
.
GREEN_LIGHT_EFFICIENCY
.
getCode
()))
{
}
else
if
(
Objects
.
equals
(
metricCode
,
StrategyAndMetricsEnum
.
Metrics
.
GREEN_LIGHT_EFFICIENCY
.
getCode
()))
{
double
v
=
filteredList
.
stream
()
double
v
=
filteredList
.
stream
()
.
mapToDouble
(
CrossLaneDataHistPOExt:
:
getGreenLightEfficiency
)
.
mapToDouble
(
CrossLaneDataHistPOExt:
:
getGreenLightEfficiency
)
...
...
signal-optimize-service/src/main/resources/mapper/GreenwaveHistMapper.xml
View file @
e537c6a0
...
@@ -333,7 +333,7 @@
...
@@ -333,7 +333,7 @@
<select
id=
"findGreenWaveRunState"
resultType=
"net.wanji.opt.vo.GreenWaveRunStateVO"
>
<select
id=
"findGreenWaveRunState"
resultType=
"net.wanji.opt.vo.GreenWaveRunStateVO"
>
select type as state,count(*) count,
select type as state,count(*) count,
SUM(TIMESTAMPDIFF(SECOND,start_time, end_time)) duration,
SUM(TIMESTAMPDIFF(SECOND,start_time, end_time)) duration,
TIMESTAMPDIFF(SECOND,#{startDate}, #{endDate}) total
T
ime
TIMESTAMPDIFF(SECOND,#{startDate}, #{endDate}) total
_t
ime
from t_event_info t
from t_event_info t
where start_time > #{startDate} and start_time
<
#{endDate}
where start_time > #{startDate} and start_time
<
#{endDate}
<if
test=
"eventTypeList!=null and eventTypeList.size>0"
>
<if
test=
"eventTypeList!=null and eventTypeList.size>0"
>
...
@@ -421,7 +421,7 @@
...
@@ -421,7 +421,7 @@
t1.lane_id,
t1.lane_id,
t1.lane_no,
t1.lane_no,
t1.turn as turn_type,
t1.turn as turn_type,
MIN(ifnull(t2.
star
t_time,#{startDate})) start_time,
MIN(ifnull(t2.
uni
t_time,#{startDate})) start_time,
SUM(t2.flow) flow,
SUM(t2.flow) flow,
round(AVG(t2.speed),2) speed,
round(AVG(t2.speed),2) speed,
MAX(t2.queue_length) max_queue_length,
MAX(t2.queue_length) max_queue_length,
...
@@ -446,11 +446,11 @@
...
@@ -446,11 +446,11 @@
left join (
left join (
SELECT id as lane_id,cross_id,start_time,flow,speed,queue_length,stop_times,delay_time,sturation ,
SELECT id as lane_id,cross_id,start_time,flow,speed,queue_length,stop_times,delay_time,sturation ,
(case
(case
when #{groupType}=0 then
CEIL(UNIX_TIMESTAMP(DATE_ADD(start_time,INTERVAL 5 MINUTE)))
when #{groupType}=0 then
start_time
when #{groupType}=1 then
CEIL(UNIX_TIMESTAMP(DATE_ADD(start_time,INTERVAL 5 MINUTE)) / 900
)
when #{groupType}=1 then
DATE_FORMAT(concat( date( start_time ), ' ', HOUR ( start_time ), ':', floor( MINUTE ( start_time ) / 15 ) * 15 ),'%Y-%m-%d %H:%i:00'
)
when #{groupType}=2 then
CEIL(UNIX_TIMESTAMP(DATE_ADD(start_time,INTERVAL 5 MINUTE)) / 1800
)
when #{groupType}=2 then
DATE_FORMAT(concat( date( start_time ), ' ', HOUR ( start_time ), ':', floor( MINUTE ( start_time ) / 30 ) * 30 ),'%Y-%m-%d %H:%i:00'
)
when #{groupType}=3 then
CEIL(UNIX_TIMESTAMP(DATE_ADD(start_time,INTERVAL 5 MINUTE)) / 3600
)
when #{groupType}=3 then
DATE_FORMAT(start_time,'%Y-%m-%d %H:00:00'
)
when #{groupType}=4 then
CEIL(UNIX_TIMESTAMP(DATE_ADD(start_time,INTERVAL 5 MINUTE)) / (3600*24)
)
when #{groupType}=4 then
DATE_FORMAT(start_time,'%Y-%m-%d 00:00:00'
)
end
end
) unit_time
) unit_time
from t_lane_data_hist
from t_lane_data_hist
...
...
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