예제 #1
0
        internal void Write(StateBinaryWriter writer)
        {
            writer.WriteInt(_additionalDemands.Count);
            foreach (KeyValuePair <VehicleStation, UniqueList <IStorageNetworkNode> > stationPair in _additionalDemands)
            {
                writer.WriteBuilding(stationPair.Key);

                UniqueList <IStorageNetworkNode> list = stationPair.Value;
                int count = list.Count;

                writer.WriteInt(count);
                for (int i = 0; i < list.Count; i++)
                {
                    writer.WriteBuilding(list[i].Building);
                }
            }

            writer.WriteInt(_connectedStations.Count);
            foreach (KeyValuePair <VehicleStation, UniqueList <VehicleStation> > stationPair in _connectedStations)
            {
                writer.WriteBuilding(stationPair.Key);

                UniqueList <VehicleStation> list = stationPair.Value;
                int count = list.Count;

                writer.WriteInt(count);
                for (int i = 0; i < list.Count; i++)
                {
                    writer.WriteBuilding(list[i]);
                }
            }
        }
 internal void Write(StateBinaryWriter writer)
 {
     writer.WriteInt(_vehiclesData.Count);
     foreach (KeyValuePair <Vehicle, VehicleScheduleData> pair in _vehiclesData)
     {
         writer.WriteInt(pair.Key.Id);
         pair.Value.Write(writer);
     }
 }
 internal virtual void Write(StateBinaryWriter writer)
 {
     writer.WriteInt(_data.Count);
     foreach (var pair in _data)
     {
         writer.WriteInt(pair.Key.GetIndex());
         pair.Value.Write(writer);
     }
 }
예제 #4
0
 internal override void Write(StateBinaryWriter writer)
 {
     base.Write(writer);
     writer.WriteInt(_distanceData.Count);
     foreach (KeyValuePair <RootTask, float> pair in _distanceData)
     {
         writer.WriteInt(pair.Key.GetIndex());
         writer.WriteFloat(pair.Value);
     }
 }
예제 #5
0
 public void Write(StateBinaryWriter writer)
 {
     writer.WriteInt(_durationData.Size);
     foreach (TimeSpan duration in _durationData)
     {
         writer.WriteLong(duration.Ticks);
     }
     writer.WriteInt(_totalCount);
     writer.WriteLong(_totalSum.Ticks);
 }
 internal virtual void Write(StateBinaryWriter writer)
 {
     writer.WriteInt(Task.GetIndex());
     MeasurementSurrogate.Write(writer, this);
     writer.WriteLong(startTime.Value.Ticks);
 }