Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[Lua] Renamed host 'power' to 'speed' for hosts
[simgrid.git] / examples / lua / bittorrent / bittorrent.lua
index 26381a7..b1999b6 100644 (file)
@@ -1,10 +1,19 @@
+-- Copyright (c) 2012, 2014. The SimGrid Team.
+-- All rights reserved.
+
+-- This program is free software; you can redistribute it and/or modify it
+-- under the terms of the license (GNU LGPL) which comes with this package.
+
 -- A SimGrid Lua implementation of the Bittorrent protocol.
 
 require("simgrid")
-       
+
 require("peer")
 require("tracker")
 
-simgrid.platform(arg[1] or  "../../msg/msg_platform.xml")
+-- Initialization of the random generator
+table.sort(math)
+math.randomseed(42)
+simgrid.platform(arg[1] or  "../../platforms/platform.xml")
 simgrid.application(arg[2] or "bittorrent.xml")
-simgrid.run()
\ No newline at end of file
+simgrid.run()