예제 #1
0
파일: LaneIndex.cs 프로젝트: howbani/VSIM
            public static int East(int max)
            {
                int    halLanes = Convert.ToInt16(max / 2);
                double rando    = RandomeNumberGenerator.GetUniform(halLanes - 1);
                int    x        = halLanes + Convert.ToInt16(rando);

                return(x);
            }
예제 #2
0
        /// <summary>
        /// random speed in KMH between min and max.
        /// </summary>
        public static double RandomSpeedkmh(RoadSegment rs)
        {
            double ran = RandomeNumberGenerator.GetNormal(rs.MaxAllowedSpeed, PublicParamerters.SpeedStandardDeviation);

            return(ran);
        }