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
c5b78da3
Commit
c5b78da3
authored
Dec 07, 2024
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[add] 绿波绿信比流量优化
parent
9ebadf1a
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
67 deletions
+78
-67
TrendServiceImpl.java
...ain/java/net/wanji/opt/service/impl/TrendServiceImpl.java
+6
-6
GreenBeltServiceImpl.java
...anji/opt/service/signalopt/impl/GreenBeltServiceImpl.java
+70
-61
GreenBeltCrossDetailVO.java
...rc/main/java/net/wanji/opt/vo/GreenBeltCrossDetailVO.java
+2
-0
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/service/impl/TrendServiceImpl.java
View file @
c5b78da3
...
...
@@ -336,12 +336,12 @@ public class TrendServiceImpl implements TrendService {
double
roundedTrafficIndex
=
Math
.
round
(
abnormalCrossListVO
.
getCongestionIndex
()
*
100.0
)
/
100.0
;
abnormalCrossListVO
.
setCongestionIndex
(
roundedTrafficIndex
);
Double
congestionIndex
=
abnormalCrossListVO
.
getCongestionIndex
();
double
lastWeekIndex
=
getIndex
(
congestionIndex
,
crossId
,
batchTime
-
604800
);
double
lastPeriodIndex
=
getIndex
(
congestionIndex
,
crossId
,
batchTime
-
300
);
abnormalCrossListVO
.
setLastWeekIndex
(
Math
.
floor
(
lastWeekIndex
));
abnormalCrossListVO
.
setLastPeriodIndex
(
Math
.
floor
(
lastPeriodIndex
));
// todo
//
Double congestionIndex = abnormalCrossListVO.getCongestionIndex();
//
double lastWeekIndex = getIndex(congestionIndex, crossId, batchTime - 604800);
//
double lastPeriodIndex = getIndex(congestionIndex, crossId, batchTime - 300);
//
abnormalCrossListVO.setLastWeekIndex(Math.floor(lastWeekIndex));
//
abnormalCrossListVO.setLastPeriodIndex(Math.floor(lastPeriodIndex));
// 常发性偶发性 一个月内超过三次
int
frequent
=
getFrequent
(
crossId
,
batchTime
);
...
...
signal-optimize-service/src/main/java/net/wanji/opt/service/signalopt/impl/GreenBeltServiceImpl.java
View file @
c5b78da3
This diff is collapsed.
Click to expand it.
signal-optimize-service/src/main/java/net/wanji/opt/vo/GreenBeltCrossDetailVO.java
View file @
c5b78da3
...
...
@@ -17,6 +17,8 @@ import java.util.List;
public
class
GreenBeltCrossDetailVO
{
@ApiModelProperty
(
"干线名称"
)
private
String
greenName
;
@ApiModelProperty
(
"路口数量"
)
private
Integer
crossNum
;
@JsonSerialize
(
using
=
Double2TwoDecimalPlacesSerializer
.
class
)
@ApiModelProperty
(
"干线指数"
)
private
Double
greenIndex
;
...
...
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