Skip to content

Commit 26b88b9

Browse files
committed
Changed the initial guess to max otherwise it greatly overestimate the values
1 parent c508d95 commit 26b88b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

OpenSim/Analyses/StaticOptimization.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,9 +585,9 @@ int StaticOptimization::begin(const SimTK::State& s )
585585
ScalarActuator* act = dynamic_cast<ScalarActuator*>(&fs.get(i));
586586
if (act) {
587587
if (act->getMinControl() != -INFINITY)
588-
_parameters[j++] = act->getMinControl();
588+
_parameters[j++] = act->getMaxControl();
589589
else
590-
_parameters[j++] = 0.;
590+
_parameters[j++] = 1.;
591591
}
592592
}
593593
}

0 commit comments

Comments
 (0)