Example #1
0
        /// <summary>
        /// Gets exit or goal downstream
        /// </summary>
        /// <returns></returns>
        public List <DownstreamPointOfInterest> Downstream(Coordinates currentPosition, List <ArbiterWaypoint> ignorable, INavigableNode goal)
        {
            List <DownstreamPointOfInterest> downstream = Initial.Downstream(currentPosition, ignorable, goal);
            double addedDist = this.DistanceBetween(currentPosition, Interconnect.FinalGeneric.Position);
            //double addedTime = this.Inside(currentPosition).Equals(Interconnect) ? 0.0 : Initial.TimeCostInLane(Initial.GetClosestPartition(currentPosition).Final, (ArbiterWaypoint)Interconnect.InitialGeneric) + Interconnect.ExtraCost;
            List <DownstreamPointOfInterest> secondary = Final.Downstream(Interconnect.FinalGeneric.Position, ignorable, goal);

            foreach (DownstreamPointOfInterest dpoi in secondary)
            {
                //dpoi.TimeCostToPoint += addedTime;
                dpoi.DistanceToPoint += addedDist;
            }
            downstream.AddRange(secondary);
            return(downstream);
        }