aboutsummaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authormanzerbredes <loic.guegan_secondary@yahoo.fr>2016-04-04 12:01:54 +0200
committermanzerbredes <loic.guegan_secondary@yahoo.fr>2016-04-04 12:01:54 +0200
commit313c51b76b750cdbc8d7bc94e209e7cabf515e8d (patch)
treefac855a33f96a8d3d94b65bc7cbfeb975a03326b /main
parent996c9fc3464cbec9ee8ac7e0d4a5b27879a70ece (diff)
test
Diffstat (limited to 'main')
-rw-r--r--main/Main.java39
1 files changed, 24 insertions, 15 deletions
diff --git a/main/Main.java b/main/Main.java
index c9bdd24..3023069 100644
--- a/main/Main.java
+++ b/main/Main.java
@@ -20,27 +20,36 @@ public class Main {
public static void main(String[] args) {
- Grid g=new Grid(Grid.Protocol.DSDV);
+ //Grid g=new Grid(Grid.Protocol.AODV);
// Build Graph for graphstream
- MyGraph gr=new MyGraph("Routage Oportuniste", g);
- gr.display();
+ //MyGraph gr=new MyGraph("Routage Oportuniste", g);
+ //gr.display();
//gr.update();
-
- // Update Graph
- while(true){
- try {
- Thread.sleep(1000);
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ for(int j=0;j<20;j++){
+ Grid g=new Grid(Grid.Protocol.AODV);
+ Grid g2=new Grid(Grid.Protocol.DSDV);
+ Grid g3=new Grid(Grid.Protocol.CUSTOM);
+
+ // Update Graph
+ for(int i=0;i<100;i++){
+ /*try {
+ Thread.sleep(10000);
+ } catch (InterruptedException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }*/
+ g.buildEdgeWithRandomWeigth();
+ g2.buildEdgeWithRandomWeigth();
+ g3.buildEdgeWithRandomWeigth();
+
+ //System.out.println("Update !");
+ //gr.update();
}
- g.buildEdgeWithRandomWeigth();
- System.out.println("Update !");
- gr.update();
+
+ System.out.println("AODV :"+g.getDebitMoy() + " DSDV :"+g2.getDebitMoy()+" CUSTOM :"+g3.getDebitMoy());
}
-
}
}