算法要能解决电力线路 [英] An algorithm to solve an electricity circuit

查看:136
本文介绍了算法要能解决电力线路的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对我自己的学习编程和我想有一个想法如何解决这个问题。

I'm studying programming on my own and I would like to have an idea how to solve this problem.

我一直在考虑一组给定电阻和一个给定值restot电阻。我可以选择那些电阻器的一个给定的数目。我怎样才能使一个电路电阻尽可能接近到restot?程序员告诉我,人们可以使用遗传算法,但我不局限于使用这种

I have been given the set of resistors with given resistances and a given value restot. I can pick a given number of those resistors. How can I make a circuit which resistance is as near as possible to restot? A programmer told me that that one can use genetic algorithms but I'm not limited to use such.

我想我必须使用基尔霍夫定律,使方程进行线性方程系统,但因为我没有对用电问题,也不数值算法,以线性系统非常多的经验,所以我想对如何能提供一些指导我做这些公式自动电脑内存作为系统随时都在变化。我怎样才能确保算法收敛于一个更好的解决方案?

I guess I have to make a linear system of equations using Kirchoff's laws to make equations but as I don't have very much experience on electricity problems nor numerical algorithms to linear systems so I would like to have some guidance about how can I make those equations automatically to computers memory as the system changes all the time. And how can I make sure that the algorithm converges to a better solutions?

问题是从芬兰论坛。

推荐答案

电阻器可以存在于串联或并联,其电阻加起来不同(添加值系列,添加倒数为平行)。

Resistors can either exist in series or in parallel, and their resistances add up differently (add values for series, add reciprocals for parallel).

您也可以有串联和并联电阻网络。

You can also have networks for resistors in series and parallel.

这听起来好像是一个递归数据结构的经典案例,你可能会重新present它作为一棵树,以类似的方式为二进制前pression树:的 http://en.wikipedia.org/wiki/Binary_ex$p$pssion_tree

This sounds to me like a classic case of a recursive data structure, and you could probably represent it as a tree, in a similar way to a binary expression tree: http://en.wikipedia.org/wiki/Binary_expression_tree

再加上一些探索构建树(你应该看看Prolog的做到这一点的方式),你可以找到获取接近你的总电阻的最佳组合。

Combine that some exploratory tree building (you should look into the way Prolog does this) and you can find the best combination of resistors that gets close to your total.

在这种方法没有遗传算法,但你可以采取一种遗传方式建立和完善树。

No genetic algorithms in this approach, although you could take a genetic approach to building and refining the tree.

这篇关于算法要能解决电力线路的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆