protected override int GetLowBound() { var time = 0; var bound = 0; for (var i = 0; i < SelectedVertices.Count - 1; i++) { time += SelectedVertices[i].TimeToOther[SelectedVertices[i + 1]]; if (SelectedVertices[i + 1].DirectiveTime < time) { bound++; } } return(bound + GetSubLowBound(AvailableVertices.ToList(), SelectedVertices.Last(), time, 2)); }
protected virtual int GetLowBound() { var time = 0; var bound = 0; for (var i = 0; i < SelectedVertices.Count - 1; i++) { time += SelectedVertices[i].TimeToOther[SelectedVertices[i + 1]]; if (SelectedVertices[i + 1].DirectiveTime < time) { bound++; } } return(bound + AvailableVertices.Count(x => x.DirectiveTime <= SpentTime + SelectedVertices.Last().TimeToOther[x])); }