Objective function for Simulated Annealing from Neural network

1 view (last 30 days)
Hi All,
I have created a neural network in Matlab which studies the input design parameters of an airfoil (8 parameters) and returns the value 'f' reasonably close to the value obtained through heavy computer simulations (CFD). Now I need to use the optimtool to get the f value close to '0' and the corresponding 8 parameter values that gives the f value close to 0.
But in optimtool, it asks for an objective function and I suppose the objective function in my case will be the neural network. But I am unable to find out what shall I give the objective function as. Can anyone please help or advise?
Thank you!
  1 Comment
Anurag Trivedi
Anurag Trivedi on 3 Oct 2016
Edited: Greg Heath on 4 Oct 2016
Following code uses neural network as objective function for simulated annealing:
for i=1:5;
ObjectiveFunction = @(x) sim(net{22,3}, x);
p1 = [30.00;20.30;737;1000;0.20;]; //(starting point for the algo)
lb = [0 16.80 713 884 0.1];
ub = [100 22.90 762 1100 0.7];
[x,fval,exitFlag,output] = simulannealbnd(ObjectiveFunction,p1,lb,ub);
XX(1:5,i)=x;
FVALL(1,i)=fval;
end;

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!