gusucode.com > 十大算法matlab程序说明 > 十大算法matlab程序说明/遗传退火法/一个Matlab的模拟退火算法工具箱/template_cost.txt

    function Ew = PROBLEMNAME_cost(X,W)
% Ew = PROBLEMNAME_cost(X,W)
%
%   X = behaviorally constant application data
%
%   W = specific data about current state
%
%   Ew = energy corresponding to W
%
Ew = rand ;     % a typical application will use information from W and X to compute Ew.