Linear programming optimization for conditional

13 Ansichten (letzte 30 Tage)
Nana
Nana am 6 Mai 2016
Beantwortet: Alan Weiss am 6 Mai 2016
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)

Akzeptierte Antwort

Alan Weiss
Alan Weiss am 6 Mai 2016
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

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by