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 Comment

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.

Sign in to comment.

Answers (1)

Matt J
Matt J on 27 Sep 2016
Edited: Matt J on 27 Sep 2016
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).

Categories

Community Treasure Hunt

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

Start Hunting!