How can I convert equality constraints into inequality constraints?

I m solving a problem using ga with equality and inequality constraints and want to optimise it while using binary variables. But do not solve it with equality constraints.

Respuestas (2)

Matt J
Matt J el 13 de Jun. de 2017

4 comentarios

I read both threads but it is difficult to understand them. If you have any code example then share it.
Thanks.
Matt J
Matt J el 14 de Jun. de 2017
Editada: Matt J el 14 de Jun. de 2017
As a simple 2-variable example, suppose your problem is
min 3*x1+2*x2
subject to
x1+x2=5;
x2>=0
x1>=1
The equality constraint implies x2=5-x1 so you can eliminate x2 and reduce the above to a lower dimensional problem with inequality constraints only:
min. 3*x1+2*(5-x1)
subject to
5-x1>=0
x1>=1
The links I provided talk about how to do this in higher dimensions, but basically you reorder your variables so that your equality constraint matrix partitions as Aeq=[P,Q] where Q is an NxN invertible matrix. The equality constraints then become,
beq = Aeq*x = P*x1 + Q*x2
and you can eliminate the variables associated with Q according to x2=inv(Q)*(beq-P*x1).
John
John el 16 de Jun. de 2017
Editada: John el 16 de Jun. de 2017
Thank Matt J.
But what is the P here and should we eliminate Q at end? If we convert all equality constraints into inequality constraints by this way then may be we get infeasible solution.
Matt J
Matt J el 16 de Jun. de 2017
Editada: Matt J el 16 de Jun. de 2017
But what is the P here and should we eliminate Q at end?
Q is not an unknown variable. It is an NxN invertible matrix formed from linearly independent columns of Aeq. You can identify these columns using licols.m attached. P is a matrix formed from the remaining columns.
If we convert all equality constraints into inequality constraints by this way then may be we get infeasible solution.
I don't see why you would. The reduced problem should be equivalent to the original.

Iniciar sesión para comentar.

Alan Weiss
Alan Weiss el 14 de Jun. de 2017
Alan Weiss
MATLAB mathematical toolbox documentation

1 comentario

Yes I read it and also some other threads. But by converting equality constraints into inequality constraints they will cancel each other and we will get infeasible solution.

Iniciar sesión para comentar.

Categorías

Preguntada:

el 13 de Jun. de 2017

Editada:

el 16 de Jun. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by