Package 'Opportunistic'

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, Jonathan M. Olate
Maintainer: Christian E. Galarza <[email protected]>
License: GPL (>=2)
Version: 1.2
Built: 2025-01-30 04:37:06 UTC
Source: https://github.com/chedgala/opportunistic

Help Index


Theoretical broadcasts/transmissions/receptions for an Opportunistic model

Description

This function computes the probability of success and the expected values of the number of broadcasts, transmissions and receptions for an Opportunistic model.

Usage

Expected(p)

Arguments

p

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

Value

A matrix with the probabilities and expected values for an Opportunistic model for all hops sizes <= N

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, MonteCarlo

Examples

#An N=3 Opportunistic system with probabilities p = c(0.0,0.4,0.1)
res1 = Expected(p=c(0.9,0.4,0.1))
res1

Monte Carlo broadcasts/transmissions/receptions for an Opportunistic model

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

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

#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

Routing distribution for an Opportunistic network

Description

It provides the different possible routes, their frequency as well as their respective probabilities when considering uncertain probabilities lying on a interval p +- delta.

Usage

routes(p, delta = 0)

Arguments

p

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

delta

Delta value when considering uncertain probabilities. The interval is of the type p ++- delta.

Details

By default, delta is considered to be zero disregarding uncertainty.

Value

A data frame containing the routes, frequencies, and respective probabilities.

Author(s)

Christian E. Galarza and Jonathan M. Olate

See Also

Expected, MonteCarlo

Examples

## Not run: 
#An N=7 Opportunistic system with probabilities p1 = 0.7,...,p7 = 0.1

> p = seq(0.7,0.1,length.out = 7)
> routes(p)
            Freq Probability   Value
route 1        1        p1^7 0.08235
route 2        6     p1^5*p2 0.10084
route 3       10   p1^3*p2^2 0.12348
route 4        4     p1*p2^3  0.1512
route 5        5     p1^4*p3 0.12005
route 6       12  p1^2*p2*p3   0.147
route 7        3     p2^2*p3    0.18
route 8        3     p1*p3^2   0.175
route 9        4     p1^3*p4  0.1372
route 10       6    p1*p2*p4   0.168
route 11       2       p3*p4     0.2
route 12       3     p1^2*p5   0.147
route 13       2       p2*p5    0.18
route 14       2       p1*p6    0.14
route 15       1          p7     0.1
Total         64

## End(Not run)