I have 132 potential positions in a wind farm layout and I have to place 66 turbines on these positions. I want to know how to make combinations to place these 66 turbines.

2 ビュー (過去 30 日間)
My wind farm dimension is 11220X1360 and it is divided into grids with dimensions 340X340. There are 132 potential positions for 66 turbines in them. How to determine the ways in which they can be placed on 132 positions?
  4 件のコメント
Walter Roberson
Walter Roberson 2021 年 7 月 28 日
編集済み: Walter Roberson 2021 年 7 月 28 日
David answered the question you asked. If you need more precision then
n = sym(66);
numpositions = simplify(exp(gammaln(2*n)-2*gammaln(n)))
numpositions = 
12453858983462851457071547625632459816100
double(numpositions)
ans = 1.2454e+40
crosscheck = factorial(sym(132))/factorial(sym(66))^2
crosscheck = 
377389666165540953244592352291892721700
The crosscheck is dpb's value, and I have to say it looks reasonable to me. Hmmm... seems to me that David's formula should probably be
n = sym(66);
numpositions = simplify(exp(gammaln(2*n+1)-2*gammaln(n+1)))
numpositions = 
377389666165540953244592352291892721700
Ah, that's better.
Anyhow... if knowing the number of ways you can position them is not what you need, you should expand on your question.
In a duplicate question it looked like you might be asking for code to produce all of the possible solutions. Although I could produce code for that purpose, as David showed, the code would take on the order of 10^20 years to finish. As in roughly 100000000000000000000 years.
David Goodmanson
David Goodmanson 2021 年 7 月 29 日
Walter is correct, I forgot to add 1 when converting the gamma function to a factorial. A couple of previous comments are modified accordingly.

サインインしてコメントする。

回答 (1 件)

Jan
Jan 2021 年 7 月 17 日
編集済み: Jan 2021 年 7 月 17 日
The notes of dpb and David mean, that the number of possible solutions is too large to be useful, if you want to test all of them. In your case testing all 132 over 66 solutions would take many years.
So you have to concentrate on a small subset. There are different ways to find "good" solutions in a huge set, e.g. randomly:
pos = randperm(1:132, 66);
Other methods of global optimizations allows to improve solutions iteratively from different starting points. This does not require to check all possible solutions, but to find a sufficiently good solution in a bearable amount of time.
  4 件のコメント
David Goodmanson
David Goodmanson 2021 年 7 月 18 日
編集済み: David Goodmanson 2021 年 7 月 29 日
Assuming 3.8e38 cases [this number has been corrected per Walter's comment], if one could do a case every picosecond it would take about 1.2e19 years, not counting meal breaks (the age of the universe is about 1.4e10 years). "Many years", indeed!
Walter Roberson
Walter Roberson 2021 年 7 月 18 日
"I bet I could get there in one day, if I didn't sleep!"
(Will anyone else know what this refers to? Will I still know what this refers to a year from now?)

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeWind Power についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by