Complex constraints in mixed integer programming

Hello everybody. I am trying to solve a problem of inventory control using indexes for products and time periods. I am trying to express an inventory balance during a period. In a few words, I have two variables that the one is a part of the other. Should I use one vector in an inequality constraint or should I create two separate variables? Is it possible to express a constraint like: I(t)-I(t-N)<X with one vector? Constantinos

1 个评论

So what is the question? Answers is not a general consulting site, where you ask for some non-specific help, and then we undergo a long dialogue as you gradually try to explain your problem. If you cannot explain the problem, then you need to spend some time figuring out how to explain it. Then ask a specific question, ABOUT MATLAB.

请先登录,再进行评论。

回答(1 个)

Should I use one vector in an inequality constraint or should I create two separate variables?
Yes, MATLAB solvers require that your unknowns be expressed as a single vector.
Is it possible to express a constraint like: I(t)-I(t-N)<X with one vector?
Yes, for example if N=1 and t=1,2,3,4 and I=[I(1);I(2);I(3)] then the matrix
A= [-1 1 0 0;
0 -1 1 0;
0 0 -1 1];
is such that A*I gives you all I(t)-I(t-1).

类别

帮助中心File Exchange 中查找有关 Quadratic Programming and Cone Programming 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by