Rewriting the whole thing using knitr.
Added following files:
1. Rmd file to describe the system and initialize random initial state