I was trying to make a SEIR model with an Age-dependent mixing pattern. I found a R program written by Lloyd Chapman @LloydChapman here:
http://epirecip.es/epicookboo