Is there an Optimization tool like intlinprog that includes nonlinear constraints?

1 次查看(过去 30 天)
I have a program that uses the genetic algorithm in matlab to optimize the solution. Historically, I have used intlinprog before running the ga() to make sure a feasible solution exists (the solution is constrained to be binary and has linear constraints. So I would make a call like this:
solvable = intlinprog(ones(1, nVars),1:nVars,A,b,[],[],zeros(1, nVars),ones(1, nVars));
However, now I need to include nonlinear constraints. Is there a similar solver to intlinprog or a way to include nonlinear constraints to check for a feasible solution?
(To be clear - I am not asking whether or not I can include nonlinear constraints in the genetic algorithm; I am aware that I can.)

回答(1 个)

Matt J
Matt J 2018-10-4
编辑:Matt J 2018-10-4
You could do a preliminary run of ga() with a constant, artificial fitness function like f(x)=0. That would be a way of scouting for a feasible solution without incurring the computational costs of your actual fitness function.
  7 个评论
Doug Rank
Doug Rank 2018-10-5
These are interesting and creative approaches. Unfortunately the nonlinear constraints are not smooth.
The ultimate goal is to save time for a user if the program is called with infeasible constraints instead of spending a few hours hunting for something that doesn't exist. Unfortunately, I cannot risk the check failing if a feasible solution does in fact exist.
Thank you for your interest and dedication to this challenge. I will keep these ideas in mind should I need something similar.
Matt J
Matt J 2018-10-5
编辑:Matt J 2018-10-5
Unfortunately, I cannot risk the check failing if a feasible solution does in fact exist.
Well, unfortunately, I don't think you'll be able to avoid that risk. There is no general and guaranteed way of finding a point that satisfies an arbitrary set of nonlinear (in)equalities or verifying if one exists. If there were, nonlinear equation solvers like fsolve wouldn't need an initial guess as input and would never be in danger of getting stuck in local minima.
If you describe the particulars of your nonlinear constraints, maybe the forum could suggest custom solutions for that particular family.

请先登录,再进行评论。

类别

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