XBT_PUBLIC(tmgr_trace_t) tmgr_trace_new_from_string(const char *id,
const char *input,
double periodicity);
+XBT_PUBLIC(tmgr_trace_t) tmgr_trace_new_uniform(double alpha, double beta);
+XBT_PUBLIC(tmgr_trace_t) tmgr_trace_new_exponential(double lambda);
+XBT_PUBLIC(tmgr_trace_t) tmgr_trace_new_weibull(double lambda, double k);
/** Defines whether a given resource is working or not */
typedef enum {
free(h);
}
+tmgr_trace_t tmgr_trace_new_uniform(double alpha, double beta)
+{
+ tmgr_trace_t trace = NULL;
+
+ trace = xbt_new0(s_tmgr_trace_t, 1);
+ trace->type = e_trace_uniform;
+ trace->s_uniform.alpha = alpha;
+ trace->s_uniform.beta = beta;
+
+ //FIXME Generate a new event date
+
+ return trace;
+}
+
+
+tmgr_trace_t tmgr_trace_new_exponential(double lambda)
+{
+ tmgr_trace_t trace = NULL;
+
+ trace = xbt_new0(s_tmgr_trace_t, 1);
+ trace->type = e_trace_exponential;
+ trace->s_exponential.lambda = lambda;
+
+ // FIXME Generate a new event date
+
+ return trace;
+}
+
+tmgr_trace_t tmgr_trace_new_weibull(double lambda, double k)
+{
+ tmgr_trace_t trace = NULL;
+
+ trace = xbt_new0(s_tmgr_trace_t, 1);
+ trace->type = e_trace_weibull;
+ trace->s_weibull.lambda = lambda;
+ trace->s_weibull.k = k;
+
+ // FIXME Generate a new event date
+
+ return trace;
+}
+
tmgr_trace_t tmgr_trace_new_from_string(const char *id, const char *input,
double periodicity)
{