Dynamic Optimization-case of Dynamo