System modeling and simulation