46 Enter_Method_Silent();
69 std::deque<node_stat> node_stats;
71 for (
int i = 0; liveNodes < (int)par(
"targetOverlayTerminalNum"); i++) {
75 "mean lifetime", nodeLifetimeMean);
78 "mean deadtime", nodeDeadtimeMean);
79 sum_l_i += 1.0/(nodeLifetimeMean + nodeDeadtimeMean);
81 nodeStat.
l = nodeLifetimeMean;
82 nodeStat.
d = nodeDeadtimeMean;
83 double nodeAvailability = nodeLifetimeMean/(nodeLifetimeMean
88 nodeStat.
alive = uniform(0, 1) < nodeAvailability;
92 node_stats.push_back( nodeStat );
99 int numNodes = node_stats.size();
100 for(
int i = 0; i < numNodes; ++i ){
102 mean_life += stat.
l/( (stat.
l + stat.
d) * sum_l_i );
108 for(
int i = 0; i < numNodes; ++i ){
125 node_stats.pop_front();
134 if (!msg->isSelfMessage()) {
163 double meanDeadtime,
bool initialize)
172 scheduleAt(std::max(simTime(), simTime() + lifetime
179 "Time between creates", SIMTIME_DBL(simTime() -
lastCreatetime)));
191 "Time between deletes", SIMTIME_DBL(simTime() -
lastDeletetime)));
199 double meanLifetime,
double meanDeadtime)
206 scheduleAt(creationTime, churnMsg);
211 return 1/(mean*(alpha -1));
218 return (pareto_shifted(a, b, 0, rng)/b - 1) / b;
243 sprintf(buf,
"pareto churn");
244 getDisplayString().setTagArg(
"t", 0, buf);