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

rdActuatorForceTarget.h

00001 // rdActuatorForceTarget.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 __rdActuatorForceTarget_h__ 00030 #define __rdActuatorForceTarget_h__ 00031 00032 #include "rdCMCDLL.h" 00033 #include <OpenSim/Tools/rdTools.h> 00034 #include <OpenSim/Tools/Array.h> 00035 #include <OpenSim/SQP/rdFSQP.h> 00036 class rdCMC; 00037 00038 00039 //extern class RDTOOLS_API Array<double>; 00040 00041 00042 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00043 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00069 class RDCMC_API rdActuatorForceTarget : public OpenSim::rdOptimizationTarget 00070 { 00071 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00072 //============================================================================== 00073 // DATA 00074 //============================================================================== 00075 private: 00077 rdCMC *_controller; 00079 OpenSim::Array<double> _x; 00081 OpenSim::Array<double> _y; 00083 OpenSim::Array<double> _dydt; 00085 OpenSim::Array<double> _dqdt; 00087 OpenSim::Array<double> _dudt; 00089 double _stressTermWeight; 00090 00091 //============================================================================== 00092 // METHODS 00093 //============================================================================== 00094 public: 00095 //--------------------------------------------------------------------------- 00096 // CONSTRUCTION 00097 //--------------------------------------------------------------------------- 00098 virtual ~rdActuatorForceTarget(); 00099 rdActuatorForceTarget(int aNX,rdCMC *aController); 00100 private: 00101 void setNull(); 00102 00103 //--------------------------------------------------------------------------- 00104 // SET AND GET 00105 //--------------------------------------------------------------------------- 00106 public: 00107 void setStressTermWeight(double aWeight); 00108 00109 //-------------------------------------------------------------------------- 00110 // REQUIRED OPTIMIZATION TARGET METHODS 00111 //-------------------------------------------------------------------------- 00112 // PERFORMANCE AND CONSTRAINTS 00113 int compute(double *x,double *p,double *c); 00114 int computeGradients(double *dx,double *x,double *dpdx,double *dcdx); 00115 // PERFORMANCE 00116 int computePerformance(double *x,double *p); 00117 int computePerformanceGradient(double *x,double *dpdx); 00118 // CONSTRAINTS 00119 int computeConstraint(double *x,int i,double *c); 00120 int computeConstraintGradient(double *x,int i,double *dcdx); 00121 00122 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00123 }; // END class rdActuatorForceTarget 00124 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00125 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00126 00127 00128 #endif // #ifndef __rdActuatorForceTarget_h__

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