OpenMDAO:离散优化问题;如何定义离散变量集?

发布于 2025-01-14 12:55:56 字数 365 浏览 4 评论 0原文

我正在尝试学习如何使用 OpenMDAO 来解决离散优化问题。我看到可以定义离散变量(https:/ /openmdao.org/newdocs/versions/latest/features/core_features/working_with_components/discrete_variables.html)但我不能找到可以定义允许优化器选择的一组可能值的位置。

你能帮助我吗?

I am trying to learn how to use OpenMDAO in order to solve discrete optimization problems. I saw that it was possible to define discrete variables (https://openmdao.org/newdocs/versions/latest/features/core_features/working_with_components/discrete_variables.html) but I cannot find where I can define the set of possible values that the optimizer is allowed to select.

Can you help me?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

浅浅淡淡 2025-01-21 12:55:56

OpenMDAO 支持使用离散变量作为支持它们的某些优化器的优化器变量,但该支持仅限于整数变量。您只能指定下限和上限,就像使用连续变量一样。

可以在此处找到相关示例,其中“xI”是离散变量:

https://openmdao.org/newdocs/versions/latest/features/building_blocks/drivers/genic_algorithm.html

请注意如果您没有在驱动程序选项中为其设置“位”值,SimpleGADriver 还将对任何连续 OpenMDAO 变量进行编码,就好像它是一个整数一样。

OpenMDAO supports using discrete variables as optimizer variables for certain optimizers that support them, but that support is limited to integer variables. You can only specify a lower and upper bound, just as you would with a continuous variable.

A relevant example can be found here, where 'xI' is a discrete variable:

https://openmdao.org/newdocs/versions/latest/features/building_blocks/drivers/genetic_algorithm.html

Note that the SimpleGADriver will also encode any continuous OpenMDAO variable as if it were an integer, if you don't set a 'bits' value for it in the driver's options.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文