testharness: Create an example markov chain and calculate the stationary...

Description Usage Arguments Value Examples


The example matrix that is created reflects the following problems:

* For the discrete case:
** For the finite case, we create a matrix that symbolizes flipping a coin and the probabilties of getting heads in a row. State 0 means we just got a tails. State 1 means we have 1 head. State 2 means we have gotten 2 heads in a row. This requires a 3x3 matrix since we have three states.
** The infinite case creates a function that represents an infinite matrix and a birth/death process of having the probability of 0.4 for birth and 0.6 for death.

* For the continuous case:
** For the finite case, we simulate a model with two machines s.t. mean wait when one machine is working is 1/25, 1/20 with both, and a mean repair time of 1/8.
** TODO: infinite, continuous case

All infinite case calculations are done with a convergence criterion of 0.1.


testharness(use_discrete_markov_chain = TRUE, use_finite_state = TRUE,
  calculate_stationary_dist = TRUE)



boolean that indicates if you want to use a discrete(TRUE) or continuous(FALSE) markov chain.


boolean that indicates if you want to use a finite state(TRUE) matrix or infinite(FALSE)


boolean that indicates if you want to calculate the stationary distribution(TRUE) or expected hitting times(FALSE)


The stationary distribution or expected hitting times of the indicated matrix.



drlevy/ECS256-HW1 documentation built on May 15, 2019, 2:21 p.m.