Microscopic Traffic Simulator

- Main Page
- Packages
- Classes
- Files

- File List

Lane.cs
Go to the documentation of this file.
1 using Microscopic_Traffic_Simulator___Model.GeometricObjects.Nodes;
2 using Microscopic_Traffic_Simulator___Model.TrafficObjects;
3 using System;
4 using System.Collections.Generic;
5 using System.Collections.ObjectModel;
6 using System.Windows;
7
8 namespace Microscopic_Traffic_Simulator___Model.GeometricObjects.Lanes
9 {
13 [Serializable]
14 public abstract class Lane
15 {
19 protected StartNode startNode;
23 public StartNode StartNode { get { return startNode; } }
24
28 protected Node endNode;
32 public Node EndNode { get { return endNode; } }
33
37 private List<InnerNode> innerNodes = new List<InnerNode>();
41 public ReadOnlyCollection<InnerNode> InnerNodes { get { return innerNodes.AsReadOnly(); } }
42
48 protected Lane(Point startPoint, Point endPoint)
49 {
50 startNode = new StartNode(startPoint);
51 innerNodes.Add(new SensorNode(new Point(), 0.5, new Sensor("in.txt", "out.txt")));
52 endNode = new EndNode(endPoint);
53 }
54
60 internal abstract IEnumerable<Point> LanePoints(double lanePointsMaxDistance);
61
66 public void AddInnerNode(InnerNode innerNodeToAdd)
67 {
68 innerNodes.Add(innerNodeToAdd);
69 }
70 }
71 }
Microscopic_Traffic_Simulator___Model.GeometricObjects.Nodes
Definition: EndNode.cs:4
System
Microscopic_Traffic_Simulator___Model.GeometricObjects.Lanes.Lane.startNode
StartNode startNode
Node on the input end of lane.
Definition: Lane.cs:19
Microscopic_Traffic_Simulator___Model.GeometricObjects.Nodes.EndNode
Node on the end of the lane.
Definition: EndNode.cs:10
Microscopic_Traffic_Simulator___Model.TrafficObjects.Sensor
Class representing sensor.
Definition: Sensor.cs:14
Microscopic_Traffic_Simulator___Model.GeometricObjects.Lanes.Lane.AddInnerNode
void AddInnerNode(InnerNode innerNodeToAdd)
Adds new inner node.
Definition: Lane.cs:66
Microscopic_Traffic_Simulator___Model.GeometricObjects.Nodes.SensorNode
Node containing sensor.
Definition: SensorNode.cs:11
Microscopic_Traffic_Simulator___Model.TrafficObjects
Definition: Generator.cs:7
Microscopic_Traffic_Simulator___Model.GeometricObjects.Lanes.Lane
Represent single lane.
Definition: Lane.cs:14
Microscopic_Traffic_Simulator___Model.GeometricObjects.Nodes.StartNode
Node on the beginning of the lane and can also contain generator.
Definition: StartNode.cs:11
Microscopic_Traffic_Simulator___Model.GeometricObjects.Nodes.InnerNode
Node on the lane which is not the start or end node.
Definition: InnerNode.cs:10
Microscopic_Traffic_Simulator___Model.GeometricObjects.Lanes.Lane.Lane
Lane(Point startPoint, Point endPoint)
Lane constructor.
Definition: Lane.cs:48
Microscopic_Traffic_Simulator___Model.GeometricObjects
Definition: GeometricTopology.cs:8
Microscopic_Traffic_Simulator___Model.GeometricObjects.Lanes.Lane.endNode
Node endNode
Node on the output end of lane.
Definition: Lane.cs:28
Microscopic_Traffic_Simulator___Model
Microscopic_Traffic_Simulator___Model.GeometricObjects.Nodes.Node
Class representing an object in topology on lane.
Definition: Node.cs:10