遗传算法中设计适应度函数

发布于 2024-09-17 17:06:59 字数 90 浏览 10 评论 0原文

我需要求解联立线性方程(具有 7 个未知数的 5 个方程,即欠定问题),其中变量在很大范围内变化 [0 - 1,00,000]。有人可以建议我应该使用什么健身功能吗?

I need to solve simultaneous linear equations (5 equations with 7 unknowns i.e an under-determined problem) where the variables vary over a wide range of
[0 - 1,00,000]. Can someone suggest what fitness function I should use?

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

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

发布评论

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

评论(2

滥情空心 2024-09-24 17:06:59

我猜你指的是一个由 5 个线性方程组和 7 个变量组成的系统。

本文 似乎显示了您正在寻找的内容。您基本上需要定义一个成本函数并使用 GA 来最小化它。在 pdf 中搜索“健身功能”以了解具体操作方法。这个想法是找到一些衡量方法来衡量您的变量集如何接近系统的解决方案(或在您的情况下为解决方案)。

I guess you are referring to a system of 5 linear equations with 7 variables.

This paper seems to show what you're looking for. You basically need to define a cost function and use the GA to minimize it. Search the pdf for "fitness function" to see exactly how to do this. The idea is to find some measure of how well your set of variable approximates the solution (or a solution in your case) for the system.

渔村楼浪 2024-09-24 17:06:59

假设你的系统是这样写的:
e_1(x1, x2, ..., x7) = 0
e_2(x1, x2, ..., x7) = 0
...
e_5(x1, x2, ..., x7) = 0

则适应度函数 F(x1, x2, ..., x7) = abs(e_1(x1, ..., x7)) + abs(e_2(x1) , ..., x7) + ... + abs(e_5(x1, ..., x7) 可能会成功。您可能可以用其他东西更改 + (例如乘法或最大运算符,如中建议的那样) @JohnIdol 提到的文章)

这可能也适用于非线性系统。

Assuming that your system is written in a form like this:
e_1(x1, x2, ..., x7) = 0
e_2(x1, x2, ..., x7) = 0
...
e_5(x1, x2, ..., x7) = 0

then a fitness function F(x1, x2, ..., x7) = abs(e_1(x1, ..., x7)) + abs(e_2(x1, ..., x7) + ... + abs(e_5(x1, ..., x7) may do the trick. You can probably change the + with something else (such as multiplication or the maximum operator, as proposed in the article mentioned by @JohnIdol )

This will probably work in non-linear systems also.

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