Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add new example to simdag using lua script(...not yet improved)
[simgrid.git] / examples / simdag / platform_script.lua
1 require "simgrid"
2
3   simgrid.Host.new{id="Tremblay",power=98095000};
4   simgrid.Host.new{id="Jupiter",power=76296000};
5   simgrid.Host.new{id="Fafard",power=76296000};
6   simgrid.Host.new{id="Ginette",power=48492000};
7   simgrid.Host.new{id="Bourassa",power=48492000};
8
9     -- create Links
10   for i=0,11 do
11     simgrid.Link.new{id=i,bandwidth=252750+ i*768,latency=0.000270544+i*0.087};   
12   end
13   -- simgrid.Route.new(src_id,des_id,links_nb,links_list)
14    simgrid.Route.new("Tremblay","Jupiter",{"1"});
15    simgrid.Route.new("Tremblay","Fafard",{"0","1","2","3","4","8"});
16    simgrid.Route.new("Tremblay","Ginette",{"3","4","5"});
17    simgrid.Route.new("Tremblay","Bourassa",{"0","1","3","2","4","6","7"});
18
19    simgrid.Route.new("Jupiter","Tremblay",{"1"});
20    simgrid.Route.new("Jupiter","Fafard",{"0","1","2","3","4","8","9"});
21    simgrid.Route.new("Jupiter","Ginette",{"3","4","5","9"});
22    simgrid.Route.new("Jupiter","Bourassa",{"0","1","2","3","4","6","7","9"});
23  
24    simgrid.Route.new("Fafard","Tremblay",{"0","1","2","3","4","8"});
25    simgrid.Route.new("Fafard","Jupiter",{"0","1","2","3","4","8","9"});
26    simgrid.Route.new("Fafard","Ginette",{"0","1","2","5","8"});
27    simgrid.Route.new("Fafard","Bourassa",{"6","7","8"});
28   
29    simgrid.Route.new("Ginette","Tremblay",{"3","4","5"});
30    simgrid.Route.new("Ginette","Jupiter",{"3","4","5","9"});
31    simgrid.Route.new("Ginette","Fafard",{"0","1","2","5","8"});
32    simgrid.Route.new("Ginette","Bourassa",{"0","1","2","5","6","7"});
33
34    simgrid.Route.new("Bourassa","Tremblay",{"0","1","3","2","4","6","7"});
35    simgrid.Route.new("Bourassa","Jupiter",{"0","1","2","3","4","6","7","9"});
36    simgrid.Route.new("Bourassa","Fafard",{"6","7","8"});
37    simgrid.Route.new("Bourassa","Ginette",{"0","1","2","5","6","7"});
38   
39    --Save Platform
40    simgrid.sd_register_platform();
41
42