www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgoptimstore/cgoptimstore.m
function obj = cgoptimstore(optimrunner) %CGOPTIMSTORE Constructor for an optimization interface. % I = CGOPTIMSTORE constructs a new interface that is used for % communicating between the optimization capabilities in CAGE and % user-defined optimization functions. % % The cgoptimstore object provides methods for accessing information % about and evaluating the objectives and constraints that have been % defined in the CAGE GUI. It also provides the interface for sending % the optimization results back to CAGE when an optimization is % completed. % % See also: CGOPTIMSTORE/GET, CGOPTIMSTORE/EVALUATE. % Copyright 2000-2009 The MathWorks, Inc. and Ford Global Technologies, Inc. if nargin == 0 optimrunner = []; end if nargin && isstruct(optimrunner) s = optimrunner; else s = struct('OptimRunner', optimrunner, ... 'OptimalFreeValues', [], ... 'ResultOK', 0, ... 'ResultMessage', '', ... 'ResultStats', [],... 'SelectedSolution',[],... 'Version',2); end obj = class(s, 'cgoptimstore');