During the last two decades, the use of simulation tools in transportation engineering has become inevitable. Many methodologies developed by the research community during the late 90s have made their way to commercial softwares, used daily by practitioners. These tools are convenient for so-called scenario based analysis, that is the derivation of indicators of performance under various design scenarios. Still, there are several pitfalls to be aware of when using them. It is also highly desirable to use them in a more systematic way, and to include them in a optimization framework. In this lecture, we discuss the pitfalls of simulation, and review the issues related to simulation-based optimization. We also report some recent developments in the field of transportation.