Query about simulanneal.m Function (Simulated Annealing Optimization).
10 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (4 件)
Alan Weiss
2020 年 6 月 10 日
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 件のコメント
Alan Weiss
2020 年 6 月 12 日
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
2020 年 6 月 23 日
2 件のコメント
Alan Weiss
2020 年 6 月 23 日
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
2020 年 6 月 23 日
3 件のコメント
tareq waheshy
2023 年 1 月 4 日
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
2023 年 1 月 4 日
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 件のコメント
Steven Lord
2023 年 1 月 4 日
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.
参考
カテゴリ
Help Center および File Exchange で Direct Search についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!