How to setup multi-level MDO formulation with openmdao 1.x?

匆匆过客 提交于 2019-12-11 18:12:12

问题


As an openmdao 1.x problem handles only one driver and as optimizers are still supposed to be drivers, how a multi-level formulation could be implemented? Should I use two problems? Should I call an optimizer directly within a solve_nonlinear component method? Thanks.


回答1:


There have been some changes, and Problem is no longer a system. The best way to do this now is to create a Component that contains the sub-problem, tells it when to run, and passes data in and out. See example here:

How to use nested problems in OpenMDAO 1.x?




回答2:


The planned way to handle this is going to be to use nested Problem instances. This is not implemented yet in the problem class, but it very easy to implement by hand.

All you would need to do is define your own solve_nonlinear method in a SubClass of Problem. if you're going to use analytic derivatives you would also need to implement a Jacobian and apply_linear methods as well and do use post-optimiality sensitivities if you had nested optimizers. Or you could force finite difference to happen in the containing parent group.

Your solve_linear will take in params, unknowns, and resids dictionaries and passes the relevant variables down into the problems vector. Essentially, the framework was designed to not know if you're using nested problems. The top level framework thinks that the inner one is just a regular component.



来源:https://stackoverflow.com/questions/32612456/how-to-setup-multi-level-mdo-formulation-with-openmdao-1-x

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!