public static double MaxLength(Route route)
 {
     return route.Count == 1 ? 0 : route.GetLinks().Max(x => x.Length);
 }
 public static double FSL(Route route)
 {
     return route.GetLinks().Max(x => FSL(x.Length, Lambda));
 }
 public static double Length(Route route)
 {
     return route.GetLinks().Aggregate(0, (double tmp, Link link) => tmp + link.Length);
 }
 public static double BandWidth(Route route, double flowBandwidth)
 {
     return route.GetLinks().Count() * flowBandwidth;
 }
 public static bool NoLoops(Route route)
 {
     return route.Select(x => route.Count(y => y == x)).Sum() == route.Count;
 }
 public static bool BandWidthConstraint(Route route)
 {
     return BandWidthConstraint(route, FlowBandwidth);
 }
 public static bool BandWidthConstraint(Route route, double flowBandwidth)
 {
     var bandwidth = RouteMetrics.BandWidth(route, flowBandwidth);
     return route.GetLinks().Any(x => x.BandWidth > bandwidth);
 }
 protected bool Equals(Route other)
 {
     if (_Nodes.Count != other.Count) return false;
     return _Nodes.Where((x, i) => x == other[i]).Count() == Count;
 }