1 #include "simdag/simdag.h"
3 #include "xbt/asserts.h"
4 #include "xbt/sysdep.h"
7 static int init_done = 0;
9 /* Initialises SG internal data. This function should be called before any other SG function.
11 void SG_init(int *argc, char **argv) {
12 xbt_assert0(!init_done, "SG_init already called");
14 sg_global = xbt_new0(s_SG_global_t, 1);
15 sg_global->workstations = xbt_dict_new();
16 sg_global->workstation_count = 0;
18 surf_init(argc, argv);
23 /* Checks that SG_init has been called.
25 void check_init_done() {
26 xbt_assert0(init_done, "SG_init not called yet");
29 /* Creates the environnement described in a xml file of a platform descriptions.
31 void SG_create_environnement(const char *platform_file) {
33 surf_timer_resource_init(file);
34 surf_workstation_resource_init_KCCFLN05(file); /* tell Surf to create the environnement */
38 /* Launches the simulation. Returns a NULL-terminated array of SG_task_t whose state has changed.
40 SG_task_t* SG_simulate(double how_long)