Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
lua layer that reimplements SPLAY methodsfor rpc, job and events modules, with a...
[simgrid.git] / examples / lua / splaySim / splay_platform.lua
1 require "simgrid"
2
3   simgrid.AS.new{id="AS0",mode="Full"}; 
4
5   -- create 5 Splayd (Hosts)
6   for i=0,5,1 do
7         simgrid.AS.addHost{AS="AS0",id="Splayd_"..i,power= 7000000+i*1000000}
8   end
9
10     -- create Links
11   for i=10,0,-1 do
12     simgrid.AS.addLink{AS="AS0",id=i,bandwidth=252750+ i*768,latency=0.000270544+i*0.087};   
13   end
14   -- simgrid.Route.new(src_id,des_id,links_nb,links_list)
15    simgrid.AS.addRoute("AS0","Splayd_1","Splayd_2",{"1"});
16    simgrid.AS.addRoute("AS0","Splayd_1","Splayd_3",{"0","1","2","3","4","8"});
17    simgrid.AS.addRoute("AS0","Splayd_1","Splayd_4",{"3","4","5"});
18    simgrid.AS.addRoute("AS0","Splayd_1","Splayd_5",{"0","1","3","2","4","6","7"});
19
20    simgrid.AS.addRoute("AS0","Splayd_2","Splayd_1",{"1"});
21    simgrid.AS.addRoute("AS0","Splayd_2","Splayd_3",{"0","1","2","3","4","8","9"});
22    simgrid.AS.addRoute("AS0","Splayd_2","Splayd_4",{"3","4","5","9"});
23    simgrid.AS.addRoute("AS0","Splayd_2","Splayd_5",{"0","1","2","3","4","6","7","9"});
24  
25    simgrid.AS.addRoute("AS0","Splayd_3","Splayd_1",{"0","1","2","3","4","8"});
26    simgrid.AS.addRoute("AS0","Splayd_3","Splayd_2",{"0","1","2","3","4","8","9"});
27    simgrid.AS.addRoute("AS0","Splayd_3","Splayd_4",{"0","1","2","5","8"});
28    simgrid.AS.addRoute("AS0","Splayd_3","Splayd_5",{"6","7","8"});
29   
30    simgrid.AS.addRoute("AS0","Splayd_4","Splayd_1",{"3","4","5"});
31    simgrid.AS.addRoute("AS0","Splayd_4","Splayd_2",{"3","4","5","9"});
32    simgrid.AS.addRoute("AS0","Splayd_4","Splayd_3",{"0","1","2","5","8"});
33    simgrid.AS.addRoute("AS0","Splayd_4","Splayd_5",{"0","1","2","5","6","7"});
34
35    simgrid.AS.addRoute("AS0","Splayd_5","Splayd_1",{"0","1","3","2","4","6","7"});
36    simgrid.AS.addRoute("AS0","Splayd_5","Splayd_2",{"0","1","2","3","4","6","7","9"});
37    simgrid.AS.addRoute("AS0","Splayd_5","Splayd_3",{"6","7","8"});
38    simgrid.AS.addRoute("AS0","Splayd_5","Splayd_4",{"0","1","2","5","6","7"});
39   
40    --Save Platform
41    simgrid.msg_register_platform();
42
43
44