What is a good optimization algorithm for a binary constraints function?

조회 수: 1 (최근 30일)
Steven H
Steven H 2021년 11월 4일
댓글: Steven H 2021년 11월 5일
I'm using fmincon at the moment but one of the equality constraints functions that I have can only output a logical array. This means that fmincon cannot know in which direction to continue its search (right?) so I often get an infeasible point as a result. My question is whether there's an interesting MATLAB algorithm that can deal with this type of nonlinear optimization. Global optimization toolbox perhaps?
To visualize, I'm looking for a solution of n points that each contain 3 variables, so the solution is n by 3 and the logical array is n x 1, indicating whether the solution is possible at all. If any of the logicals is true, the solution is useless. I have no knowledge at all of this constraints function so I cannot adjust the upper/lower bound meaningfully.
  댓글 수: 4
Daniele Sonaglioni
Daniele Sonaglioni 2021년 11월 4일
You can try to use Global Search with fmincon as routine and put all your constraints inside GlobalSearch. I think that this is a very good way to deal with your problem.
Alternatively, you can use the genetic algorithm which works very well.
Steven H
Steven H 2021년 11월 5일
Thanks guys! I will try the trial license and run the suggestions.
@Walter Roberson I'm not sure whether I understood your.. retrospect? Are you saying that it's actually good for the optimization to have such a constraint function? I do actually update the boundaries before running fmincon such that the boundaries satisfy that constraint function, but apparently solutions within the boundaries can also cause trouble.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by