www.gusucode.com > MATLAB——三维空间映射源码程序 > MATLAB——三维空间映射源码程序/spMODE/Tutorial.m

    %% Multi-objective Differential Evolution Algorithm with Spherical Pruning
%% (spMODE) - Beta version -
%% 
% Copyright 2006 - 2012 - CPOH  
%
% Predictive Control and Heuristic Optimization Research Group
%      http://cpoh.upv.es
%
% ai2 Institute
%      http://www.ai2.upv.es
%
% Universitat Polit鑓nica de Val鑞cia - Spain.
%      http://www.upv.es
%
%%
%% Author
% Gilberto Reynoso-Meza - (gilreyme@upv.es)
%
% http://cpoh.upv.es/en/gilberto-reynoso-meza.html
%
%%
%% For new releases and bug fixing of this Tool Set please visit:
%
% 1) http://cpoh.upv.es/en/research/software.html
%
% 2) Matlab Central File Exchange
%
%%
%% Tutorial Description
%
% In this tutorial, basic problems are solved using the spMODE algorithm,
% which is a version of the multi-objective differential evolution algorithm
% with spherical pruning described in:
%
% *Gilberto Reynoso-Meza, Javier Sanchis, Xavier Blasco, Miguel Mart韓ez*.
% _Design of Continuous Controllers Using a Multiobjective Differential
% Evolution Algorithm with Spherical Pruning._ Applications of Evolutionary 
% Computation. LNCS Volume 6024, 2010, pp 532-541.
% 
% Basic features of the algorithm are:
%
% # Improving Convergence by using an external file to store solutions
% and include them in the evolutionary process.
% # Improving Spreading by using the spherical pruning mechanism.
% # Improving Pertinency of solutions by a basic bound mechanism in the
% objective space as described in:
%
% *G. Reynoso-Meza, J. Sanchis, X. Blasco, J.M. Herrero.* _Multiobjective
% evolutionary algorithms for multivariable PI controller design_. Expert 
% Systems with Applications Volume 39, Issue 9, July 2012, Pages 7895?907.
%
% To handle more sophisticated constraints, we recommend to use them as
% objectives. Ilustrative examples can be consulted in:
%
% *G. Reynoso-Meza, X. Blasco, J. Sanchis, M. Mart韓ez*. _Multiobjective 
% optimization algorithm for solving constrained single objective problems_.
% Evolutionary Computation (CEC), 2010 IEEE Congress on. 18-23 July 2010
%
%% 
%% Scripts and functions listing
% # RunTutorial.m  - Runs the tutorial.
% # Tutorial.m     - The Tutorial script.
% # spMODEparam.m  - Script to built the struct required for the
% optimization.
% # spMODE.m       - The optimization algorithm.
% # SphPruning.m   - The spherial pruning mechanism.
% # CostFunction.m - Cost function definition.
%
%%
%% Basic Example
%
% Run the spMODEparam file to build the variable "spMODEDat" with the
% variables required for the optimization.

spMODEparam;

spMODEDat

%%
% All of them are self-explainend in the spMODEparam.m script.
%
% The problem to solve is a known benchmark problem (DTLZ2). Now, run the
% algorithm:

disp('Running first example:')
OUT1=spMODE(spMODEDat)

%% Basic Improvement of pertinency
%
% Run the spMODEparam file to build the variable "spMODEDat" with the
% variables required for the optimization. 

spMODEparam;

%%
% To improve pertinency of solutions in the objective space, bounds can be 
% defined, to cut solutions with no interest to the DM due to the 
% deterioration of them.
%
spMODEDat.Pertinency=[0.0 0.8;
                      0.0 0.8;
                      0.6 0.8]                  
%%                  
% Now, run again the algorithm.
%
disp('Running second example:')
OUT2=spMODE(spMODEDat)

%%
% Note that the spMODE algorithm have focus on the region of interest,
% instead the overall Pareto front.

disp('Compare both cases.')

F1=OUT1.PFront; % Without pertinency improvement.
F2=OUT2.PFront; % With pertinency improvement.

figure(3);
plot3(F1(:,1),F1(:,2),F1(:,3),'sr'); grid on; hold on;
plot3(F2(:,1),F2(:,2),F2(:,3),'db')

disp('Red squares for case 1.')
disp('Blue diamonds for case 2 (pertinency improvement).')

%% Release and bug report:
%
% November 2012: Initial release