// ----------------------------------------------------------------------- // // TODO: Update copyright text. // // ----------------------------------------------------------------------- namespace OpenTraffic.Model { using System; using System.Collections.Generic; using System.Linq; using System.Text; /// /// TODO: Update summary. /// [Serializable] public class ODPair { public TrafficZone Origin { get; private set; } public TrafficZone Destination { get; private set; } public VehicleClass routeClass { get; private set; } public ODPair(TrafficZone origin, TrafficZone destination, VehicleClass cl) { this.Origin = origin; this.Destination = destination; this.routeClass = cl; } public override bool Equals(object obj) { ODPair o = obj as ODPair; return (Origin == o.Origin) && (Destination == o.Destination) && (routeClass == o.routeClass); } public override int GetHashCode() { return Origin.GetHashCode() * 3 + Destination.GetHashCode() + routeClass.GetHashCode(); ; } } }