Improve the SIM library, try to implement flexible R formula based simulation model