The simulation process is highly related to your problem. You should create your simulator using our template if required.
For more details, please refer to example 3.Simulator.
3.Simulator