link->state_trace,
link->policy,
link->properties);
+
xbt_lib_set(link_lib, link->id, SURF_LINK_LEVEL, net_link);
}
NS3_HOST_LEVEL = xbt_lib_add_level(host_lib,(void_f_pvoid_t)free_ns3_host);
NS3_ASR_LEVEL = xbt_lib_add_level(as_router_lib,(void_f_pvoid_t)free_ns3_host);
- NS3_LINK_LEVEL = xbt_lib_add_level(link_lib,(void_f_pvoid_t)free_ns3_link);
}
NetworkNS3Model::~NetworkNS3Model() {
do {
ns3_simulator(now);
time_to_next_flow_completion = ns3_time() - surf_get_clock();//FIXME: use now instead ?
- } while(double_equals(time_to_next_flow_completion, 0));
+ } while(double_equals(time_to_next_flow_completion, 0, sg_surf_precision));
XBT_DEBUG("min : %f", now);
XBT_DEBUG("ns3 time : %f", ns3_time());
/* If there are no running flows, just return */
if (!getRunningActionSet()->size()) {
- while(double_positive(now-ns3_time())) {
+ while(double_positive(now-ns3_time(), sg_surf_precision)) {
ns3_simulator(now-ns3_time());
}
return;