rl_write_control_parameters_mt function

Function to find and write the best control parameters.