XBT_PUBLIC(double func_reno_fp) (lmm_variable_t var, double x);
XBT_PUBLIC(double func_reno_fpi)(lmm_variable_t var, double x);
+XBT_PUBLIC(double func_reno2_f) (lmm_variable_t var, double x);
+XBT_PUBLIC(double func_reno2_fp) (lmm_variable_t var, double x);
+XBT_PUBLIC(double func_reno2_fpi)(lmm_variable_t var, double x);
+
XBT_PUBLIC(double func_vegas_f) (lmm_variable_t var, double x);
XBT_PUBLIC(double func_vegas_fp) (lmm_variable_t var, double x);
XBT_PUBLIC(double func_vegas_fpi)(lmm_variable_t var, double x);
*/
XBT_PUBLIC(void) surf_network_model_init_Reno(const char *filename);
+/** \brief Initializes the platform with the network model Reno2
+ * \ingroup SURF_models
+ * \param filename XML platform file name
+ *
+ * The problem is related to max( sum( arctan(C * Df * xi) ) ).
+ *
+ * Reference:
+ * [LOW01] S. H. Low. A duality model of TCP and queue management algorithms.
+ * IEEE/ACM Transaction on Networking, 11(4):525-536, 2003.
+ *
+ * Call this function only if you plan using surf_workstation_model_init_compound.
+ *
+ */
+XBT_PUBLIC(void) surf_network_model_init_Reno2(const char *filename);
+
/** \brief Initializes the platform with the network model Vegas
* \ingroup SURF_models
* \param filename XML platform file name
/* xbt_assert0(res_fpi>0.0,"Don't call me with stupid values!"); */
return sqrt(res_fpi);
}
+
+
+/* Implementing new Reno-2
+ * For Reno-2: $f(x) = U_f(x_f) = \frac{{2}{D_f}}*ln(2+x*D_f)$
+ * Therefore: $fp(x) = 2/(Df*x + 2)
+ * Therefore: $fpi(x) = (2*Df)/x - 4
+ */
+#define RENO2_SCALING 1.0
+double func_reno2_f(lmm_variable_t var, double x)
+{
+ xbt_assert0(var->df > 0.0, "Don't call me with stupid values!");
+ return RENO2_SCALING * (1.0/var->df) * log((x*var->df)/(2.0*x*var->df+3.0));
+}
+
+double func_reno2_fp(lmm_variable_t var, double x)
+{
+ return RENO2_SCALING * 3.0/(var->df*x*(2.0*var->df*x+3.0));
+}
+
+double func_reno2_fpi(lmm_variable_t var, double x)
+{
+ double res_fpi;
+ double tmp;
+
+ xbt_assert0(x > 0.0, "Don't call me with stupid values!");
+ tmp= x*var->df*var->df;
+ res_fpi= tmp*(9.0*x+24.0);
+
+ if (res_fpi <= 0.0)
+ return 0.0;
+
+ res_fpi = RENO2_SCALING * (-3.0*tmp + sqrt(res_fpi))/(4.0*tmp);
+ return res_fpi;
+}
network_maxmin_system,
network_solve);
+#define VARIABLE(action) (*((lmm_variable_t*)(((char *) (action)) + xbt_swag_offset(s_action, variable) )))
+
xbt_swag_foreach(action, running_actions) {
if (action->latency > 0) {
if (min < 0)
(surf_model_t) surf_network_model);
}
+
+void surf_network_model_init_Reno2(const char *filename)
+{
+ if (surf_network_model)
+ return;
+ surf_network_model_init_internal();
+ parse_file(filename);
+
+ xbt_dynar_push(model_list, &surf_network_model);
+ lmm_set_default_protocol_function(func_reno2_f, func_reno2_fp,
+ func_reno2_fpi);
+ network_solve = lagrange_solve;
+
+ update_model_description(surf_network_model_description,
+ surf_network_model_description_size,
+ "Reno2",
+ (surf_model_t) surf_network_model);
+}
+
void surf_network_model_init_Vegas(const char *filename)
{
if (surf_network_model)
"SURF_ACTION_NOT_IN_THE_SYSTEM"
};
+int surf_network_model_description_size = 5
+#ifdef HAVE_GTNETS
+ + 1
+#endif
+#ifdef HAVE_SDP
+ + 1
+#endif
+ ;
+
s_surf_model_description_t surf_network_model_description[surf_network_model_description_size] = {
{"Constant", NULL, surf_network_model_init_Constant},
{"CM02", NULL, surf_network_model_init_CM02},
{"SDP", NULL, surf_network_model_init_SDP},
#endif
{"Reno", NULL, surf_network_model_init_Reno},
+ {"Reno2", NULL, surf_network_model_init_Reno2},
{"Vegas", NULL, surf_network_model_init_Vegas}
};
} else
min = action->max_duration;
- DEBUG5("Found action (%p: duration = %f, remains = %f, value = %f) ! %f",
- action, action->max_duration, action->remains, value, min);
for (action = xbt_swag_getNext(action, running_actions->offset);
action;