フィルターのクリア

How can I write linear equalities in GA ? - please answer please

1 回表示 (過去 30 日間)
Baris Karakum
Baris Karakum 2019 年 2 月 12 日
コメント済み: Baris Karakum 2019 年 2 月 13 日
In my problem I have x(i,j)-(6*6) matrix and I want to solve the problem with global opt. tool.
so what should I write in nvars section? actually,how can I show 6*6 matrix in nvars section ? or should I write just 1 ?
then, I have a const like
sum(j,x(i,j)=1 , likely you know,but it's mean;
x(1,1)+x(1,2)+x(1,3)....+x(1,6)=1
x(2,1)+x(2,2)+x(2,3)....+x(2,6)=1
.
.
x(6,1)+x(6,2)+x(6,3)....+x(6,6)=1
how can I write this in ga ?

採用された回答

Walter Roberson
Walter Roberson 2019 年 2 月 12 日
nvars should be the total number of unknowns, so 6*6 = 36 in your case.
Linear equalities are expressed through the Aeq beq argument pair.
T = ones(1,6);
Aeq = blkdiag(T,T,T,T,T,T);
beq = ones(6,1);
  1 件のコメント
Baris Karakum
Baris Karakum 2019 年 2 月 13 日
really thank a lot for your answer.I search it for a couple days.
but i have another problem and I need define another variable like y(i,j).and it is not binary and x(i,j,k) is binary. How can I define y(i,j) in ga toolbox?
and i assume how can I write x(i,j,k)=<y(i,j)?

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSolver Outputs and Iterative Display についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by