A Matlab implementation of the Random Batch Method (RBM) in Linear Quadratic (LQ) optimal control problems, which can significantly reduce the computational cost to solve optimal control problems. The examples are the same as the ones as in this paper. More information can also be found in this post and in this post.
- A gradient-based solver for optimal control problems constrained by Random Batch Dynamics.
- Plotting of the obtained optimal controls and state trajectories.
- Example 1: A heat equation on a 1-D spatial domain for which the proposed method does not reduce the computational cost.
- Example 2: A heat equation on a 3-D spatial domain for which the proposed method reduces the computational cost significantly.
- Example 3: A fractional heat equation for which the proposed method also reduces the computational cost significantly.
The code can be executed by running the files example1_heat1D, example2_heat3D, and example3_fractional3D. Figures 1, 2, and 3 show the typical results. Note that the specific plots depend on the randomly selected vector of indices \boldsymbol \omegaω, and that the specific solutions will be different every time than the files are executed.
Figure 1: RBM controls obtained by running example1_heat1D.
Figure 2: RBM controls obtained by running example2_heat3D.
Figure 3: RBM controls obtained by running example3_fractional3D.