 The optimal control is per state and the results change in each of them.One can use mathematical programming, as well as dynamic programming.In this scenario, simulation can generate random samples and solve complex and large-scale problems.