Incorporating a Max in optimization objective
古いコメントを表示
I'm trying to use intlinprog to solve a mixed integer linear program where the objective function has a max function embedded in it. For example, the objective may be of the form:
5*max(10-x, 0)+x
The objective is clearly convex and actually piecewise linear. How can I incorporate this in the form
f'x
so as to be able to use intlinprog?
3 件のコメント
Brendan Hamm
2016 年 11 月 30 日
編集済み: Brendan Hamm
2016 年 11 月 30 日
A convex function is not linear, so intlinprog will not solve it. Splitting this piecewise linear function into regions where it is a linear function is akin to knowing the minimum solution in the first place, so I don't see what use this has.
What is the need for an optimization routine to solve this anyhow? Are you trying to expand the concept to a larger problem?
Oskar Adolfson
2017 年 10 月 12 日
I think it is false to say that a convex function is not linear. A convex function can actually be linear, but it doesn't have to be. Try to verify yourself by testing if y = ax is convex.
回答 (2 件)
Matt J
2017 年 10 月 12 日
0 投票
Splitting this piecewise linear function into regions where it is a linear function is akin to knowing the minimum solution in the first place, so I don't see what use this has.
Not sure why that approach isn't worth pursuing. For this example, you simply add the constraint x<=10 for the first region and x>=10 for the second.
Mario CASTRO GAMA
2023 年 10 月 1 日
0 投票
You can try to use the method presented in this video.
カテゴリ
ヘルプ センター および File Exchange で Get Started with Optimization Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!