define the binary variable in Matlab
조회 수: 41 (최근 30일)
이전 댓글 표시
Hello experts,
I have an optimization problem that i have to solve and i want to define the binary variable in Matlab as constraint.
how can i define it thank you in advance.
댓글 수: 0
답변 (1개)
Walter Roberson
2019년 5월 27일
The MATLAB family is not completely lacking in binary variables, but only in the form of GF2 (Galois Field) ... or things you could convince the symbolic engine to do if you were stubborn enough.
What it has for use with optimizers is variables that are constrained to be integers and for which you set lower bound 0 and upper bound 1. These can only be used in a few optimizers.
For linear programming see https://www.mathworks.com/help/optim/linear-programming-and-mixed-integer-linear-programming.html
Otherwise see
There is no way to create such a variable for the continuous optimizers such as fmincon()
댓글 수: 0
참고 항목
카테고리
Help Center 및 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!