I tried Example 1b of https://apmonitor.com/do/index.php/Main/DynamicOptimizationBenchmarks.
I construct two different form of the same terminal conditio