Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
b38d3ce64e21d925afe73cdb5043dba8bd67ba29
[simgrid.git] / examples / lua / console / platform.lua
1 -- Copyright (c) 2011, 2013-2014. The SimGrid Team.
2 -- All rights reserved.
3
4 -- This program is free software; you can redistribute it and/or modify it
5 -- under the terms of the license (GNU LGPL) which comes with this package.
6
7 simgrid.platf.open();
8
9 simgrid.platf.AS_open{id="AS0",mode="Full"}; 
10
11 simgrid.platf.host_new{id="Tremblay",power=98095000};
12 simgrid.platf.host_new{id="Jupiter",power=76296000};
13 simgrid.platf.host_new{id="Fafard",power=76296000};
14 simgrid.platf.host_new{id="Ginette",power=48492000};
15 simgrid.platf.host_new{id="Bourassa",power=48492000};
16
17 -- create Links
18 for i=10,0,-1 do
19     simgrid.platf.link_new{id=i,bandwidth=252750+ i*768,latency=0.000270544+i*0.087};  
20 end
21
22 simgrid.platf.route_new{src="Tremblay",dest="Jupiter",links="1"};
23 simgrid.platf.route_new{src="Tremblay",dest="Fafard",links="0,1,2,3,4,8"};
24 simgrid.platf.route_new{src="Tremblay",dest="Ginette",links="3,4,5"};
25 simgrid.platf.route_new{src="Tremblay",dest="Bourassa",links="0,1,3,2,4,6,7"};
26
27 simgrid.platf.route_new{src="Jupiter",dest="Tremblay",links="1"};
28 simgrid.platf.route_new{src="Jupiter",dest="Fafard",links="0,1,2,3,4,8,9"};
29 simgrid.platf.route_new{src="Jupiter",dest="Ginette",links="3,4,5,9"};
30 simgrid.platf.route_new{src="Jupiter",dest="Bourassa",links="0,1,2,3,4,6,7,9"};
31  
32 simgrid.platf.route_new{src="Fafard",dest="Tremblay",links="0,1,2,3,4,8"};
33 simgrid.platf.route_new{src="Fafard",dest="Jupiter",links="0,1,2,3,4,8,9"};
34 simgrid.platf.route_new{src="Fafard",dest="Ginette",links="0,1,2,5,8"};
35 simgrid.platf.route_new{src="Fafard",dest="Bourassa",links="6,7,8"};
36   
37 simgrid.platf.route_new{src="Ginette",dest="Tremblay",links="3,4,5"};
38 simgrid.platf.route_new{src="Ginette",dest="Jupiter",links="3,4,5,9"};
39 simgrid.platf.route_new{src="Ginette",dest="Fafard",links="0,1,2,5,8"};
40 simgrid.platf.route_new{src="Ginette",dest="Bourassa",links="0,1,2,5,6,7"};
41
42 simgrid.platf.route_new{src="Bourassa",dest="Tremblay",links="0,1,3,2,4,6,7"};
43 simgrid.platf.route_new{src="Bourassa",dest="Jupiter",links="0,1,2,3,4,6,7,9"};
44 simgrid.platf.route_new{src="Bourassa",dest="Fafard",links="6,7,8"};
45 simgrid.platf.route_new{src="Bourassa",dest="Ginette",links="0,1,2,5,6,7"};
46 simgrid.platf.AS_close();
47
48 simgrid.platf.close();
49