fixed C++ build errors
designed simulation operation flow