Dear AnyBody,
I am running a relatively straightforward optimization, using AnyOptStudy (if needed, details are below). Currently, I use all the default settings, although I have tried playing around with different Solvers and Tolerances.
When I use only one design variable at the time, it works like a charm for each of them. However, as soon as I add one or more design variables, it doesn’t. At first I though my object function was not good enough, but when I look at the results during the optimization (both in AnyBodyStudy and AnyOptStudy), the optimal search direction seems quite clear.
The oddest thing is, that it seems as if only the last entered design variable is the focus of the optimization. I discoverd this when I started changing the order of the design variables. It is not that other desing variables are completely ignored though. It is just that their change of value are at least a factor 100 lower. Also, most of the time (or all, I’m not sure), they all have the same value.
I tried to keep an eye on the targets of the AnyDesVar’s, and it seems that they are correctly updated before each run of the AnyBodyStudy.
Any idea what is going wrong here?
Kind regards,
Bart Koning
I am using AnyBody version : 6. 0. 4. 4327 (64-bit version), Build : 16344.54480
Short summary of the optimization
(Details below are applied twice, as I have used two force plates)
During the kinematics of the ‘StudyRef’ two different force vectors ‘slide’ over the horizontal plane;
[ol]
[li] The forceplate CoP vector (for which I reconstructed the CoP-ball myself, so I can use it during kinematics analysis)[/li][li] A second, my own, CoP vector.[/li][/ol]
My aim is to repostition the force plate in the horizontal plane, so that i get the best fit beween the both CoP’s. So the design variables are the X and Y position of the force plate origin (Main.ModelSetup.ForcePlates.Translation.PlateName); which I added in a slightly altered “ForcePlateType4AutoDetection”:
…
AnyFixedRefFrame Corners ={
AnyVar CoordinateSystemSize= 0.1;
Origin = Main.ModelSetup.ForcePlates.Translation.PlateName;
…
AnyDesVar FP1x = {
Val = Main.ModelSetup.ForcePlates.Translation.Plate1[0];
Min = -0.5;
Max = 0.5;
};
AnyDesVar FP1y = {
Val = Main.ModelSetup.ForcePlates.Translation.Plate1[1];
Min = -0.5;
Max = 0.5;
};
…
For the Objective I use the total moment that is intruduced around my own CoP, by taking the crossproduct of the global vector bewteen both CoP’s and the global force vector of the forceplate:
…
KinematicsForForcePlateTranslationStudy:
AnyOutputFun MomentAroundShoeCoPNorm = {
Val = vnorm(.MomentAroundShoeCoP);
};
AnyVec3 MomentAroundShoeCoP = cross(vecFP_Shoe,…CoPForcePlate2.Fglobal);
AnyVec3 vecFP_Shoe = {DistanceX,DistanceY,0};
AnyFloat DistanceX = (refFP.Vx-refShoe.Vx)*refFP.OnOff;
AnyFloat DistanceY = (refFP.Vy-refShoe.Vy)*refFP.OnOff;
TranslationForcePlateOptStudy:
AnyDesMeasure OBJ = {
Val = MomentAroundShoeCoPNormFP1.Val; //
Type = ObjectiveFun;
AnyOutputFun MomentAroundShoeCoPNormFP1 = {
Val = mean(…StudyRef.EnvironmentModel.compareCoP.ForcePlate1.MomentAroundShoeCoPNorm());
};
};
…