+/* if (nb_link > 1)
+ route_new(src_id, dst_id, link_name, nb_link);
+*/
+ name = bprintf("%d##%d",src_id, dst_id);
+ xbt_dict_set(route_table, name, route_link_list, NULL);
+ free(name);
+}
+
+//This is not used anymore. one hop routes are created in add_route
+/* Create the one-hope route: BY KF */
+static void parse_route_set_onehop_route(void)
+{
+ if (nb_link == 1)
+ route_onehop_new(src_id, dst_id, link_name, nb_link);
+}
+
+static void add_route()
+{
+ xbt_ex_t e;
+ unsigned int cpt = 0;
+ int i = 0;
+
+ nb_link = xbt_dynar_length(links);
+ link_name = xbt_realloc(link_name, (nb_link) * sizeof(char *));
+
+ src_id = atoi(xbt_dynar_get_as(keys, 0, char*));
+ dst_id = atoi(xbt_dynar_get_as(keys, 1, char*));
+
+ i = 0;
+ char* link = NULL;
+ xbt_dynar_foreach (links, cpt, link) {
+ TRY {
+ link_name[i++] = xbt_dict_get(link_set, link);
+ }
+ CATCH(e) {
+ RETHROW1("Link %s not found (dict raised this exception: %s)", link);
+ }
+ }
+ if (nb_link > 1)
+ route_new(src_id, dst_id, link_name, nb_link);
+ if (nb_link == 1)
+ route_onehop_new(src_id, dst_id, link_name, nb_link);