📄 runmultiverification.m
字号:
% Script used for verification of the algorithm's capabilities% This script uses the Riccati equation to validate the algorithm.%% The found minimum is compared to the actual minium for n=5 and% x0=100 in the end% By Kerry W. Lothrop <kerry@lothrop.de>%% Lothrop, K.W.: Conceptual Design Optimization of a Cis-Lunar% Transportation Architecture Using Genetic Algorithms, Universit鋞% Stuttgart, University of Colorado, 2003%% This program is free software; you can redistribute it and/or modify% it under the terms of the GNU General Public License as published by% the Free Software Foundation; either version 1, or (at your option)% any later version.%% This program is distributed in the hope that it will be useful,% but WITHOUT ANY WARRANTY; without even the implied warranty of% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the% GNU General Public License for more details. A copy of the GNU % General Public License can be obtained from the % Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.vf = [ones(5,1).*4 -ones(5,1).*100 ones(5,1).*100];vdi = [ones(5,1).*3 -ones(5,1).*100 ones(5,1).*100];vii = [ones(3,1).*2 -ones(3,1).*2 ones(3,1).*2];vb = [ones(3,1) zeros(3,1) ones(3,1)];designVectorProps = [vf; vdi; vii; vb];initPop = multiinitializega(60, designVectorProps, 'multiVerificationObjFunc', [100]);[bestSol, endPop, bestPop, traceInfo] = multiga(designVectorProps, ... 'multiVerificationObjFunc', ... [100], ... initPop, ... [1E-6 1], ... ['maxGenTerm'], ... [300], ... ['normGeomSelect'], ... [0.08], ... [0.6 35], ... ['multiSimpleXover'], ... ['multiSimpleXover'], ... ['multiDepIntegerArithXover multiDepIntegerArithXover multiDepIntegerArithXover multiDepIntegerHeuristicXover multiDepIntegerHeuristicXover multiDepIntegerHeuristicXover multiDepIntegerHeuristicXover multiDepIntegerHeuristicXover multiDepIntegerHeuristicXover multiDepIntegerHeuristicXover multiDepIntegerHeuristicXover multiDepIntegerHeuristicXover multiDepIntegerHeuristicXover multiSimpleXover'], ... ['multiFloatArithXover multiFloatArithXover multiFloatArithXover multiFloatHeuristicXover multiFloatHeuristicXover multiFloatHeuristicXover multiFloatHeuristicXover multiFloatHeuristicXover multiFloatHeuristicXover multiFloatHeuristicXover multiFloatHeuristicXover multiFloatHeuristicXover multiFloatHeuristicXover multiSimpleXover'], ... [0], ... [0], ... [0; 0; 0; 3; 3; 3; 3; 3; 3; 3; 3; 3; 3; 0], ... [0; 0; 0; 3; 3; 3; 3; 3; 3; 3; 3; 3; 3; 0], ... [0.05 4], ... ['multiBinaryMutation'], ... ['multiIndepIntegerMutation'], ... ['multiDepIntegerGaussMutation'], ... ['multiFloatGaussMutation'], ... [1], ... [1], ... [0.02 5], ... [0.02 5]);disp('Design variable vector for the minimum value found:');disp(bestSol(1:16));disp('corresponding to the objective function value of:');fprintf(1, '%.2f\n', -bestSol(17));disp('The actual optimum:');fprintf(1, '%.2f\n', riccati(10, 100));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -