--- /dev/null
+#include <Simulation.hpp>\r
+\r
+#include <Simulator.hpp>\r
+\r
+namespace SimGrid\r
+{\r
+ namespace Msg\r
+ {\r
+ int Simulation::execute(int argc, char** argv)\r
+ {\r
+ if(argc < 3) \r
+ {\r
+ info("Usage: Msg platform_file deployment_file");\r
+ return 1;\r
+ }\r
+ \r
+ // initialize the MSG simulator. Must be done before anything else (even logging).\r
+ Simulator::init(argc, argv);\r
+ \r
+ // the environment to load\r
+ Environment environment(argv[1]);\r
+ // the application to deploy\r
+ Application application(argv[2]);\r
+ // the simulation\r
+ Simulation simulation;\r
+ \r
+ // load the environment\r
+ environment.load();\r
+ \r
+ // deploy the application\r
+ application.deploy();\r
+ \r
+ // run the simulation\r
+ simulation.run(environment, application);\r
+ \r
+ // finalize the simulator\r
+ Simulator::finalize();\r
+ }\r
+ } // namespace Msg\r
+} // namespace SimGrid\r