Exemplo n.º 1
0
        private void CreateChild(int stationZone, int parkingSpots, SparseTwinIndex <float> numberOfTrains, int lineNumber)
        {
            GoAccessStation station = new GoAccessStation
            {
                //Setup the parameters
                Root                       = Root,
                Parent                     = this,
                Closest                    = Closest,
                ClosestDistance            = ClosestDistance,
                MaxAccessToDestinationTime = MaxAccessToDestinationTime,
                Access                     = Access,
                CurrentlyFeasible          = 1.0f,
                // The constant for this option is not the same as for the station choice
                //station.Constant = this.Constant;
                AccessInVehicleTravelTime = AccessInVehicleTravelTime,
                AccessCost          = AccessCost,
                InVehicleTravelTime = GeneralTime,
                LogParkingFactor    = ParkingFactor,
                TrainsFactor        = TrainsFactor,
                WaitTime            = WaitTime,
                WalkTime            = WalkTime,
                CostFactor          = CostFactor,
                EgressWalkFactor    = EgressWalkFactor,
                EgressWaitFactor    = EgressWaitFactor,

                // Setup the modes
                ComputeEgressStation = ComputeEgressStation,
                First          = First,
                FirstComponent = First as ITripComponentData,
                Second         = Second,
                Third          = Third,
                FreeTransfers  = FreeTransfers.GiveData(),

                // Create all of the individual parameters
                ModeName       = String.Format("{0}:{1}", ModeName, stationZone),
                StationZone    = stationZone,
                LineNumber     = lineNumber,
                Parking        = parkingSpots,
                NumberOfTrains = numberOfTrains
            };

            // Add it to the list of children
            Children.Add(station);
        }
Exemplo n.º 2
0
        private void CreateChild(int stationZone, int parkingSpots, SparseTwinIndex <float> numberOfTrains, int lineNumber)
        {
            GoAccessStation station = new GoAccessStation();

            //Setup the parameters
            station.Root                       = this.Root;
            station.Parent                     = this;
            station.Closest                    = this.Closest;
            station.ClosestDistance            = this.ClosestDistance;
            station.MaxAccessToDestinationTime = this.MaxAccessToDestinationTime;
            station.Access                     = this.Access;
            station.CurrentlyFeasible          = 1.0f;
            // The constant for this option is not the same as for the station choice
            //station.Constant = this.Constant;
            station.AccessInVehicleTravelTime = this.AccessInVehicleTravelTime;
            station.AccessCost          = this.AccessCost;
            station.InVehicleTravelTime = this.GeneralTime;
            station.LogParkingFactor    = this.ParkingFactor;
            station.TrainsFactor        = this.TrainsFactor;
            station.WaitTime            = this.WaitTime;
            station.WalkTime            = this.WalkTime;
            station.CostFactor          = this.CostFactor;
            station.EgressWalkFactor    = this.EgressWalkFactor;
            station.EgressWaitFactor    = this.EgressWaitFactor;

            // Setup the modes
            station.ComputeEgressStation = this.ComputeEgressStation;
            station.First          = this.First;
            station.FirstComponent = this.First as ITripComponentData;
            station.Second         = this.Second;
            station.Third          = this.Third;
            station.FreeTransfers  = this.FreeTransfers.GiveData();

            // Create all of the individual parameters
            station.ModeName       = String.Format("{0}:{1}", this.ModeName, stationZone);
            station.StationZone    = stationZone;
            station.LineNumber     = lineNumber;
            station.Parking        = parkingSpots;
            station.NumberOfTrains = numberOfTrains;
            // Add it to the list of children
            this.Children.Add(station);
        }