Is there an Optimization tool like intlinprog that includes nonlinear constraints?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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.)
0 Kommentare
Antworten (1)
Matt J
am 4 Okt. 2018
Bearbeitet: Matt J
am 4 Okt. 2018
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 Kommentare
Matt J
am 5 Okt. 2018
Bearbeitet: Matt J
am 5 Okt. 2018
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.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!