#include <asim.h>
Collaboration diagram for RedRouter:

Definition at line 58 of file asim.h.
Public Member Functions | |
| double | ComputeProbability (double Lambda, double &Delay) |
| short | Identical (int mTh, int MTh, double MP) |
| RedRouter (int mTh, int MTh, double MP) | |
Private Member Functions | |
| void | Populate () |
Private Attributes | |
| double | Lambda_H |
| double | Lambda_L |
| double | MaxP |
| double | MaxTh |
| double | MinTh |
|
||||||||||||||||
|
Definition at line 65 of file asim.h. References MaxP, MaxTh, MinTh, and Populate().
Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 89 of file asim.h. References a, b, Lambda_H, Lambda_L, MaxP, MaxTh, and MinTh. 00089 { 00090 double p; 00091 00092 if (Lambda <= Lambda_L) { 00093 delay = Lambda/(1-Lambda); 00094 return 0; 00095 } 00096 00097 if (MaxP < 1 && Lambda > Lambda_H) { 00098 delay = MaxTh; 00099 p = (Lambda - Lambda_H*(1 - MaxP))/Lambda; 00100 return p; 00101 } 00102 00103 // Solve the quadratic a.p^2 + b.p + c = 0 00104 double a, b, c; 00105 a = Lambda * (MaxTh - MinTh)/(MaxP); 00106 b = (MaxTh - MinTh)*(1-Lambda)/MaxP + MinTh * Lambda + Lambda; 00107 c = MinTh*(1-Lambda)-Lambda; 00108 00109 p = (-b + sqrt(b*b - 4 * a * c))/(2 * a); 00110 delay = Lambda*(1-p)/(1-(Lambda*(1-p))); 00111 return p; 00112 }
|
|
||||||||||||||||
|
Definition at line 72 of file asim.h. References MaxP, MaxTh, and MinTh.
|
|
|
Definition at line 79 of file asim.h. References Lambda_H, Lambda_L, MaxP, MaxTh, and MinTh. Referenced by RedRouter(). 00079 { 00080 // rho = Lambda_L: p = 0 => rho/(1-rho) = MinTh 00081 Lambda_L = ((double)MinTh)/((double)(1+MinTh)); 00082 00083 // rho = Lambda_H: p = Max_p => rho(1-Max_p)/(1-rho(1-Max_p)) = MaxTh; 00084 if (MaxP < 1) 00085 Lambda_H = ((double)MaxTh)/((double)(1+MaxTh))/(1-MaxP); 00086 }
|
|
|
Definition at line 61 of file asim.h. Referenced by ComputeProbability(), and Populate(). |
|
|
Definition at line 60 of file asim.h. Referenced by ComputeProbability(), and Populate(). |
|
|
Definition at line 59 of file asim.h. Referenced by ComputeProbability(), Identical(), Populate(), and RedRouter(). |
|
|
Definition at line 59 of file asim.h. Referenced by ComputeProbability(), Identical(), Populate(), and RedRouter(). |
|
|
Definition at line 59 of file asim.h. Referenced by ComputeProbability(), Identical(), Populate(), and RedRouter(). |
1.4.6