What is the best way to represent a binary linearizing variable in MATLAB while doing optimization?
古いコメントを表示
I am trying to represent a constraint that contains a binary linearizing variable z where z=x_i⋅x_j and x is a n dimensional vector. In my original formulation x is used as variable in the optimization functions. Can anyone please help, how the constraint can be represented in MATLAB?
7 件のコメント
Walter Roberson
2018 年 3 月 1 日
Which optimizer?
Do I understand correctly that x consists entirely of 0 and 1? I am not clear on the linearizing part: does it mean that exactly one value is set? Or does it mean a(i) *a(j) contributes to the sum only if x(i) and x(j) are both 1?
Md Enamul Haque
2018 年 3 月 1 日
Walter Roberson
2018 年 3 月 1 日
That reminds me of a minmax problem, https://www.mathworks.com/help/optim/ug/fminimax.html and in any case appears to be mixed integer programming; https://www.mathworks.com/help/optim/ug/intlinprog.html -- looks like binary integer programming, which is a subset of intlinprog (but used to have its own function.)
Well, except I don't see what z is.
Md Enamul Haque
2018 年 3 月 1 日
Walter Roberson
2018 年 3 月 1 日
There is a hack you can use with ga or gamultiobj. Normally they do not permit you to use integer constraints with nonlinear constraints. However, what you can do is specify nonlinear constraints and do not tell it you want integer constraints, but supply custom initialization and mutation and crossover that "just happen" to only use integer values.
Md Enamul Haque
2018 年 3 月 1 日
編集済み: Md Enamul Haque
2018 年 3 月 1 日
Walter Roberson
2018 年 3 月 1 日
I have not implemented it myself.
Sorry, I need to head to sleep now.
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Linear Programming and Mixed-Integer Linear Programming についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!