simulation_function function

Get function for simulating trials.