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
dc3384a5
Commit
dc3384a5
authored
Feb 26, 2025
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[add] AI路口失衡事件优化中状态优化
parent
4df3927b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
StrategyControlServiceImpl.java
...pt/synthesis/service/impl/StrategyControlServiceImpl.java
+3
-2
StrategyCrossResultMapper.xml
...e/src/main/resources/mapper/StrategyCrossResultMapper.xml
+2
-2
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/synthesis/service/impl/StrategyControlServiceImpl.java
View file @
dc3384a5
...
...
@@ -682,8 +682,9 @@ public class StrategyControlServiceImpl implements StrategyControlService {
Integer
duration
=
Objects
.
nonNull
(
entity
.
getDuration
())
?
entity
.
getDuration
()
:
0
;
// 计算结束时间
if
(
Objects
.
nonNull
(
issueTime
))
{
if
(
Objects
.
equals
(
2
,
currentAlgo
)
&&
current
.
getTime
()
-
issueTime
.
getTime
()
-
duration
*
1000
>
0
)
{
currentAlgo
=
null
;
if
(
Objects
.
equals
(
2
,
currentAlgo
)
&&
current
.
getTime
()
-
issueTime
.
getTime
()
<=
duration
*
1000
)
{
ext
.
setOptStatus
(
"优化中"
);
ext
.
setOptMethod
(
"均衡调控"
);
}
else
if
(
current
.
getTime
()
-
issueTime
.
getTime
()
>
10
*
1000
)
{
currentAlgo
=
null
;
}
...
...
signal-optimize-service/src/main/resources/mapper/StrategyCrossResultMapper.xml
View file @
dc3384a5
...
...
@@ -7,9 +7,9 @@
<select
id=
"selectAICrossList"
resultType=
"net.wanji.opt.synthesis.pojo.StrategyCrossResultEntity"
>
select t1.id as crossId, t1.name as crossName, t2.issue_time, t2.current_algo, t2.response_code, t1.location as responseContent from
select t1.id as crossId, t1.name as crossName, t2.issue_time, t2.current_algo, t2.response_code, t1.location as responseContent
, t2.duration
from
(select id, name, location from t_base_cross_info where is_signal = 1) t1
left join (select t1.cross_id, t1.issue_time, t1.current_algo, t1.response_code from t_strategy_cross_result t1
left join (select t1.cross_id, t1.issue_time, t1.current_algo, t1.response_code
, t1.duration
from t_strategy_cross_result t1
inner join (select cross_id, max(issue_time) issue_time from t_strategy_cross_result where issue_time > CURDATE() group by cross_id) t3
on t1.cross_id = t3.cross_id and t1.issue_time = t3.issue_time where t1.issue_time > CURDATE()) t2
on t1.id = t2.cross_id
...
...
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