Introduction to mid-range simulation and optimization