#if SIMGRID_HAVE_JSON
#include <nlohmann/json.hpp>
+#include <sstream>
#endif
#if HAVE_GRAPHVIZ
std::ifstream f(filename);
auto data = nlohmann::json::parse(f);
std::vector<ActivityPtr> dag = {};
- std::map<std::string, std::vector<ActivityPtr>> successors = {};
+ std::map<std::string, std::vector<ActivityPtr>, std::less<>> successors = {};
std::map<ActivityPtr, Host*> comms_destinations = {};
ActivityPtr current;
}
dag.push_back(current);
- for (auto const& parent: task["parents"]) {
- auto it = successors.find(parent);
- if (it == successors.end())
- successors[parent] = {};
+ for (auto const& parent : task["parents"])
successors[parent].push_back(current);
- }
}
// Assign successors
for (auto const& [parent, successors_list] : successors)