Commit f94e2a15 authored by Raymond Knopp's avatar Raymond Knopp

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6012 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent b0b74847
...@@ -74,7 +74,7 @@ MAX_NUM_NODE_TYPES /*!< All the types. Used to perform the same operations to al ...@@ -74,7 +74,7 @@ MAX_NUM_NODE_TYPES /*!< All the types. Used to perform the same operations to al
//#define eps 0.00000095367431649629 //#define eps 0.00000095367431649629
/*! A constant used to compare two doubles */ /*! A constant used to compare two doubles */
#define eps 0.10 //10.99 #define omg_eps 0.10 //10.99
#define SLEEP 1 #define SLEEP 1
#define GET_DATA 0 #define GET_DATA 0
......
...@@ -349,8 +349,8 @@ update_rwalk_nodes (double cur_time) ...@@ -349,8 +349,8 @@ update_rwalk_nodes (double cur_time)
//case1:time to next event equals to current time //case1:time to next event equals to current time
if (tmp->pair != NULL if (tmp->pair != NULL
&& ((double) tmp->pair->next_event_t >= cur_time - eps) && ((double) tmp->pair->next_event_t >= cur_time - omg_eps)
&& ((double) tmp->pair->next_event_t <= cur_time + eps)) && ((double) tmp->pair->next_event_t <= cur_time + omg_eps))
{ {
if (my_node->mobile == 1) if (my_node->mobile == 1)
sleep_rwalk_node (tmp->pair, cur_time); sleep_rwalk_node (tmp->pair, cur_time);
...@@ -361,7 +361,7 @@ update_rwalk_nodes (double cur_time) ...@@ -361,7 +361,7 @@ update_rwalk_nodes (double cur_time)
//case2: current time is greater than the time to next event //case2: current time is greater than the time to next event
else if (tmp->pair != NULL else if (tmp->pair != NULL
&& (cur_time - eps) > tmp->pair->next_event_t) && (cur_time - omg_eps) > tmp->pair->next_event_t)
{ {
while (cur_time >= tmp->pair->next_event_t) while (cur_time >= tmp->pair->next_event_t)
......
...@@ -324,8 +324,8 @@ update_rwp_nodes (double cur_time) ...@@ -324,8 +324,8 @@ update_rwp_nodes (double cur_time)
//case1:time to next event equals to current time //case1:time to next event equals to current time
if (tmp->pair != NULL if (tmp->pair != NULL
&& ((double) tmp->pair->next_event_t >= cur_time - eps) && ((double) tmp->pair->next_event_t >= cur_time - omg_eps)
&& ((double) tmp->pair->next_event_t <= cur_time + eps)) && ((double) tmp->pair->next_event_t <= cur_time + omg_eps))
{ {
if (my_node->mobile == 1) if (my_node->mobile == 1)
sleep_rwp_node (tmp->pair, cur_time); sleep_rwp_node (tmp->pair, cur_time);
...@@ -336,7 +336,7 @@ update_rwp_nodes (double cur_time) ...@@ -336,7 +336,7 @@ update_rwp_nodes (double cur_time)
//case2: current time is greater than the time to next event //case2: current time is greater than the time to next event
else if (tmp->pair != NULL else if (tmp->pair != NULL
&& (cur_time - eps) > tmp->pair->next_event_t) && (cur_time - omg_eps) > tmp->pair->next_event_t)
{ {
while (cur_time >= tmp->pair->next_event_t) while (cur_time >= tmp->pair->next_event_t)
......
...@@ -529,8 +529,8 @@ update_steadystaterwp_nodes (double cur_time) ...@@ -529,8 +529,8 @@ update_steadystaterwp_nodes (double cur_time)
//case1:time to next event equals to current time //case1:time to next event equals to current time
if (tmp->pair != NULL if (tmp->pair != NULL
&& ((double) tmp->pair->next_event_t >= cur_time - eps) && ((double) tmp->pair->next_event_t >= cur_time - omg_eps)
&& ((double) tmp->pair->next_event_t <= cur_time + eps)) && ((double) tmp->pair->next_event_t <= cur_time + omg_eps))
{ {
if (my_node->mobile == 1) if (my_node->mobile == 1)
sleep_rwp_node (tmp->pair, cur_time); sleep_rwp_node (tmp->pair, cur_time);
...@@ -541,7 +541,7 @@ update_steadystaterwp_nodes (double cur_time) ...@@ -541,7 +541,7 @@ update_steadystaterwp_nodes (double cur_time)
//case2: current time is greater than the time to next event //case2: current time is greater than the time to next event
else if (tmp->pair != NULL else if (tmp->pair != NULL
&& (cur_time - eps) > tmp->pair->next_event_t) && (cur_time - omg_eps) > tmp->pair->next_event_t)
{ {
while (cur_time >= tmp->pair->next_event_t) while (cur_time >= tmp->pair->next_event_t)
......
...@@ -296,7 +296,7 @@ update_trace_nodes (double cur_time) ...@@ -296,7 +296,7 @@ update_trace_nodes (double cur_time)
//case1:time to next event equals to current time //case1:time to next event equals to current time
if (tmp->pair != NULL && tmp->pair->next_event_t >= cur_time - eps if (tmp->pair != NULL && tmp->pair->next_event_t >= cur_time - omg_eps
&& tmp->pair->next_event_t <= cur_time ) && tmp->pair->next_event_t <= cur_time )
{ {
if (node_n->next->next == NULL) if (node_n->next->next == NULL)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment