示例#1
0
        public DEGap gap;                   //停止時における車間距離関係

        /// <summary>
        /// 実態を持たせる
        /// </summary>
        public DEigenvalue()
        {
            operation_time = new double();
            acceleration   = new DEAcceleration();
            velocity       = new DVelocity();
            gap            = new DEGap();
        }
示例#2
0
 /// <summary>
 /// 値コピーを作成する
 /// </summary>
 /// <param name="eigenvalue">DEigenvalue</param>
 public DEigenvalue(DEigenvalue eigenvalue)
 {
     operation_time = eigenvalue.operation_time;
     acceleration   = new DEAcceleration(eigenvalue.acceleration);
     velocity       = new DVelocity(eigenvalue.velocity);
     gap            = new DEGap(eigenvalue.gap);
 }
示例#3
0
        /// <summary>
        /// 車間距離シリーズを計算する
        /// </summary>
        /// <param name="ID">車両ID</param>
        /// <returns>true -> 内側,false -> 外側</returns>
        private double _calculate_Gseries(int ID)
        {
            DGap   DG       = driver[ID].running.gap;
            DEGap  DEG      = driver[ID].eigenvalue.gap;
            int    front    = car[ID].running.around.front;
            double v        = car[ID].running.velocity.current;
            double v_f      = car[front].running.velocity.current;
            double T        = driver[ID].eigenvalue.operation_time;
            double Ab       = car[ID].eigenvalue.acceleration.braking;
            double Ab_f     = car[front].eigenvalue.acceleration.braking;
            double Abs      = driver[ID].eigenvalue.acceleration.deceleration;
            double Didling  = v * T;
            double Dbrake   = v * v / (2 * Ab);
            double Dbrake_f = v_f * v_f / (2 * Ab_f);

            DG.closest = Didling + Dbrake - Dbrake_f;
            if (DG.closest < DEG.stop)
            {
                DG.closest = DEG.stop;
            }
            else
            {
                DG.closest += DEG.stop;
            }
            DG.cruise = Didling + v * v / (2 * Abs) + (DEG.stop + DEG.move) / 2;
            if (DG.cruise - 10 > DG.closest)
            {
                DG.cruise = DG.closest + 10;
            }
            DG.influenced = 2 * DG.cruise - DG.closest;
            return(car[ID].running.gap - DG.cruise);
        }
示例#4
0
 /// <summary>
 /// ドライバーの特徴を初期化
 /// </summary>
 private void _initialize_driver_eigenvalue()
 {
     driver = new List <Driver_Structure>(N);
     for (int i = 0; i < N; i++)
     {
         Change_Unit change = new Change_Unit();
         DVelocity   DV     = new DVelocity();
         DV.cruise       = change.km_h__to__m_s(100);
         DV.c_difference = change.km_h__to__m_s(15);
         DV.s_difference = change.km_h__to__m_s(1);
         Pedal pedal = new Pedal();
         pedal.foot_position = FootPosition.accel_pedal;
         pedal.time_elapsed  = pedal.time_required = 0;
         DGap dg = new DGap();
         dg.closest = dg.cruise = dg.influenced = 0;
         DEGap  deg = new DEGap();
         double operation_time;
         if (Driver_Mode == DriverMode.Human)
         {
             operation_time = 0.75;
             deg.stop       = 3;
             deg.move       = 6;
         }
         else
         {
             operation_time = 0.05;
             deg.stop       = 1;
             deg.move       = 1.1;
         }
         Driver_Structure DS = new Driver_Structure();
         DS.eigenvalue.acceleration.acceleration = change.km_h__to__m_s(60) / 10;
         DS.eigenvalue.acceleration.deceleration = Math.Pow(change.km_h__to__m_s(100), 2) / 2 / 60;
         DS.eigenvalue.operation_time            = operation_time;
         DS.eigenvalue.velocity      = new DVelocity(DV);
         DS.eigenvalue.gap           = new DEGap(deg);
         DS.running.pedal            = new Pedal(pedal);
         DS.running.gap              = new DGap(dg);
         DS.running.v_optimal        = new DIC(0, 0);
         DS.running.RR.random_value  = new Random_Value(0, 0);
         DS.running.RR.effectiveness = true;
         DS.running.v_difference     = new DVDifference(deg.stop, deg.stop);
         driver.Add(DS);
     }
 }
示例#5
0
 /// <summary>
 /// 値のコピーを作成する
 /// </summary>
 /// <param name="gap">DEGap</param>
 public DEGap(DEGap gap)
 {
     stop = gap.stop;
     move = gap.move;
 }