Esempio n. 1
0
 /// <summary>
 /// 値のコピーを作成する
 /// </summary>
 /// <param name="running">DRunning</param>
 public DRunning(DRunning running)
 {
     acceleration = new DAcceleration(running.acceleration);
     v_optimal    = new DIC(running.v_optimal);
     v_difference = new DVDifference(running.v_difference);
     gap          = new DGap(running.gap);
     delta        = new DDelta(running.delta);
     RR           = new Recognition_Rate(running.RR);
     pedal        = new Pedal(running.pedal);
 }
Esempio n. 2
0
        public Pedal pedal;                 //ペダルの踏みかえ関係

        /// <summary>
        /// 実態を持たせる
        /// </summary>
        public DRunning()
        {
            acceleration = new DAcceleration();
            v_optimal    = new DIC();
            v_difference = new DVDifference();
            gap          = new DGap();
            delta        = new DDelta();
            RR           = new Recognition_Rate();
            pedal        = new Pedal();
        }
Esempio n. 3
0
        /// <summary>
        /// 最適速度の再認識処理
        /// </summary>
        /// <param name="ID">車両ID</param>
        private void _recognition_optimal_velocity(int ID)
        {
            double Voptimal_previous = driver[ID].running.v_optimal.current;
            double Voptimal          = driver[ID].running.v_optimal.current = driver[ID].running.v_optimal.instantaneous;
            DDelta delta             = driver[ID].running.delta;

            delta.velocity = car[ID].running.velocity.current - Voptimal;
            DVDifference DVD        = driver[ID].running.v_difference;
            double       Vd_n       = DVD.current;
            double       Nv_        = 2 / Vd_n * Math.Abs(Voptimal_previous - Voptimal) - 1;
            double       fv_        = 1 / (1 + Math.Exp(-Nv_ / 0.1));
            DVelocity    DV         = driver[ID].eigenvalue.velocity;
            double       Vd_optimal = (DV.c_difference - DV.s_difference) / DV.cruise * Voptimal + DV.s_difference;
            double       Vd         = (Vd_optimal - Vd_n) * fv_ + Vd_n;

            if (Vd > Vd_optimal)
            {
                DVD.at_firtst_time = DVD.current = Vd_optimal;
            }
            else
            {
                if (Vd > DV.s_difference)
                {
                    DVD.at_firtst_time = DVD.current = Vd;
                }
                else
                {
                    DVD.at_firtst_time = DVD.current = DV.s_difference;
                }
            }
            if (Driver_Mode == DriverMode.Human)
            {
                driver[ID].running.RR.random_value.Pg = random.NextDouble();
            }
            driver[ID].running.RR.random_value.Pv = 0;
            if (car[ID].running.gap > driver[ID].running.gap.influenced)
            {
                driver[ID].running.RR.effectiveness = false;
            }
        }
Esempio n. 4
0
 /// <summary>
 /// コピーを作成する
 /// </summary>
 /// <param name="delta">DDelta</param>
 public DDelta(DDelta delta)
 {
     velocity = delta.velocity;
     gap      = delta.gap;
 }