Ejemplo n.º 1
0
 public TestObjectSupport()
 {
     node1 = new Node("Node1", new Location(35, 53), 30.4, 18000);
     node2 = new Node("Node2", new Location(23, 18), 26.4, 14000);
     network = new Network();
     network.Nodes.Add(node1);
     network.Nodes.Add(node2);
     commonLocation = new Location(12, 37);
 }
Ejemplo n.º 2
0
		public static Network GetSampleNetwork() 
		{
			Network network = new Network();
			network.Name = "Rhine";
			network.LastModificationTime = DateTime.Now;

			Node node1 = new Node("Node1", new Location (35, 53), 30.4, 18000);
			Node node2 = new Node("Node2", new Location (23, 18), 26.4, 14000);
			Node node3 = new Node("Node3", new Location (67, 63), 12.6, 12000);
			Node node4 = new Node("Node4", new Location (12, 23), 0.3, 1500);
			Node node5 = new Node("Node5", new Location (14, 34), 9.6, 2000);

			Branch branch1 = new Branch ("Nederrijn", node1, node2, 10, 80);
			Branch branch2 = new Branch ("IJssel", node2, node3, 60, 30);
			Branch branch3 = new Branch ("Rijn", node2, node4, 100, 40);
			Branch branch4 = new Branch ("Nederrijn", node1, node5, 110, 50);

			network.Nodes.Add (node1);
			network.Nodes.Add (node2);
			network.Nodes.Add (node3);
			network.Nodes.Add (node4);
			network.Nodes.Add (node5);

			network.Branches.Add (branch1);
			network.Branches.Add (branch2);
			network.Branches.Add (branch3);
			network.Branches.Add (branch4);

			return network;
		}
Ejemplo n.º 3
0
		public Branch(String NewName, Node NewBegin, Node NewEnd, double NewLength, double NewWidth)
		{
			Name = NewName;
			BeginNode = NewBegin;
			EndNode = NewEnd;
			Length = NewLength;
			Width = NewWidth;
		}