Incorporating a Max in optimization objective
5 次查看(过去 30 天)
显示 更早的评论
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 个评论
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
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Problem-Based Optimization Setup 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!