public void RandomDeplayment() { PublicParamerters.NumberofNodes = myNetWork.Count; NeighborsDiscovery overlappingNodesFinder = new NeighborsDiscovery(myNetWork); overlappingNodesFinder.GetOverlappingForAllNodes(); isCoverageSelected = true; DisplaySimulationParameters("Random"); EngageMacAndRadioProcol(); TopologyConstractor.BuildToplogy(Canvas_SensingFeild, myNetWork); // merged path PublicParamerters.clusterRadius = 100; RandomeNumberGenerator.SetSeedFromSystemTime(); Ring.getCenterOfNetwork(); foreach (Sensor sen in myNetWork) { sen.NetworkCenter = PublicParamerters.networkCenter; sen.RingNeighborRule = new RingNeighbor(sen); } Ring.setInitialParameters(100, 10, Canvas_SensingFeild); Ring.startRingConstruction(); // RingNodes are all defined }
public void RandomDeplayment(int sinkIndex) { PublicParameters.NumberofNodes = myNetWork.Count; int rootNodeId = sinkIndex; PublicParameters.SinkNode = myNetWork[rootNodeId]; NeighborsDiscovery overlappingNodesFinder = new NeighborsDiscovery(myNetWork); overlappingNodesFinder.GetOverlappingForAllNodes(); isCoverageSelected = true; PublicParameters.Density = Density.GetDensity(myNetWork); DisplaySimulationParameters(rootNodeId, "Random"); EngageMacAndRadioProcol(); TopologyConstractor.BuildToplogy(Canvas_SensingFeild, myNetWork); double radius; radius = (PublicParameters.CommunicationRangeRadius * 1.5); double clusterArea = Math.PI * (Math.Pow((radius), 2)); PublicParameters.cellRadius = radius; PublicParameters.myNetwork = myNetWork; if (buildMethod == null) { buildMethod = "center"; } // Tree tree = new Tree(); //tree.startChanging(Tree_Show); CellGroup.getAverageSensors(); ConvexHullRing.setInitialParameters(radius, 10, Canvas_SensingFeild); ConvexHullRing.startRingConstruction(); // RingNodes are all defined MobileModel.passField(Canvas_SensingFeild); networkInitialized = true; SensingFieldArea.GetAreaOfSensingField(); NetworkConstruction constructor = new NetworkConstruction(Canvas_SensingFeild, "center"); MyGraph = Graph.ConvertNodeToVertex(myNetWork); InitMobileSink(); }
public void RandomDeplayment() { PublicParamerters.NumberofNodes = myNetWork.Count; NeighborsDiscovery overlappingNodesFinder = new NeighborsDiscovery(myNetWork); overlappingNodesFinder.GetOverlappingForAllNodes(); isCoverageSelected = true; DisplaySimulationParameters("Random"); EngageMacAndRadioProcol(); TopologyConstractor.BuildToplogy(Canvas_SensingFeild, myNetWork); // merged path DVL cc = new DVL(myNetWork, Canvas_SensingFeild); }
public void RandomDeplayment(int sinkIndex) { PublicParamerters.NumberofNodes = myNetWork.Count; int rootNodeId = sinkIndex; PublicParamerters.SinkNode = myNetWork[rootNodeId]; NeighborsDiscovery overlappingNodesFinder = new NeighborsDiscovery(myNetWork); overlappingNodesFinder.GetOverlappingForAllNodes(); string PowersString = "γL=" + Settings.Default.ExpoLCnt + ",γR=" + Settings.Default.ExpoRCnt + ", γH=" + Settings.Default.ExpoHCnt + ",γD" + Settings.Default.ExpoDCnt; PublicParamerters.PowersString = PublicParamerters.NetworkName + ", " + PowersString; lbl_PowersString.Content = PublicParamerters.PowersString; isCoverageSelected = true; PublicParamerters.Density = Density.GetDensity(myNetWork); DisplaySimulationParameters(rootNodeId, "Random"); EngageMacAndRadioProcol(); TopologyConstractor.BuildToplogy(Canvas_SensingFeild, myNetWork); HopsToSinkComputation.ComputeHopsToSink(PublicParamerters.SinkNode); // fill flows: foreach (Sensor sen in myNetWork) { UplinkRouting.ComputeUplinkFlowEnery(sen); } MyGraph = Graph.ConvertNodeToVertex(myNetWork); // }
public void RandomDeplayment(int sinkIndex) { PublicParameters.NumberofNodes = myNetWork.Count; int rootNodeId = sinkIndex; PublicParameters.SinkNode = myNetWork[rootNodeId]; NeighborsDiscovery overlappingNodesFinder = new NeighborsDiscovery(myNetWork); overlappingNodesFinder.GetOverlappingForAllNodes(); isCoverageSelected = true; PublicParameters.Density = Density.GetDensity(myNetWork); DisplaySimulationParameters(rootNodeId, "Random"); EngageMacAndRadioProcol(); TopologyConstractor.BuildToplogy(Canvas_SensingFeild, myNetWork); double radius; //radius = (PublicParameters.Density / 2) * (PublicParameters.CommunicationRangeRadius / 2); radius = 100; double clusterArea = Math.PI * (Math.Pow((radius), 2)); PublicParameters.clusterRadius = radius; PublicParameters.myNetwork = myNetWork; if (buildMethod == null) { buildMethod = "center"; } Ring.getCenterOfNetwork(); foreach (Sensor sen in PublicParameters.myNetwork) { sen.NetworkCenter = PublicParameters.networkCenter; sen.RingNeighborRule = new RingNeighbor(sen); } Ring.setInitialParameters(radius, 10, Canvas_SensingFeild); Ring.startRingConstruction(); // RingNodes are all defined // Need to define the neighbors of the ring nodes BorderHullRing.setInitialParameters(radius, 10, Canvas_SensingFeild); BorderHullRing.startRingConstruction(); // RingNodes are all defined // BorderHullRing.setInitialParameters(radius*4, 10, Canvas_SensingFeild); //BorderHullRing.startRingConstruction(); // RingNodes are all defined MobileModel.passField(Canvas_SensingFeild); PublicParameters.InitialRingCount = PublicParameters.RingNodes.Count; networkInitialized = true; MyGraph = Graph.ConvertNodeToVertex(myNetWork); InitMobileSink(); TrialTimer.Interval = TimeSpan.FromSeconds(20); TrialTimer.Tick += TrialTimer_Tick; TrialTimer.Start(); }