Linear programming optimization for conditional

14 次查看(过去 30 天)
Is it possible to optimize this objective function using linear programming (linprog or intlinprog)? I have difficulties especially in defining I(i) and the max part (second term). Thanks!
minimize
sum { I(i) * p(i)* (x(i) - x(i-1) + l(i) - g(i)) for i = 1, …, T } + max { pFix* (x(i) - x(i-1) + l(i) - g(i) for i = 1, …, T}
(I(i) = 0) if (x(i) - x(i-1) + l(i) - g(i) <= 0)
(I(i) = 1) if (x(i) - x(i-1) + l(i) - g(i) > 0)

采纳的回答

Alan Weiss
Alan Weiss 2016-5-6
If I understand you correctly, and if p(i) > 0, then instead of I(i) you can use
I(i) * p(i)* (x(i) - x(i-1) + l(i) - g(i)) = max[0,p(i)* (x(i) - x(i-1) + l(i) - g(i))]
If this is correct, then I believe that you cannot write your objective function as a linear function as required by intlinprog or linprog, because the objective is not linear in the variables x(i).
Alan Weiss
MATLAB mathematical toolbox documentation

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Solver Outputs and Iterative Display 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by