Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

rdActuatorForceTargetFast.h

00001 // rdActuatorForceTargetFast.h 00002 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00003 // Copyright (c) 2006 Stanford University and Realistic Dynamics, Inc. 00004 // Contributors: Frank C. Anderson, Ph.D. 00005 // 00006 // Permission is hereby granted, free of charge, to any person obtaining 00007 // a copy of this software and associated documentation files (the 00008 // "Software"), to deal in the Software without restriction, including 00009 // without limitation the rights to use, copy, modify, merge, publish, 00010 // distribute, sublicense, and/or sell copies of the Software, and to 00011 // permit persons to whom the Software is furnished to do so, subject 00012 // to the following conditions: 00013 // 00014 // The above copyright notice and this permission notice shall be included 00015 // in all copies or substantial portions of the Software. 00016 // 00017 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00018 // EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 00019 // WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 00020 // PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS, 00021 // CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 00022 // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 00023 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 00024 // THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00025 // 00026 // This software, originally developed by Realistic Dynamics, Inc., was 00027 // transferred to Stanford University on November 1, 2006. 00028 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00029 #ifndef __rdActuatorForceTargetFast_h__ 00030 #define __rdActuatorForceTargetFast_h__ 00031 00032 00033 //============================================================================== 00034 // INCLUDES 00035 //============================================================================== 00036 #include "rdCMCDLL.h" 00037 #include <OpenSim/Tools/rdTools.h> 00038 #include <OpenSim/Tools/rdMath.h> 00039 #include <OpenSim/SQP/rdFSQP.h> 00040 #include <OpenSim/SQP/rdOptimizationTarget.h> 00041 #include "rdCMC.h" 00042 00043 00044 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00045 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00069 class RDCMC_API rdActuatorForceTargetFast : public OpenSim::rdOptimizationTarget 00070 { 00071 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00072 //============================================================================== 00073 // DATA 00074 //============================================================================== 00075 private: 00077 rdCMC *_controller; 00079 OpenSim::Array<double> _modelControls; 00081 OpenSim::Array<double> _y; 00083 OpenSim::Array<double> _dydt; 00085 OpenSim::Array<double> _dqdt; 00087 OpenSim::Array<double> _dudt; 00089 OpenSim::Array<double> _recipAreaSquared; 00090 00091 //============================================================================== 00092 // METHODS 00093 //============================================================================== 00094 public: 00095 //--------------------------------------------------------------------------- 00096 // CONSTRUCTION 00097 //--------------------------------------------------------------------------- 00098 virtual ~rdActuatorForceTargetFast(); 00099 rdActuatorForceTargetFast(int aNX,rdCMC *aController); 00100 private: 00101 void setNull(); 00102 00103 //-------------------------------------------------------------------------- 00104 // SET AND GET 00105 //-------------------------------------------------------------------------- 00106 public: 00107 00108 //-------------------------------------------------------------------------- 00109 // REQUIRED OPTIMIZATION TARGET METHODS 00110 //-------------------------------------------------------------------------- 00111 // PERFORMANCE AND CONSTRAINTS 00112 int compute(double *x,double *p,double *c); 00113 int computeGradients(double *dx,double *x,double *dpdx,double *dcdx); 00114 // PERFORMANCE 00115 int computePerformance(double *x,double *p); 00116 int computePerformanceGradient(double *x,double *dpdx); 00117 // CONSTRAINTS 00118 int computeConstraint(double *x,int i,double *c); 00119 int computeConstraintGradient(double *x,int i,double *dcdx); 00120 00121 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00122 }; // END class rdActuatorForceTargetFast 00123 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00124 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00125 00126 00127 #endif // #ifndef __rdActuatorForceTargetFast_h__

Generated on Wed Nov 1 16:04:31 2006 for Computed Muscle Control (CMC) API by doxygen 1.3.8