| Title: | Routing Distribution, Broadcasts, Transmissions and Receptions in an Opportunistic Network |
|---|---|
| Description: | Computes the routing distribution, the expectation of the number of broadcasts, transmissions and receptions considering an Opportunistic transport model. It provides theoretical results and also estimated values based on Monte Carlo simulations. |
| Authors: | Christian E. Galarza [aut, cre] (ORCID: <https://orcid.org/0000-0002-4818-6006>), Jonathan M. Olate [aut] |
| Maintainer: | Christian E. Galarza <[email protected]> |
| License: | GPL (>= 2) |
| Version: | 1.2.1 |
| Built: | 2026-10-07 13:11:05 UTC |
| Source: | https://github.com/chedgala/opportunistic |
This function computes the probability of success and the expected values of the number of broadcasts, transmissions and receptions for an Opportunistic model.
Expected(p)Expected(p)
p |
vector of probabilities of length |
A matrix with the probabilities and expected values for an Opportunistic model for all hops sizes <= N
Christian E. Galarza and Jonathan M. Olate
Biswas, S., & Morris, R. (2004). Opportunistic routing in multi-hop wireless networks. ACM SIGCOMM Computer Communication Review, 34(1), 69-74.
#An N=3 Opportunistic system with probabilities p = c(0.9,0.4,0.1) res1 = Expected(p=c(0.9,0.4,0.1)) res1#An N=3 Opportunistic system with probabilities p = c(0.9,0.4,0.1) res1 = Expected(p=c(0.9,0.4,0.1)) res1
This function estimates via Monte Carlo the probability of success and the expected values of the number of broadcasts, transmissions and receptions for an Opportunistic model.
MonteCarlo(p, M = 10^4)MonteCarlo(p, M = 10^4)
p |
vector of probabilities of length |
M |
Total number of Monte Carlo simulations |
N is computed from p length. M is 10^4 by default.
A vector with the success probability and expected values (broadcast, transmissions and receptions) for an N Opportunistic model.
Christian E. Galarza and Jonathan M. Olate
Biswas, S., & Morris, R. (2004). Opportunistic routing in multi-hop wireless networks. ACM SIGCOMM Computer Communication Review, 34(1), 69-74.
#Monte Carlo simulation for an N=3 Opportunistic system with probabilities #p = c(0.9,0.4,0.1) res2 = MonteCarlo(p=c(0.9,0.4,0.1),M=1000) res2 #Larger simulation res3 = MonteCarlo(p=c(0.9,0.4,0.1),M=10^4) res3#Monte Carlo simulation for an N=3 Opportunistic system with probabilities #p = c(0.9,0.4,0.1) res2 = MonteCarlo(p=c(0.9,0.4,0.1),M=1000) res2 #Larger simulation res3 = MonteCarlo(p=c(0.9,0.4,0.1),M=10^4) res3
It provides the different
possible routes, their frequency as well as their respective
probabilities when considering uncertain probabilities lying
on a interval p delta.
routes(p, delta = 0)routes(p, delta = 0)
p |
vector of probabilities of length |
delta |
Delta value when considering uncertain probabilities. The interval is of the type |
By default, delta is considered to be zero disregarding uncertainty.
A data frame containing the routes, frequencies, and respective probabilities.
Christian E. Galarza and Jonathan M. Olate
#An N=4 Opportunistic system with probabilities p1 = 0.7,...,p4 = 0.1 p = seq(0.7, 0.1, length.out = 4) routes(p) #An N=7 Opportunistic system p = seq(0.7, 0.1, length.out = 7) routes(p)#An N=4 Opportunistic system with probabilities p1 = 0.7,...,p4 = 0.1 p = seq(0.7, 0.1, length.out = 4) routes(p) #An N=7 Opportunistic system p = seq(0.7, 0.1, length.out = 7) routes(p)