public void AttachEdge(SectionEdge edge, EdgeType type) { if (type == EdgeType.Input) { InputEdges.Add(edge); } else { OutputEdges.Add(edge); } }
public TrainRunSection(Route route, ServiceIntention train, SectionEdge section) { RouteId = route.Id; RoutePathId = section.RoutePath; SequenceNumber = section.SequenceNumber; if (train.SectionRequirements != null && section.SectionMarker != null) { SectionRequirement = train.SectionRequirementsDic.ContainsKey(section.SectionMarker) ? section.SectionMarker : null; } }
public void Add(SectionEdge edge) { Sections.Add(edge); lastNode = edge.Exit; if (edge.SectionMarker != null) { SectionMarkers.Add(edge.SectionMarker); } if (edge.Penalty.HasValue) { Penalty += edge.Penalty.Value; } foreach (var res in edge.ResourceOccupations) { _resourceOccupied.Add(res); } }
public PossiblePath(PossiblePath basePath, SectionEdge edge) { Sections.AddRange(basePath.Sections); Add(edge); }