From 0d9aacb799b18b0f8728d6924c2283268d738555 Mon Sep 17 00:00:00 2001 From: navarro Date: Mon, 25 Jun 2012 15:08:07 +0200 Subject: [PATCH] TODO comments --- src/surf/maxmin.c | 5 ++++- src/surf/surf_routing.c | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/surf/maxmin.c b/src/surf/maxmin.c index 9598be29a1..1068ef6b36 100644 --- a/src/surf/maxmin.c +++ b/src/surf/maxmin.c @@ -579,7 +579,7 @@ void lmm_solve(lmm_system_t sys) } // On a deux dynars: // - Celui de cnst_list avec les csnt_light - // - saturated_constraint_set, celui des indexes de cnst_list qui sont saturées + // - saturated_constraint_set, celui des indexes de cnst_list qui sont saturés // Si la cnst_light est un minimum_usage on la met dans saturated_constraint_set saturated_constraint_set_update(sys, cnst, &min_usage); } @@ -638,6 +638,8 @@ void lmm_solve(lmm_system_t sys) if (cnst->shared) { double_update(&(cnst->remaining), elem->value * var->value); double_update(&(cnst->usage), elem->value / var->weight); + // mettre à jour le cnst_light->remaining_over_usage correspondant + // cnst_light->remaining_over_usage = cnst->remaining / cnst->usage if(cnst->usage<=0 || cnst->remaining<=0) { xbt_swag_remove(cnst, cnst_list); xbt_swag_insert_at_tail(cnst, cnst_list); @@ -655,6 +657,7 @@ void lmm_solve(lmm_system_t sys) if ((elem->value > 0)) { cnst->usage = MAX(cnst->usage, elem->value / elem->variable->weight); + // mettre à jour le cnst_light->remaining_over_usage correspondant XBT_DEBUG("Constraint Usage %d : %f", cnst->id_int, cnst->usage); make_elem_active(elem); diff --git a/src/surf/surf_routing.c b/src/surf/surf_routing.c index 023c1d9520..69f5cc5a01 100644 --- a/src/surf/surf_routing.c +++ b/src/surf/surf_routing.c @@ -582,6 +582,7 @@ static void _get_route_and_latency(sg_routing_edge_t src, sg_routing_edge_t dst, if (src_father == dst_father) { /* SURF_ROUTING_BASE */ route.link_list = *links; common_father->get_route_and_latency(common_father, src, dst, &route,latency); + // if vivaldi latency+=vivaldi(src,dst) return; } @@ -605,12 +606,13 @@ static void _get_route_and_latency(sg_routing_edge_t src, sg_routing_edge_t dst, /* If source gateway is not our source, we have to recursively find our way up to this point */ if (src != src_gateway_net_elm) _get_route_and_latency(src, src_gateway_net_elm, links, latency); - xbt_dynar_merge(links, &route.link_list); /* If dest gateway is not our destination, we have to recursively find our way from this point */ if (dst_gateway_net_elm != dst) _get_route_and_latency(dst_gateway_net_elm, dst, links, latency); + + // if vivaldi latency+=vivaldi(src_gateway,dst_gateway) } /** -- 2.20.1