private void CreateChild(int stationZone, int parkingSpots, float numberOfTrains) { AccessStation station = new AccessStation { Root = Root, Parent = this, Closest = Closest, ClosestDistance = ClosestDistance, MaxAccessToDestinationTime = MaxAccessToDestinationTime, Access = Access, ExcludeLineHull = ExcludeLineHull, AccessInVehicleTravelTime = AccessInVehicleTravelTime, AccessCost = AccessCost, EgressWalkFactor = EgressWalkFactor, EgressWaitFactor = EgressWaitFactor, InVehicleTravelTime = GeneralTime, ParkingCost = ParkingCost, LogParkingFactor = ParkingFactor, TrainsFactor = TrainsFactor, LogTrainsFactor = LogTrainsFactor, WaitTime = WaitTime, WalkTime = WalkTime, BoardingTime = BoardingTime, ComputeEgressStation = ComputeEgressStation, First = First, Second = Second, Third = Third, FirstAlternative = FirstAlternative, ModeName = $"{ModeName}:{stationZone}", StationZone = stationZone, Parking = parkingSpots, NumberOfTrains = numberOfTrains }; //Setup the parameters // The constant for this option is not the same as for the station choice //station.Constant = this.Constant; // Setup the modes // Create all of the individual parameters // Add it to the list of children Children.Add(station); }
private void CreateChild(int stationZone, int parkingSpots, float numberOfTrains) { AccessStation station = new AccessStation(); //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.ExcludeLineHull = this.ExcludeLineHull; // 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.EgressWalkFactor = this.EgressWalkFactor; station.EgressWaitFactor = this.EgressWaitFactor; station.InVehicleTravelTime = this.GeneralTime; station.ParkingCost = this.ParkingCost; station.LogParkingFactor = this.ParkingFactor; station.TrainsFactor = this.TrainsFactor; station.LogTrainsFactor = this.LogTrainsFactor; station.WaitTime = this.WaitTime; station.WalkTime = this.WalkTime; station.BoardingTime = this.BoardingTime; // Setup the modes station.ComputeEgressStation = this.ComputeEgressStation; station.First = this.First; station.Second = this.Second; station.Third = this.Third; station.FirstAlternative = this.FirstAlternative; // Create all of the individual parameters station.ModeName = String.Format("{0}:{1}", this.ModeName, stationZone); station.StationZone = stationZone; station.Parking = parkingSpots; station.NumberOfTrains = numberOfTrains; // Add it to the list of children this.Children.Add(station); }
private void CreateChild(int stationZone, int parkingSpots, float numberOfTrains) { AccessStation station = new AccessStation(); //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.ExcludeLineHull = this.ExcludeLineHull; // 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.EgressWalkFactor = this.EgressWalkFactor; station.EgressWaitFactor = this.EgressWaitFactor; station.InVehicleTravelTime = this.GeneralTime; station.ParkingCost = this.ParkingCost; station.LogParkingFactor = this.ParkingFactor; station.TrainsFactor = this.TrainsFactor; station.LogTrainsFactor = this.LogTrainsFactor; station.WaitTime = this.WaitTime; station.WalkTime = this.WalkTime; station.BoardingTime = this.BoardingTime; // Setup the modes station.ComputeEgressStation = this.ComputeEgressStation; station.First = this.First; station.Second = this.Second; station.Third = this.Third; station.FirstAlternative = this.FirstAlternative; // Create all of the individual parameters station.ModeName = String.Format( "{0}:{1}", this.ModeName, stationZone ); station.StationZone = stationZone; station.Parking = parkingSpots; station.NumberOfTrains = numberOfTrains; // Add it to the list of children this.Children.Add( station ); }