Query about simulanneal.m Function (Simulated Annealing Optimization).
15 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have minimization problem which got a nonlinear objective function, a couple of equality constraints, and dozens of nonlinear constraints. There is a very simple given in MATLAB which does not contian any constraints other than objective function and starting point.
In this example inputs are only two things a function and strating points.
[x,fval,exitFlag,output] = simulannealbnd(ObjectiveFunction,x0)
Whereas I want to use following kind of function
function [x, fval, exitflag, output] = simulanneal(FUN, x0, Aineq, bineq, Aeq, beq, lb, ub, options)
which is given in the MATLAB documentations with the name of "simulanneal.m" file. Since, I want to give Aineq, bineq, lb, ub as well along with FUN and x0.
How can I implement such kind problem in MATLAB Simulated Annealig Optimization Toolbox?
Thanks
0 commentaires
Réponses (4)
Alan Weiss
le 10 Juin 2020
Global Optimization Toolbox provides the simulannealbnd funciton, which does not provide linear constraints, though it does allow bounds.
My question would be, why do you need simulated annealing? If what you are trying to do is optimize something, then I suggest that you follow the guidance in Table for Choosing a Solver, which does not suggest using simulannealbnd.
Alan Weiss
MATLAB mathematical toolbox documentation
5 commentaires
Alan Weiss
le 12 Juin 2020
surrogateopt ganed nonlinear constraint handling in R2020a. If you don't have that version, then look in your version of the documentation for an example tiitled Surrogate Optimization with Nonlinear Constraint.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
Muhammad Umair Javed
le 23 Juin 2020
2 commentaires
Alan Weiss
le 23 Juin 2020
Perhaps you could try to fit your problem into the MILP framework. Your objective is linear and the constraints I see are bounds, though I do not see the code for your unitdisk constraint function. Is it possible that you could use a set of linear inequalities for the nonlinear inequality constraint, along the lines of this example? Then you could use intlinprog to solver your problem.
To answer your question though, I don't know where the 'trialData' variable might be referenced. To find out for sure, you could use the debugger.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
Muhammad Umair Javed
le 23 Juin 2020
3 commentaires
tareq waheshy
le 4 Jan 2023
The working principle of GA is binary coding by using MATLAB code
Single variable function example
Maximize y = sqrt𝑥 subject to
Subject to 1.0 𝑥 ≤ 16.0
We know that the maximum is at y = 4.0 when x = 16
tareq waheshy
le 4 Jan 2023
The working principle of GA is binary coding by using MATLAB code
Single variable function example
Maximize y = sqrt𝑥 subject to
Subject to 1.0 𝑥 ≤ 16.0
We know that the maximum is at y = 4.0 when x = 16
1 commentaire
Steven Lord
le 4 Jan 2023
Since this does not appear to be an answer to the original question, but a new question, please ask it in its own thread using the Ask button at the top of this page.
Voir également
Catégories
En savoir plus sur Surrogate Optimization dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



