How do I write this conditional constraint for an optimization problem in MATLAB? 0 <= x1 <= a*x1 . If a= 0, x1=0 and when a=1 then Matlab must find x1.
6 ビュー (過去 30 日間)
古いコメントを表示
How do I write this conditional constraint for an optimization problem in MATLAB? 0 <= x1 <= a*x1 . When a= 0, x1=0 and when a=1 then Matlab must find x1. The times when a = 0 and a=1 are known. Before I added this decision variable, I was solving with intlinprog now I dont know if it will still work.
1 件のコメント
Arun
2023 年 10 月 19 日
This seems like an unconstrained optimization problem, you have some more details?
回答 (1 件)
Walter Roberson
2023 年 10 月 19 日
Optimize twice, once with x1 forced to 0, and the second time with x1 set to a lower bound of 0 and an upper bound of infinity. Take the better result between the two.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!