How to extract the information in plot functions @saplotbestx,@saplotbestf of Simulated annealing inside output function?
    3 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
    Mohammad Shojaei Arani
 il 13 Gen 2023
  
    
    
    
    
    Commentato: Mohammad Shojaei Arani
 il 14 Gen 2023
            Hello,
I need to use simulated anealing as my optimization solver. Unfortunately & very sadly, I do not see 2 important pieces of information in 
output function or in OptimValues structure. I noticed that such information are, instead, available in 'plot functon' and you can plot them by 
a command as bellow:
options = optimoptions('simulannealbnd','PlotFcns',...
          {@saplotbestx,@saplotbestf,@saplotx,@saplotf});
I DO NOT WANT TO PLOT ANYTHING. I just need to have access to the information contained in @saplotbestx,@saplotbestf. Actually, I DID expect the output function to contain such very important pieces of information.
So, my question:
How can I find the information contained in the functions @saplotbestx,@saplotbestf INSIDE output function?
I look forward to hearing from you!
Thank you!
Babak
0 Commenti
Risposta accettata
  Walter Roberson
      
      
 il 13 Gen 2023
        
      Modificato: Walter Roberson
      
      
 il 13 Gen 2023
  
      bestx and bestfval
4 Commenti
  Walter Roberson
      
      
 il 13 Gen 2023
				The calling order is
options, optimValues, flag
not
optimValues, options, flag, Max_iter
No 4th parameter is expected (or accepted), and the order of parameters is not the same as what you had.
In order to use your myoutput_SA_Parametric as coded, you would have had to have defined 'OutputFcn' as something like 
@(options,optimValues,flag) myoutput_SA_Parametric(optimValues,options,flag,Max_iter)
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

