MonteCarlo: Monte Carlo broadcasts/transmissions/receptions for an...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/MonteCarlo.R

Description

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.

Usage

1
MonteCarlo(p, M = 10^4)

Arguments

p

vector of probabilities of length N where N represents the number of hops

M

Total number of Monte Carlo simulations

Details

N is computed from p length. M is code10^4 by default.

Value

A vector with the success probability and expected values (broadcast, transmissions and receptions) for an N Opportunistic model.

Author(s)

Christian E. Galarza and Jonathan M. Olate

References

Biswas, S., & Morris, R. (2004). Opportunistic routing in multi-hop wireless networks. ACM SIGCOMM Computer Communication Review, 34(1), 69-74.

See Also

routes, Expected

Examples

1
2
3
4
5
#Monte Carlo simulation for an N=3 Opportunistic system with probabilities
#p = c(0.0,0.4,0.1)

res2 = MonteCarlo(p=c(0.9,0.4,0.1),M=10^4)
res2

Opportunistic documentation built on May 2, 2019, 8:15 a.m.