Can I define a user-defined optimization function in AnyBody?

#1

Hi Anybody Team,

I am wondering if AnyBody allow user to define a user-defined optimization function? I want to simulate a task that may need not only to minimize the metabolic value (default function) but also maintain some muscle forces within a specific range.

I have read the tutorial about muscle recruitment parts. It seems that non of them is suitable for my situation. So, I am wondering if it is feasible in AnyBody to define a user-defined optimization function? If not, can you give me some suggestions?

Thanks in advance,
Tao

#2

Hi Tao,

I think it is possible to do what you ask for.

You could write e.g.
/// Upper and lower bound for DeltodeusB
AnyMuscleActivityBound DeltodeusA_bound =
{
AnyMuscle &muscles = .DeltodeusA;

    LowerBoundOnOff = On;
    LowerBound = 0.1;

    UpperBoundOnOff = On;
    UpperBound = 0.5;
  };

This constrains the muscle to have an activation within these bounds.

The bounds do not need to be constants they can be timedependent, so if you have data you can construct an interpolation functions for the bounds.

Hope it helps…

Best regards
Søren