1#ifndef TORQUEMUSCLEFITTINGTOOLKIT_H_
2#define TORQUEMUSCLEFITTINGTOOLKIT_H_
166 double activationUpperBound,
167 double passiveTorqueAngleMultiplierUpperBound,
185 double maxActivation,
186 double maxPassiveTorqueAngleMultiplier,
195 Ipopt::Index &nnz_jac_g,
196 Ipopt::Index &nnz_h_lag,
197 Ipopt::TNLP::IndexStyleEnum &index_style);
216 Ipopt::Number *lambda);
219 const Ipopt::Number *x,
221 Ipopt::Number &obj_value);
224 const Ipopt::Number *x,
226 Ipopt::Number *grad_f);
229 const Ipopt::Number *x,
235 const Ipopt::Number *x,
238 Ipopt::Index nele_jac,
241 Ipopt::Number *values);
244 Ipopt::SolverReturn status,
246 const Ipopt::Number *x,
247 const Ipopt::Number *z_L,
248 const Ipopt::Number *z_U,
250 const Ipopt::Number *g,
251 const Ipopt::Number *lambda,
252 Ipopt:: Number obj_value,
253 const Ipopt::IpoptData *ip_data,
254 Ipopt::IpoptCalculatedQuantities *ip_cq);
258 const Ipopt::Number *x,
260 Ipopt::Number obj_factor,
262 const Ipopt::Number *lambda,
264 Ipopt::Index nele_hess,
267 Ipopt::Number *values);
virtual bool get_starting_point(Ipopt::Index n, bool init_x, Ipopt::Number *x, bool init_z, Ipopt::Number *z_L, Ipopt::Number *z_U, Ipopt::Index m, bool init_lambda, Ipopt::Number *lambda)
virtual bool eval_g(Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Index m, Ipopt::Number *g)
double mTaAngleScaleStart
RigidBodyDynamics::Math::VectorNd mConstraintErrors
unsigned int mIndexTauScaling
double getObjectiveValue()
virtual bool eval_f(Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Number &obj_value)
double getSolutionTorqueAngularVelocityOmegaMaxScale()
virtual bool get_nlp_info(Ipopt::Index &n, Ipopt::Index &m, Ipopt::Index &nnz_jac_g, Ipopt::Index &nnz_h_lag, Ipopt::TNLP::IndexStyleEnum &index_style)
double getSolutionMaximumActiveIsometricTorqueScale()
double mTvOmegaMaxScaleStart
RigidBodyDynamics::Math::VectorNd mXOffset
double getSolutionPassiveTorqueAngleCurveOffset()
RigidBodyDynamics::Math::VectorNd mWeights
FitTorqueMuscleParameters(const RigidBodyDynamics::Math::VectorNd &jointAngle, const RigidBodyDynamics::Math::VectorNd &jointAngularVelocity, const RigidBodyDynamics::Math::VectorNd &jointTorque, double maxActivation, double maxPassiveTorqueAngleMultiplier, double taLambda, double tvLambda, Millard2016TorqueMuscle &tqMcl)
RigidBodyDynamics::Math::VectorNd & getConstraintError()
double mTvOmegaMaxScaleLB
virtual bool eval_jac_g(Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Index m, Ipopt::Index nele_jac, Ipopt::Index *iRow, Ipopt::Index *jCol, Ipopt::Number *values)
virtual bool eval_grad_f(Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Number *grad_f)
double mTaAngleAtOneNormTorque
RigidBodyDynamics::Math::VectorNd mDtp_Dx
unsigned int mIndexTvOmegaMaxScale
const RigidBodyDynamics::Math::VectorNd & mJointTorque
unsigned int mIndexTpOffset
unsigned int mIndexTaAngleScale
virtual bool eval_h(Ipopt::Index n, const Ipopt::Number *x, bool new_x, Ipopt::Number obj_factor, Ipopt::Index m, const Ipopt::Number *lambda, bool new_lambda, Ipopt::Index nele_hess, Ipopt::Index *iRow, Ipopt::Index *jCol, Ipopt::Number *values)
double getSolutionActiveTorqueAngleAngleScaling()
const RigidBodyDynamics::Math::VectorNd & mJointAngularVelocity
Millard2016TorqueMuscle & mTqMcl
unsigned int mConIdxTauPassiveStart
unsigned int mConIdxTauPassiveEnd
double mTpAngleOffsetStart
double mTvOmegaMaxScaleUB
unsigned int mIndexTpLambda
virtual bool get_bounds_info(Ipopt::Index n, Ipopt::Number *x_l, Ipopt::Number *x_u, Ipopt::Index m, Ipopt::Number *g_l, Ipopt::Number *g_u)
void updOptimizationVariables(const Ipopt::Number *x)
unsigned int mConIdxTauActMaxEnd
unsigned int mConIdxTauActMinEnd
double getSolutionPassiveTorqueAngleBlendingParameter()
unsigned int mConIdxTauActMinStart
virtual void finalize_solution(Ipopt::SolverReturn status, Ipopt::Index n, const Ipopt::Number *x, const Ipopt::Number *z_L, const Ipopt::Number *z_U, Ipopt::Index m, const Ipopt::Number *g, const Ipopt::Number *lambda, Ipopt::Number obj_value, const Ipopt::IpoptData *ip_data, Ipopt::IpoptCalculatedQuantities *ip_cq)
const RigidBodyDynamics::Math::VectorNd & mJointAngle
unsigned int mConIdxTauActMaxStart
This class implements a rigid-tendon muscle-torque-generator (MTG) for a growing list of joints and t...
static void fitTorqueMuscleParameters(Millard2016TorqueMuscle const &tqMcl, RigidBodyDynamics::Math::VectorNd const &jointAngle, RigidBodyDynamics::Math::VectorNd const &jointAngularVelocity, RigidBodyDynamics::Math::VectorNd const &jointTorque, double activationUpperBound, double passiveTorqueAngleMultiplierUpperBound, TorqueMuscleParameterFittingData ¶metersOfBestFit, bool verbose=false)
This function will adjust the parameters of the muscle-torque-generator (MTG) so that the MTG is stro...