minors
exceptionalize simulate_wave function name
include some headers for setw. close #482
make simulate_wave() support proper optimization state handling