+
+void platf_graph_interconnect_line(void) {
+ /* Node are connected to the previous and the next node, in a line */
+ xbt_dynar_t dynar_nodes = NULL;
+ xbt_node_t graph_node = NULL;
+ xbt_node_t old_node = NULL;
+ unsigned int i;
+
+ dynar_nodes = xbt_graph_get_nodes(platform_graph);
+ xbt_dynar_foreach(dynar_nodes, i, graph_node) {
+ if(old_node != NULL) {
+ platf_node_connect(graph_node, old_node);
+ }
+ old_node = graph_node;
+ }
+}
+
+
+
+/* Functions used to generate interesting random values */
+
+double random_pareto(double min, double max, double K, double P, double ALPHA) {
+ double x = RngStream_RandU01(rng_stream);
+ double den = pow(1.0 - x + x*pow(K/P, ALPHA), 1.0/ALPHA);
+ double res = (1/den);
+ res += min - 1; // pareto is on [1, infinity) by default
+ if (res>max) {
+ return max;
+ }
+ return res;
+}