+ /* load the DAX file */
+ auto dax = sg4::create_DAG_from_DAX(argv[2]);
+
+We look for the best host for the root task and schedule it.
+We then advance the simulation to unlock next schedulable tasks.
+
+.. code-block:: cpp
+
+ /* Schedule the root first */
+ double finish_time;
+ auto* root = static_cast<sg4::Exec*>(dax.front().get());
+ auto host = get_best_host(root, &finish_time);
+ schedule_on(root, host);
+ e.run();
+
+Then, we get to the major loop of the algorithm.
+This loop goes on until all tasks have been scheduled and executed.
+It starts by finding ready tasks using `get_ready_tasks`.
+It iteratively looks for the task that will finish first among ready tasks using `get_best_host`, and place it using `schedule_on`.
+When no more tasks can be placed, we advance the simulation.
+
+.. code-block:: cpp
+
+ while (not vetoed.empty()) {
+ XBT_DEBUG("Start new scheduling round");
+ /* Get the set of ready tasks */
+ auto ready_tasks = get_ready_tasks(dax);
+ vetoed.clear();
+
+ if (ready_tasks.empty()) {
+ /* there is no ready exec, let advance the simulation */