亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? differentialevolution.m

?? 非常好的差分進化matlab程序
?? M
?? 第 1 頁 / 共 5 頁
字號:
function varargout = differentialevolution(DEParams, paramDefCell, ...
	objFctHandle, objFctSettings, objFctParams, emailParams, optimInfo)
%DIFFERENTIALEVOLUTION  Start Differential Evolution optimization.
%		BESTMEM = DIFFERENTIALEVOLUTION(DEPARAMS, ...) starts a Differential
%		Evolution (DE) optimization to minimize the cost returned by a given
%		function. For a quick start, check out and modify the functions DEMO1
%		and DEMO2. 
%
%		Output arguments:
%
%		bestmem          - Best population member.
%		bestval          - Lowest evaluated cost.
%		bestFctParams    - Structure like input objFctParams containing the 
%		                   best parameter set.
%		nOfIterations    - Number of iterations done.
%
%
%		Input arguments:
%
%		DEParams         - Struct with parameters for DE.
%		paramDefCell     - Cell specifying the parameters to optimize.
%		objFctHandle     - Handle to the objective function.
%		objFctSettings   - Additional settings to be passed (a cell array will 
%		                   be expanded using {:}). If no additional settings
%		                   are needed, set objFctSettings to an empty cell: {}
%		objFctParams     - Struct with initial parameters.
%		emailParams      - Struct with fields serveraddress, fromaddress, 
%		                   toaddress, and, if needed, username and password. 
%		                   Parameters are used for sending E-mail 
%		                   notifications.
%		optimInfo        - Info about current optimization task. Fields 'title'
%		                   and 'subtitle' are displayed and included in saved  
%		                   files if existing. No influence on optimization.
%
%		The structure DEParams needs to contain the following fields:
%
%		VTR            "Value To Reach" (set to empty matrix for no VTR).
%		NP             Number of population members (e.g. 10*D).
%		F              DE-stepsize F from interval [0, 2]. A good initial guess
%		               is the interval [0.5, 1], e.g. 0.8.
%		CR             Crossover probability constant from interval [0, 1]. If
%		               the parameters are correlated, high values of CR work
%		               better. The reverse is true for no correlation.
%		strategy       1 --> DE/best/1/exp (def.)   6 --> DE/best/1/bin
%		               2 --> DE/rand/1/exp          7 --> DE/rand/1/bin
%		               3 --> DE/rand-to-best/1/exp  8 --> DE/rand-to-best/1/bin
%		               4 --> DE/best/2/exp          9 --> DE/best/2/bin
%		               5 --> DE/rand/2/exp          else  DE/rand/2/bin
%		               Experiments suggest that /bin likes to have a slightly
%		               larger CR than /exp
%		maxiter        Maximum number of iterations.
%		maxtime        Maximum time (in seconds) before finishing optimization.
%		               Set to empty or Inf for no time limit.
%		maxclock       Time (as returned by function clock.m) when to
%		               finish optimization. Set to empty for no end time.
%		minvalstddev   Population is reinitialized if the standard deviation of 
%		               the cost values in the population is lower than 
%		               minvalstddev.
%		minparamstddev Population is reinitialized if the maximum parameter
%		               standard deviation (normalized to the parameter range) 
%		               is lower than minparamstddev.
%		nofevaliter    Population is reinitialized if there was no function
%		               evaluation during the last nofevaliter iterations.
%		nochangeiter   Population is reinitialized if there was no change in 
%		               the population during the last nochangeiter iterations.
%		refreshiter    Info is displayed and current state is saved every
%		               refreshiter iterations.               
%		refreshtime    State is saved after refreshtime seconds.
%		refreshtime2   Additional progress information is displayed every
%		               refreshtime2 seconds (usually refreshtime2 >>
%		               refreshtime).
%		refreshtime3   Progress information is sent by E-mail every  
%		               refreshtime3 seconds (usually refreshtime3 >> 
%		               refreshtime2).
%		useInitParams  If one, the given parameters in struct objFctParams 
%		               OR those in the fourth column of paramDefCell are used 
%		               as one of the initial population members. If two,  
%		               additionally the first twenty percent of the population 
%		               members are computed as the given initial parameter 
%		               vector plus small random noise. 
%		saveHistory    Save intermediate results.
%		displayResults Draw graphs for visualization of the optimization 
%		               result.
%		feedSlaveProc  Use slave process for parallel computation.
%		maxMasterEvals Maximum number of function evaluations done by the
%		               master process. Warning: Use this option with caution! 
%		               If maxMasterEvals is set to a number less than the 
%		               number of population members and one of the slave 
%		               processes is interrupted, the optimization will be 
%		               stuck! 
%		slaveFileDir   Base directory for saving slave files.
%		playSound      Play a short sound when a new best member was found
%
%		If DEParams is empty or fields are missing, default parameters are used 
%		(see function GETDEFAULTPARAMS).
%
%		The cell array paramDefCell has to contain the names of the parameters 
%		to optimize, its ranges, their quantizations and the initial values.
%		Each parameter may be a real-valued scalar or column vector.
%
%		Example 1 (only scalar parameters):
%
%		paramDefCell = {
%		  'useSmoothing',    [0    1],     1,   0
%		  'nOfCoefficients', [5   20],     1,  10
%		  'threshold',       [0.01 1], 0.001, 0.5 }
%
%		The first cell in each row contains the name of the parameter, the
%		second a two-element row vector specifying the allowed range, the third
%		the quantization and the fourth the initial values (the fourth column
%		of the cell array may be omitted). Provide a non-empty value either in
%		objFctParams or in the fourth column of paramDefCell as initial value.
%		If both are present, a warning message is issued and the value in
%		paramDefCell is used. If objFctParams is empty and no initial
%		parameters are given in paramDefCell, the centers of the parameter
%		ranges are used as initial parameters.
%
%		Using parameter quantization allows for the use of binary variables
%		like 'useSmoothing' above as well for parameters that are of integer
%		nature, like a number of coefficients. If the quantization of a
%		parameter is set to zero, the parameter is not quantized. Using a
%		quantization grid for continuous parameters can save computational
%		effort. If saveHistory is true, all evaluated parameter vectors are
%		saved with the corresponding cost value and the same parameter value
%		will never be evaluated twice. With quantization, it is more likely
%		that a generated parameter vector was already evaluated and saved
%		before. 
%
%		Example 2 (vector parameter):
%
%		paramDefCell = {'weightings', [0 1; 0 2], [0.01; 0.02], [0.5; 0.5]};
%
%		Here, the parameter weightings is defined as a two-element column
%		vector. The ranges are set to [0, 1] for the first element and [0, 2]
%		for the second. The quantizations are 0.01 and 0.02 and the initial
%		values are both 0.5.
%
%		The objective function (given as function handle objFctHandle) is
%		started as
%
%		value = objFctHandle(objFctSettings,    objFctParams) or
%		value = objFctHandle(objFctSettings{:}, objFctParams).
%
%		The second case is used if objFctSettings is a cell array, thus
%		allowing for an arbitrary number of additional input arguments. The
%		provided structure objFctParams may contain further fixed parameters
%		and/or the current parameter values. The fields with the names of the
%		parameters given in paramDefCell are overwritten by the values of the
%		current parameters. If the objective function handle is empty, the
%		distance to a randomly chosen optimal parameter vector is used as cost
%		value (for testing purposes).
%
%		Example 3 (vector parameter):
%
%		paramDefCell = {'', [0 1; 0 2], [0.01; 0.02], [0.5; 0.5]};
%
%		In this special case (one single parameter with empty name), the
%		objective function is called as
%
%		value = objFctHandle(objFctSettings,    paramVec) or
%		value = objFctHandle(objFctSettings{:}, paramVec)
%
%		with the current parameters in column vector paramVec. 
%
%		When displaying an info string, the current optimization state
%		including all tested members etc. is saved in the file
%		XXX_result_YYY_ZZ.mat, where XXX is the name of the objective function,
%		YYY is the name of the current host and ZZ is a number between 1 and 50
%		(to avoid overwriting old results).
%
%		A 'time over'-file is saved at the start of the optimization. The
%		optimization is stopped if this file is deleted. Using this mechanism
%		to stop the simulation avoids to break Matlab during saving a file,
%		which can make a file unaccessible for the rest of the session and
%		leads to repeating warning messages. The name of the file to delete is
%		XXX_timeover_YYY.mat, where XXX is the name of the objective function
%		and YYY is the hostname. Result- and 'time over'-files are saved in
%		directory 'data' if existing, otherwise in the current directory.
%
%		The optimization can be performed in parallel by more than one
%		processor/computer. Function DIFFERENTIALEVOLUTION has to be started on
%		one processor/computer, function DIFFERENTIALEVOLUTIONSLAVE on one or
%		more other processors/computers. Function DIFFERENTIALEVOLUTION acts as
%		master and saves information about which function to evaluate and which
%		parameters to use into files in a commonly accessible directory. The
%		Distributed Computing toolbox is not used. If input parameter
%		slaveFileDir is empty, the directory differentialevolution is used (or
%		created) below the temporary directory returned by function TEMPDIR2
%		(something like C:\Documents and Settings\<UserName>\Local Settings\
%		Temp\<UserName>@<HostName>\MATLAB). 
%
%		Function DIFFERENTIALEVOLUTION was developed for objective functions
%		that need relatively long for one function evaluation (several seconds
%		or more). When used with objective functions that evaluate very fast,
%		memory problems could occur. When saveHistory is true, every evaluated
%		parameter vector is kept in memory. Further, the overhead for checking
%		if a parameter vector was already evaluated might be larger than a
%		function evaluation itself.
%
%		Start this function without input arguments or with only the first
%		input argument DEParams to run a demo optimization of Rosenbrock's
%		saddle. No files are saved during the demo.
%
%		This function is based on the differential evolution (DE) algorithm of
%		Rainer Storn (http://www.icsi.berkeley.edu/~storn/code.html). The core
%		evolutional algorithm was taken from function devec3.m.
%
%		Markus Buehren
%		Last modified 17.06.2008 
%
%		See also DIFFERENTIALEVOLUTIONSLAVE, DISPLAYOPTIMIZATIONHISTORY,
%		GETDEFAULTPARAMS, DEMO1, DEMO2, TEMPDIR2.

% get default DE parameters
DEParamsDefault = getdefaultparams;

% set text width for wrapping displayed information
textWidth = 75;

% get DE parameters from input structure
if nargin == 0 || isempty(DEParams)
	DEParams = DEParamsDefault;
else
	fieldNames = fieldnames(DEParamsDefault);
	for k=1:length(fieldNames)
		if ~isfield(DEParams, fieldNames{k})
			DEParams.(fieldNames{k}) = DEParamsDefault.(fieldNames{k});
			disp(textwrap2(sprintf(['Warning: Field ''%s'' not included in DEParams. ', ...
				'Using default value.'], fieldNames{k}), textWidth));
		end
	end
end

switch nargin
	case {0,1}
	% generate default parameter set for demonstration
	objFctParams.parameter1 = -1;
	objFctParams.parameter2 = -1;
	objFctHandle            = @rosenbrocksaddle;
	objFctSettings          = 100;
	paramDefCell = {
		'parameter1', [-2 2], 0.05
		'parameter2', [-2 2], 0.05};
	optimInfo.title         = 'Optimization of Rosenbrock''s saddle';
	emailParams             = [];
	DEParams.feedSlaveProc  = 1;
	DEParams.refreshiter    = 1;
	DEParams.refreshtime    = 10;  % in seconds
	DEParams.refreshtime2   = 20;  % in seconds
	DEParams.refreshtime3   = 40;  % in seconds
	DEParams.maxiter        = 100;
	DEParams.maxtime        = 60;  % in seconds
	rand('state', 1); % always use the same population members
	case 2
		error(textwrap2('Wrong number of input arguments.'));
	otherwise
		if ~exist('objFctSettings', 'var')
			objFctSettings = {};			
		end
		if ~exist('objFctParams', 'var')
			objFctParams = [];			
		end
		if ~exist('emailParams', 'var')
			emailParams = [];			
		end
		if ~exist('optimInfo', 'var') || isempty(optimInfo) || ~isstruct(optimInfo)
			optimInfo       = [];
			optimInfo.title = 'DE optimization';
		end
end

% check paramDefCell
checkinputs__(paramDefCell, objFctParams);

% modify paramDefCell if there are vector-valued parameters
k = 1;
parameterDimVector = [];
while k <= size(paramDefCell, 1)
	parameterDim = size(paramDefCell{k,2}, 1);
	if parameterDim == 1
		parameterDimVector(k,1) = 1; %#ok
		k = k + 1;
	else
		% introduce new rows in paramDefCell
		parameterDimVector(k:k+parameterDim-1,1) = parameterDim; %#ok
		parameterName = paramDefCell{k,1};
		paramDefCell = [paramDefCell(1:k,:); ...
			cell(parameterDim-1, size(paramDefCell,2)); paramDefCell(k+1:end,:)];
		for d = parameterDim:-1:1
			paramDefCell{k+d-1, 1} = sprintf('%s_%d', parameterName, d);
			for col = 2:size(paramDefCell,2)
				paramDefCell{k+d-1,col} = paramDefCell{k, col}(d,:);
				if col == 4 && isnan(paramDefCell{k+d-1,col}) % initial value = NaN
					paramDefCell{k+d-1,col} = [];
				end
			end
		end
		k = k + parameterDimVector(k,1);
	end
end
getparametername__(paramDefCell, parameterDimVector); % function initialization

% get parameter bounds
parameterBounds   = cell2mat(paramDefCell(:,2));
parGridVector     = cell2mat(paramDefCell(:,3));
D     = size(parameterBounds, 1);
XVmin = parameterBounds(:, 1)';
XVmax = parameterBounds(:, 2)';
params.D = D;

% check bounds
erroneousBoundsFound = 0;
for parNr = 1:find(XVmin > XVmax)'
	disp(sprintf('Lower bound (%g) of parameter %s is larger than upper bound (%g).', ...
		XVmin(parNr), getparametername__(parNr, 1), XVmax(parNr)));
	erroneousBoundsFound = true;
end
if erroneousBoundsFound
	error('Erroneous parameter bounds found.');
end

% compute number of possible parameter vectors
if all(parGridVector > 0)
	nOfPossibleMembers = prod(floor((diff(parameterBounds, 1, 2) + 0.5*parGridVector) ./ parGridVector) + 1); %prod求內積
else
	nOfPossibleMembers = inf;
end

% check parameters
DEParams.NP = min(DEParams.NP, nOfPossibleMembers);
if (DEParams.maxiter <= 0) %maxiter最大疊代數
	error('maxiter must be greater than zero.');
end
if DEParams.displayResults && ~DEParams.saveHistory
	disp(sprintf('Warning: Optimization history can not be displayed if not saved.\n'));
	DEParams.displayResults = 0;
end
DEParams.refreshiter = floor(DEParams.refreshiter);

% get parameters
NP             = DEParams.NP;
refreshtime    = DEParams.refreshtime;
refreshtime2   = DEParams.refreshtime2;
refreshtime3   = DEParams.refreshtime3;
maxtime        = DEParams.maxtime;
maxclock       = DEParams.maxclock;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91免费视频网址| 国产不卡在线视频| 美女精品自拍一二三四| 国产精品夜夜爽| 成人小视频免费在线观看| 成人禁用看黄a在线| 欧美日韩一区二区三区视频| 欧美精品aⅴ在线视频| 国产亚洲精品超碰| 一区二区在线观看av| 日韩电影免费在线观看网站| 国产专区欧美精品| 色婷婷一区二区| 欧美大片国产精品| 综合色中文字幕| 奇米精品一区二区三区四区| 成人av电影观看| 欧美一卡2卡3卡4卡| 中文在线一区二区| 九一九一国产精品| 日本韩国欧美在线| 国产精品久久影院| 麻豆91在线看| 欧美体内she精视频| 亚洲国产高清在线观看视频| 午夜精品久久久久久久99水蜜桃| 国产成人精品免费网站| 91精品综合久久久久久| 亚洲精品视频自拍| 粉嫩绯色av一区二区在线观看| 欧美日韩高清影院| 亚洲欧美另类小说| 国产另类ts人妖一区二区| 91精品中文字幕一区二区三区 | 麻豆一区二区三区| 91丝袜美腿高跟国产极品老师 | 欧美激情资源网| 日韩和欧美一区二区| 日本黄色一区二区| 亚洲免费观看视频| 成人一区二区在线观看| 久久女同精品一区二区| 日韩高清在线观看| 欧美日韩在线观看一区二区 | 久久久美女艺术照精彩视频福利播放| 亚洲精品国产a久久久久久| 成人av免费在线播放| 国产欧美日韩久久| 国产一区在线精品| 日韩欧美黄色影院| 男女性色大片免费观看一区二区| 欧美浪妇xxxx高跟鞋交| 亚洲一区二区3| 欧美性大战久久久| 亚欧色一区w666天堂| 欧美系列日韩一区| 亚洲va欧美va人人爽| 欧美日本韩国一区| 亚洲成人av电影| 9191成人精品久久| 激情文学综合网| 久久综合999| 国产精品一区二区在线观看网站| 欧美不卡123| 国产九九视频一区二区三区| 国产欧美日韩亚州综合| 丁香啪啪综合成人亚洲小说| 一区二区日韩av| 91麻豆视频网站| 亚洲国产视频一区| 日韩欧美成人激情| 丁香亚洲综合激情啪啪综合| 亚洲欧美日韩在线| 91精品久久久久久久99蜜桃| 麻豆91精品91久久久的内涵| 久久一区二区视频| 99久久国产综合色|国产精品| 亚洲一区二区免费视频| 精品久久一区二区| 成人做爰69片免费看网站| 亚洲美女视频在线观看| 欧美夫妻性生活| 国产成人免费av在线| 亚洲一区在线观看网站| 日韩精品一区二区三区在线| 成人免费视频视频在线观看免费| 一区二区成人在线观看| 欧美大尺度电影在线| 99久久99久久综合| 老汉av免费一区二区三区| 国产精品久久久久久久久免费桃花| 91麻豆swag| 国产综合久久久久久鬼色| 亚洲精品一二三区| 欧美大黄免费观看| 欧美艳星brazzers| 国产69精品久久久久毛片| 亚洲第一狼人社区| 国产精品免费视频网站| 欧美男男青年gay1069videost| 国产成人自拍网| 亚洲福利一区二区| 色哟哟在线观看一区二区三区| 日本欧美韩国一区三区| 中文字幕乱码日本亚洲一区二区| 色诱亚洲精品久久久久久| 亚洲成av人片一区二区梦乃| 久久综合给合久久狠狠狠97色69| 高清不卡一区二区| 亚洲成人av一区二区三区| 国产欧美日韩三级| 欧美日韩精品一区视频| 成人精品视频一区| 国产九色sp调教91| 裸体健美xxxx欧美裸体表演| 亚洲日本va在线观看| 精品嫩草影院久久| 色综合久久六月婷婷中文字幕| 蜜桃av噜噜一区| 亚洲精品视频在线观看免费| 欧美videossexotv100| 91官网在线免费观看| 欧美96一区二区免费视频| 亚洲国产精品一区二区www| 2020国产精品久久精品美国| 欧美日韩一区二区在线观看视频| 国产乱码精品一区二区三区五月婷 | 亚洲激情自拍偷拍| 国产一区二区三区最好精华液| 国产91精品入口| 午夜精品福利视频网站| 国产农村妇女毛片精品久久麻豆 | 亚洲国产日产av| 国产精品视频观看| 日韩免费看网站| 欧美日韩色一区| 99久久精品久久久久久清纯| 一区二区不卡在线播放| 亚洲欧美日韩国产手机在线| 2020国产精品自拍| 欧美一区二区人人喊爽| 欧美三级日韩在线| 91福利视频在线| 91美女在线看| 91黄色免费版| 91女人视频在线观看| 成人黄色小视频在线观看| 国产一区二区精品久久99| 欧美a级一区二区| 日韩成人精品视频| 在线播放欧美女士性生活| 欧美日韩色综合| 欧美激情综合五月色丁香| 精品国产露脸精彩对白| 久久久久综合网| 日本一区二区视频在线观看| 精品sm在线观看| 日本一区二区免费在线| 一区二区中文视频| 精品一二三四在线| 精品一区二区三区av| 精品一区二区三区在线观看 | 日韩一区二区免费视频| 欧美老肥妇做.爰bbww| 欧美精品久久久久久久多人混战| 欧美日韩国产在线播放网站| 欧美理论片在线| 日韩精品一区二区三区视频在线观看 | 欧美日韩中文另类| 精品少妇一区二区三区免费观看| 91精品国模一区二区三区| 日韩限制级电影在线观看| 日韩欧美你懂的| 亚洲蜜臀av乱码久久精品蜜桃| 一区二区三区欧美日| 日韩黄色在线观看| 蜜臀av一区二区三区| 国产精品66部| 在线视频欧美区| 欧美哺乳videos| 中文字幕一区二区三| 亚洲一区二区精品久久av| 久久精品国产久精国产| 成人免费视频视频| 欧美视频日韩视频| 国产欧美一区二区三区在线看蜜臀| 亚洲天堂av老司机| 亚洲成a人片综合在线| 韩国成人福利片在线播放| 成人高清视频免费观看| 91精品国产全国免费观看| 国产日韩av一区二区| 亚洲成人手机在线| 国产精品自拍三区| 色又黄又爽网站www久久| 精品乱码亚洲一区二区不卡| 国产精品灌醉下药二区| 亚洲美女屁股眼交3| 盗摄精品av一区二区三区| 69堂国产成人免费视频|