Stores a DifferentialEquation together with an OutputFcn. The class DynamicSystem is a data class for storing a DifferentialEquation together with an OutputFcn. The dynamic system might be of hybrid nature, i.e. differential equation and output function might switch depending on a state-dependend switch function. Usage: >> Disturbance(differentialEquation, outputFunction); Parameters: differentialEquation [acado.DifferentialEquation] outputFunction [acado.OutputFcn] Example: >> Disturbance w; See also: acado.OutputFcn acado.DifferentialEquation Licence: This file is part of ACADO Toolkit - (http://www.acadotoolkit.org/) ACADO Toolkit -- A Toolkit for Automatic Disturbance and Dynamic Optimization. Copyright (C) 2008-2009 by Boris Houska and Hans Joachim Ferreau, K.U.Leuven. Developed within the Optimization in Engineering Center (OPTEC) under supervision of Moritz Diehl. All rights reserved. ACADO Toolkit is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. ACADO Toolkit 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with ACADO Toolkit; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Author: David Ariens Date: 2010
0001 %Stores a DifferentialEquation together with an OutputFcn. 0002 % The class DynamicSystem is a data class for storing a DifferentialEquation together 0003 % with an OutputFcn. The dynamic system might be of hybrid nature, i.e. differential 0004 % equation and output function might switch depending on a state-dependend 0005 % switch function. 0006 % 0007 % Usage: 0008 % >> Disturbance(differentialEquation, outputFunction); 0009 % 0010 % Parameters: 0011 % differentialEquation [acado.DifferentialEquation] 0012 % outputFunction [acado.OutputFcn] 0013 % 0014 % Example: 0015 % >> Disturbance w; 0016 % 0017 % See also: 0018 % acado.OutputFcn 0019 % acado.DifferentialEquation 0020 % 0021 % Licence: 0022 % This file is part of ACADO Toolkit - (http://www.acadotoolkit.org/) 0023 % 0024 % ACADO Toolkit -- A Toolkit for Automatic Disturbance and Dynamic Optimization. 0025 % Copyright (C) 2008-2009 by Boris Houska and Hans Joachim Ferreau, K.U.Leuven. 0026 % Developed within the Optimization in Engineering Center (OPTEC) under 0027 % supervision of Moritz Diehl. All rights reserved. 0028 % 0029 % ACADO Toolkit is free software; you can redistribute it and/or 0030 % modify it under the terms of the GNU Lesser General Public 0031 % License as published by the Free Software Foundation; either 0032 % version 3 of the License, or (at your option) any later version. 0033 % 0034 % ACADO Toolkit is distributed in the hope that it will be useful, 0035 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0036 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0037 % Lesser General Public License for more details. 0038 % 0039 % You should have received a copy of the GNU Lesser General Public 0040 % License along with ACADO Toolkit; if not, write to the Free Software 0041 % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 0042 % 0043 % Author: David Ariens 0044 % Date: 2010 0045 % 0046 classdef DynamicSystem < handle 0047 properties(SetAccess='private') 0048 differentialEquation; 0049 outputFunction; 0050 name = 'dynamicsystem'; 0051 end 0052 0053 methods 0054 function obj = DynamicSystem(varargin) 0055 0056 global ACADO_; 0057 ACADO_.count_other = ACADO_.count_other+1; 0058 obj.name = strcat(obj.name, num2str(ACADO_.count_other)); 0059 0060 0061 if (nargin == 2 && isa(varargin{1}, 'acado.DifferentialEquation') && isa(varargin{2}, 'acado.OutputFcn')) 0062 0063 obj.differentialEquation = varargin{1}; 0064 obj.outputFunction = varargin{2}; 0065 0066 else 0067 0068 error('ERROR: Invalid DynamicSystem call. <a href="matlab: help acado.DynamicSystem">help acado.DynamicSystem</a>'); 0069 0070 end 0071 0072 ACADO_.helper.addInstruction(obj); 0073 end 0074 0075 0076 getInstructions(obj, cppobj, get) 0077 0078 end 0079 0080 end 0081 0082