How to define a binary variable in non linear constraints
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
if x(1)+x(2)+x(3)> 0 then x(4)= 1 otherwise x(4)=0
1 Kommentar
Antworten (1)
Torsten
am 25 Mär. 2024
Solve two problems:
One with
x(1)+x(2)+x(3)>= 0
x(4)=1
the other with
x(1)+x(2)+x(3)<= 0
x(4)=0
and take the best of the two runs as the solution.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Genetic Algorithm finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!