毕业论文

打赏
当前位置: 毕业论文 > 自动化 >

基于抛球模型的交通信号控制互动关系研究(12)

时间:2017-02-26 15:55来源:毕业论文
} else { Ball NewBall = new Ball(VarLeftTime, myDistance.DistanceTime - 1, false); LBdown.Add(NewBall); } //处理抛小球消耗时间 M.ForbidTime += VarLeftTime; VarTime=M.UpTime; // M.LeftTime -=


                    }
                    else
                    {
                        Ball NewBall = new Ball(VarLeftTime, myDistance.DistanceTime - 1, false);
                        LBdown.Add(NewBall);
                    }
                    //处理抛小球消耗时间
                    M.ForbidTime += VarLeftTime;
                    VarTime=M.UpTime;
                    //
                    M.LeftTime -= VarLeftTime;
                    //处理/改变 人绿周期
                    M.GreenTime = M.UpTime;
                    ////在绿状态下的效益值
                    M.GreenEfficiency = M.LeftTime;
                }
               //红周期=绿周期
                M.RedTime = M.GreenTime;
            }
            else
            {
                M.GreenEfficiency = M.LeftTime;
            }

public void OperationMan(List<Man> LM, List<Ball> LBup, List<Ball> LBdown)
        {
            for (int i = 0; i < LM.Count; i++)
            {
                if (LM[i].GreenCount == 0 && LM[i].RedCount == -1)//人绿色的开始。也是最开始,只执行一次
                {
                    LM[i].GreenCount++;//处理人的红绿灯问题
                    OperationAllBall(LM[i], LBup, LBdown);//处理人球问题
                }
                else if (LM[i].GreenCount > 0 && LM[i].GreenCount < LM[i].GreenTime)//绿色的中间过程,除去开始和结束的那两秒 基于抛球模型的交通信号控制互动关系研究(12):http://www.751com.cn/zidonghua/lunwen_3407.html
------分隔线----------------------------
推荐内容