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
0cf88a56
Commit
0cf88a56
authored
Sep 25, 2023
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[update] 优化系统bug
parent
a8950a44
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
8 deletions
+12
-8
SchemeEvaluateServiceImpl.java
...net/wanji/opt/service/impl/SchemeEvaluateServiceImpl.java
+6
-4
CrossDirDataHistMapper.java
.../net/wanji/databus/dao/mapper/CrossDirDataHistMapper.java
+3
-1
CrossDirDataHistMapper.xml
...abus/src/main/resources/mapper/CrossDirDataHistMapper.xml
+3
-3
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/service/impl/SchemeEvaluateServiceImpl.java
View file @
0cf88a56
...
@@ -1103,11 +1103,13 @@ public class SchemeEvaluateServiceImpl implements SchemeEvaluateService {
...
@@ -1103,11 +1103,13 @@ public class SchemeEvaluateServiceImpl implements SchemeEvaluateService {
private
boolean
calcBalance
(
Double
maxSaturation
,
Double
greenLightEfficiencyMax
)
{
private
boolean
calcBalance
(
Double
maxSaturation
,
Double
greenLightEfficiencyMax
)
{
// 如果饱和度<0.8,则需绿灯利用率大于50%;如果饱和度>0.8,则需绿灯利用率大于80%
// 如果饱和度<0.8,则需绿灯利用率大于50%;如果饱和度>0.8,则需绿灯利用率大于80%
if
(
Objects
.
nonNull
(
maxSaturation
)
&&
Objects
.
nonNull
(
greenLightEfficiencyMax
))
{
if
(
maxSaturation
<
0.8
&&
greenLightEfficiencyMax
>
0.5
)
{
if
(
maxSaturation
<
0.8
&&
greenLightEfficiencyMax
>
0.5
)
{
return
true
;
return
true
;
}
else
if
(
maxSaturation
>=
0.8
&&
greenLightEfficiencyMax
>
0.8
)
{
}
else
if
(
maxSaturation
>=
0.8
&&
greenLightEfficiencyMax
>
0.8
)
{
return
true
;
return
true
;
}
}
}
return
false
;
return
false
;
}
}
...
...
wj-databus/src/main/java/net/wanji/databus/dao/mapper/CrossDirDataHistMapper.java
View file @
0cf88a56
...
@@ -44,7 +44,9 @@ public interface CrossDirDataHistMapper extends BaseMapper<CrossDirDataHistPO> {
...
@@ -44,7 +44,9 @@ public interface CrossDirDataHistMapper extends BaseMapper<CrossDirDataHistPO> {
Double
selectMaxSaturation
(
String
crossId
,
Integer
dirType
,
Integer
inOutType
,
int
startStamp
,
int
endStamp
);
Double
selectMaxSaturation
(
String
crossId
,
Integer
dirType
,
Integer
inOutType
,
int
startStamp
,
int
endStamp
);
Double
selectMaxGreenLightEfficiency
(
String
crossId
,
Integer
dirCode
,
Integer
code
,
int
startTimeStamp
,
int
endTimeStamp
);
Double
selectMaxGreenLightEfficiency
(
@Param
(
"crossId"
)
String
crossId
,
@Param
(
"dirCode"
)
Integer
dirCode
,
@Param
(
"code"
)
Integer
code
,
@Param
(
"startTimeStamp"
)
int
startTimeStamp
,
@Param
(
"endTimeStamp"
)
int
endTimeStamp
);
List
<
CrossDirDataHistPOExt
>
selectByMetrics
(
String
crossId
,
int
dirInt
,
int
startTimeStamp
,
int
endTimeStamp
,
List
<
String
>
laneIds
);
List
<
CrossDirDataHistPOExt
>
selectByMetrics
(
String
crossId
,
int
dirInt
,
int
startTimeStamp
,
int
endTimeStamp
,
List
<
String
>
laneIds
);
...
...
wj-databus/src/main/resources/mapper/CrossDirDataHistMapper.xml
View file @
0cf88a56
...
@@ -156,9 +156,9 @@
...
@@ -156,9 +156,9 @@
<select
id=
"selectMaxGreenLightEfficiency"
resultType=
"java.lang.Double"
>
<select
id=
"selectMaxGreenLightEfficiency"
resultType=
"java.lang.Double"
>
select max(green_light_efficiency)
select max(green_light_efficiency)
from t_cross_dir_data_hist
from t_cross_dir_data_hist
where cross_id = #{crossId} and dir_type = #{dir
Type} and in_out_type = #{inOutTyp
e}
where cross_id = #{crossId} and dir_type = #{dir
Code} and in_out_type = #{cod
e}
and batch_time
<![CDATA[ >= ]]>
#{startStamp}
and batch_time
<![CDATA[ >= ]]>
#{start
Time
Stamp}
and batch_time
<![CDATA[ <= ]]>
#{endStamp}
and batch_time
<![CDATA[ <= ]]>
#{end
Time
Stamp}
</select>
</select>
<select
id=
"selectByMetrics"
resultType=
"net.wanji.databus.po.CrossDirDataHistPOExt"
>
<select
id=
"selectByMetrics"
resultType=
"net.wanji.databus.po.CrossDirDataHistPOExt"
>
...
...
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