필터 지우기
필터 지우기

Integer constrained optimization using the "ga" (genetic algorithm) solver of MATLAB - can anyone help?

조회 수: 7 (최근 30일)
I tried to do mono-objective linear optimization subject to linear equality and inequality constraints and over binary decision variables (o or 1) using the "ga" solver of MATLAB. MATLAB optimization "ga" toolbox did not help, because many constraints are violated and not satisfied. However i have transformed the equality constraints to inequality constraints using a tolerance. Does anybody have an explanation or an idea to overcome this problem?

채택된 답변

Matt J
Matt J 2013년 11월 3일
편집: Matt J 2013년 11월 3일
However i have transformed the equality constraints to inequality constraints using a tolerance.
ga() already applies a tolerance parameter "TolCon" to the constraints.
You can never expect to satisfy equality constraints exactly.
  댓글 수: 7
Matt J
Matt J 2013년 11월 3일
편집: Matt J 2013년 11월 3일
Because other solvers like LINGO or CEPLEX find the global optimal solution with all constraints (equality and inequality) satisfaction
No, they don't...
Again, no solver can escape from finite precision arithmetic. Everybody has to apply a tolerance, unless I suppose your Aeq, beq constraint data are all integers.

댓글을 달려면 로그인하십시오.

추가 답변 (3개)

imed NASRI
imed NASRI 2013년 11월 3일
in the case of my optimization problem, both equality and inequality constraints are violated when i run the mixed integer solver ga of matlab. However, the same problem is solved by CEPLEX solver using!!!!!

Matt J
Matt J 2013년 11월 3일
편집: Matt J 2013년 11월 3일
I tried to do mono-objective linear optimization subject to linear equality and inequality constraints and over binary decision variables (o or 1) using the "ga" solver of MATLAB. MATLAB optimization "ga" toolbox did not help,
BINTPROG would be the more appropriate solver, if the objective and all constraints are linear.
  댓글 수: 6
imed NASRI
imed NASRI 2013년 11월 3일
i've also tried to add an other constraint to force variable x to be equal to 0 or 1. This constraint is x*(x-1)=0. So with this constraint i'm not obliged to use the IntCon options. Unfortunately, the ga solve dont find feasible solutions.
Matt J
Matt J 2013년 11월 3일
I don't think you can trick ga() into thinking that it is bintprog()...

댓글을 달려면 로그인하십시오.


Matt J
Matt J 2013년 11월 3일
편집: Matt J 2013년 11월 3일
Another thing you could try is to eliminate the equality constraints by solving for some variables in terms of the others. For example, if you had the single equality constraint
x1+x2+x3=d
then you could eliminate both the constraint and x3 from the problem by replacing x3 everywhere by d-x1-x2. The same kind of thing could be done with systems of inequality constraints.
Then you would be left with inequality constraints only, which ga() can handle.
  댓글 수: 73
Vitor Ribeiro
Vitor Ribeiro 2014년 9월 10일
In fact, after some simulations, with GA working in same parameters as I initially state, I can see that when it finds a feasible solution GA rapidly learn and apparently converge because it is evaluating more feasible solutions around the 1st one it reach.
In many literature there are results showing that GA is a really good choice for solving problems of topology optimization with his basic heuristic formulation. I'm not certain about the mean code of GA function but I am convinced that it respects the heuristic core.
I'm not saying that GA in matlab works better then any other optimization function cause I do not have the knowledge for that. I don't know if BINTPROG or even INTLINPROG works better. I am interested in see documentation explaining how it works before seeing how it's used. If you can provide some link it would be really helpful.
After I can see how it works this functions, about how the solutions are generated or even search space composed by solutions are really searched by this algorithms, if they have an heuristic base, I would be able to choose research more in literature and probably understand which works better before I apply it in my problem indiscriminately.
Thank you all for your answers. I really appreciate each one.
Matt J
Matt J 2015년 6월 22일
I've only now realized that there is a pitfall with the variable elimination approach. When using the equality constraints alone to eliminate variables, there is nothing ensuring that the eliminated variables will end up being integers. :-(

댓글을 달려면 로그인하십시오.

카테고리

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