Commit ebd15722 by 余根龙

删除打印日志

parent 9bf58b0b
...@@ -29,7 +29,6 @@ public class GreenRadioJob { ...@@ -29,7 +29,6 @@ public class GreenRadioJob {
System.out.println(cycle); System.out.println(cycle);
double cycleGreenRatioTotal = 0; double cycleGreenRatioTotal = 0;
int cycleLossTimeTotal = 0; int cycleLossTimeTotal = 0;
// 先按阶段进行计算 // 先按阶段进行计算
List<Stage> stageList = cycle.getStageList(); List<Stage> stageList = cycle.getStageList();
for (Stage stage : stageList) { for (Stage stage : stageList) {
...@@ -47,25 +46,18 @@ public class GreenRadioJob { ...@@ -47,25 +46,18 @@ public class GreenRadioJob {
int phaseLossTime = startLossTime + clearLossTime; int phaseLossTime = startLossTime + clearLossTime;
// 阶段有效绿灯时间 = 绿灯时长+黄灯时长+全红时长 - 阶段损失时间 // 阶段有效绿灯时间 = 绿灯时长+黄灯时长+全红时长 - 阶段损失时间
int phaseValidGreen = green + yellow + allRed - phaseLossTime; int phaseValidGreen = green + yellow + allRed - phaseLossTime;
// 阶段绿信比 = 阶段有效绿灯时间/周期时长 // 阶段绿信比 = 阶段有效绿灯时间/周期时长
Integer duration = cycle.getDuration(); Integer duration = cycle.getDuration();
System.out.println("********duration:"+duration);
double phaseGreenRatio = 0; double phaseGreenRatio = 0;
if(duration!=null && duration!=0){ if(duration!=null && duration!=0){
phaseGreenRatio = Double.valueOf(phaseValidGreen) / duration; phaseGreenRatio = Double.valueOf(phaseValidGreen) / duration;
} }
if(duration==0) {
System.out.println("********phaseGreenRatio:" + phaseGreenRatio);
}
//组装阶段绿信比、有效绿灯时间、损失时间 //组装阶段绿信比、有效绿灯时间、损失时间
stage.setGreenRatio(phaseGreenRatio); stage.setGreenRatio(phaseGreenRatio);
stage.setValidGreen(phaseValidGreen); stage.setValidGreen(phaseValidGreen);
stage.setLossTime(phaseLossTime); stage.setLossTime(phaseLossTime);
// 周期绿信比 = 阶段绿信比之和 // 周期绿信比 = 阶段绿信比之和
cycleGreenRatioTotal = cycleGreenRatioTotal + phaseGreenRatio; cycleGreenRatioTotal = cycleGreenRatioTotal + phaseGreenRatio;
// 周期损失时间 = 各个阶段损失时间之和 // 周期损失时间 = 各个阶段损失时间之和
cycleLossTimeTotal = cycleLossTimeTotal + phaseLossTime; cycleLossTimeTotal = cycleLossTimeTotal + phaseLossTime;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment