public IEnumerable <Arc> GetConnectionCriticalArcs() { for (int i = Problem.MachineCount; i < Problem.MachineAndConnectionCount; i++) { var order = _sequences[i]; if (order.Count <= 1) { continue; } Assert(SequencingChecks, order.Count == 2); Assert(SequencingChecks, order.All(occ => occ.Type != MachineOccupationType.Normal)); if (order.First().Type == MachineOccupationType.ConnectionOrigin) { continue; } Assert(SequencingChecks, order.First().Type == MachineOccupationType.ConnectionTarget && order.Last().Type == MachineOccupationType.ConnectionOrigin); var arc = Arc.BetweenOccupations(order.First(), order.Last()); Assert(SequencingChecks, GraphLayer.ArcExists(arc)); yield return(arc); } }