Implementation and extension of linear random Farmer model as discussed by Rui Carvalho.