Home > matlab > acado > packages > +acado > @MexInput > MexInput.m

MexInput

PURPOSE ^

Use this object as a 'free' variable. This variable can be set after

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

Use this object as a 'free' variable. This variable can be set after
 compiling by calling the compiled function with arguments. Eg:
 "myProblem_RUN" would become "myProblem_RUN(1, [1 2;3 4])". Represents a
 numeric value


  Example:
    >> input1 = acado.MexInput();

  See also:
    acado.MexInputVector
    acado.MexInputMatrix

  Licence:
    This file is part of ACADO Toolkit  - (http://www.acadotoolkit.org/)

    ACADO Toolkit -- A Toolkit for Automatic Control 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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 %Use this object as a 'free' variable. This variable can be set after
0002 % compiling by calling the compiled function with arguments. Eg:
0003 % "myProblem_RUN" would become "myProblem_RUN(1, [1 2;3 4])". Represents a
0004 % numeric value
0005 %
0006 %
0007 %  Example:
0008 %    >> input1 = acado.MexInput();
0009 %
0010 %  See also:
0011 %    acado.MexInputVector
0012 %    acado.MexInputMatrix
0013 %
0014 %  Licence:
0015 %    This file is part of ACADO Toolkit  - (http://www.acadotoolkit.org/)
0016 %
0017 %    ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization.
0018 %    Copyright (C) 2008-2009 by Boris Houska and Hans Joachim Ferreau, K.U.Leuven.
0019 %    Developed within the Optimization in Engineering Center (OPTEC) under
0020 %    supervision of Moritz Diehl. All rights reserved.
0021 %
0022 %    ACADO Toolkit is free software; you can redistribute it and/or
0023 %    modify it under the terms of the GNU Lesser General Public
0024 %    License as published by the Free Software Foundation; either
0025 %    version 3 of the License, or (at your option) any later version.
0026 %
0027 %    ACADO Toolkit is distributed in the hope that it will be useful,
0028 %    but WITHOUT ANY WARRANTY; without even the implied warranty of
0029 %    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0030 %    Lesser General Public License for more details.
0031 %
0032 %    You should have received a copy of the GNU Lesser General Public
0033 %    License along with ACADO Toolkit; if not, write to the Free Software
0034 %    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
0035 %
0036 %    Author: David Ariens
0037 %    Date: 2010
0038 %
0039 classdef MexInput < acado.Expression    
0040     properties(SetAccess='protected')
0041         type;
0042         counter;
0043     end
0044     
0045     methods
0046         function obj = MexInput(varargin)
0047             checkActiveModel;
0048             
0049             global ACADO_;
0050             obj.counter = ACADO_.count_mexin;
0051             obj.name = strcat('mexinput', num2str(ACADO_.count_mexin));
0052             ACADO_.count_mexin = ACADO_.count_mexin+1;   % START WITH ZERO!
0053             
0054             obj.type = 1;
0055              
0056             ACADO_.helper.addIn(obj);
0057             ACADO_.helper.addInstruction(obj);  
0058         end
0059         
0060         getInstructions(obj, cppobj, get)
0061 
0062     end
0063     
0064 end

www.acadotoolkit.org/matlab
Generated on Tue 01-Jun-2010 20:14:12 by m2html © 2005