Ejemplo n.º 1
0
        private void LoadStationCapacity()
        {
            SparseArray <float> capacity = Root.ZoneSystem.ZoneArray.CreateSimilarArray <float>();

            foreach (var point in StationCapacity.Read())
            {
                if (!capacity.ContainsIndex(point.O))
                {
                    throw new XTMFRuntimeException("In '" + Name + "' we found an invalid zone '" + point.O + "' while reading in the station capacities!");
                }
                // use the log of capacity
                capacity[point.O] = (float)Math.Log(point.Data + 1.0f);
            }
            Capacity = capacity;
        }
Ejemplo n.º 2
0
 private void LoadParking(SparseArray <IZone> zones)
 {
     if (ParkingCosts == null)
     {
         return;
     }
     foreach (var point in ParkingCosts.Read())
     {
         var origin = point.O;
         if (zones.ContainsIndex(origin))
         {
             var z = zones[origin];
             z.ParkingCost = point.Data;
         }
     }
 }
Ejemplo n.º 3
0
 private void LoadParking(SparseArray<IZone> zones)
 {
     if ( ParkingCosts == null ) return;
     foreach ( var point in ParkingCosts.Read() )
     {
         var origin = point.O;
         if ( zones.ContainsIndex( origin ) )
         {
             var z = zones[origin];
             z.ParkingCost = point.Data;
         }
     }
 }