classdef optimmodel < handle
   % Class to support trimming of nonlinear black box models.

   % Copyright 2007-2023 The MathWorks, Inc.

   properties
      Model
      Algorithm
      Type (1,1) string {mustBeMember(Type,["op","state"])} = "op"
      Data (1,1)
   end

   methods
      function this = optimmodel(Model)
         % Constructor.
         if nargin>0
            this.Model = Model;
         end
      end

      function option = configureOptimizationOptions(~, option, varargin)
         %Configure common options to be used with given optimizer.
         %
         %   OPTION: struct used by estimator containing algorithm properties.
         %   ALGO: Algorithm property of this.Model

         if strcmpi(option.Display, 'full')
            option.Display = 'on';
         end

         if isstruct(option)
            option.Criterion = 'Trace';
         end
      end

      function initialize(~)
         % no-op
      end
   end

end