+ XBT_DEBUG("Call disk_model_init");
+ int disk_id = find_model_description(surf_disk_model_description, disk_model_name);
+ surf_disk_model_description[disk_id].model_init_preparse();
+}
+
+/**
+ * @brief Auxiliary function to build the object NetZoneImpl
+ *
+ * Builds the objects, setting its father properties and root netzone if needed
+ * @param zone the parameters defining the Zone to build.
+ * @return Pointer to recently created netzone
+ */
+static simgrid::kernel::routing::NetZoneImpl*
+sg_platf_create_zone(const simgrid::kernel::routing::ZoneCreationArgs* zone)
+{
+ /* search the routing model */
+ simgrid::kernel::routing::NetZoneImpl* new_zone = nullptr;
+
+ if (strcasecmp(zone->routing.c_str(), "Cluster") == 0) {
+ new_zone = new simgrid::kernel::routing::ClusterZone(zone->id);
+ } else if (strcasecmp(zone->routing.c_str(), "ClusterDragonfly") == 0) {
+ new_zone = new simgrid::kernel::routing::DragonflyZone(zone->id);
+ } else if (strcasecmp(zone->routing.c_str(), "ClusterTorus") == 0) {
+ new_zone = new simgrid::kernel::routing::TorusZone(zone->id);
+ } else if (strcasecmp(zone->routing.c_str(), "ClusterFatTree") == 0) {
+ new_zone = new simgrid::kernel::routing::FatTreeZone(zone->id);
+ } else if (strcasecmp(zone->routing.c_str(), "Dijkstra") == 0) {
+ new_zone = new simgrid::kernel::routing::DijkstraZone(zone->id, false);
+ } else if (strcasecmp(zone->routing.c_str(), "DijkstraCache") == 0) {
+ new_zone = new simgrid::kernel::routing::DijkstraZone(zone->id, true);
+ } else if (strcasecmp(zone->routing.c_str(), "Floyd") == 0) {
+ new_zone = new simgrid::kernel::routing::FloydZone(zone->id);
+ } else if (strcasecmp(zone->routing.c_str(), "Full") == 0) {
+ new_zone = new simgrid::kernel::routing::FullZone(zone->id);
+ } else if (strcasecmp(zone->routing.c_str(), "None") == 0) {
+ new_zone = new simgrid::kernel::routing::EmptyZone(zone->id);
+ } else if (strcasecmp(zone->routing.c_str(), "Vivaldi") == 0) {
+ new_zone = new simgrid::kernel::routing::VivaldiZone(zone->id);
+ } else if (strcasecmp(zone->routing.c_str(), "Wifi") == 0) {
+ new_zone = new simgrid::kernel::routing::WifiZone(zone->id);
+ } else {
+ xbt_die("Not a valid model!");
+ }
+ new_zone->set_parent(current_routing);
+
+ if (current_routing == nullptr) { /* it is the first one */
+ simgrid::s4u::Engine::get_instance()->set_netzone_root(new_zone->get_iface());
+ } else {
+ /* set the father behavior */
+ if (current_routing->hierarchy_ == simgrid::kernel::routing::NetZoneImpl::RoutingMode::unset)
+ current_routing->hierarchy_ = simgrid::kernel::routing::NetZoneImpl::RoutingMode::recursive;
+ /* add to the sons dictionary */
+ current_routing->get_children()->push_back(new_zone);
+ /* set models from parent netzone */
+ new_zone->set_network_model(current_routing->get_network_model());
+ new_zone->set_cpu_pm_model(current_routing->get_cpu_pm_model());
+ new_zone->set_cpu_vm_model(current_routing->get_cpu_vm_model());
+ new_zone->set_disk_model(current_routing->get_disk_model());
+ new_zone->set_host_model(current_routing->get_host_model());
+ }
+ return new_zone;