OpenSim Moco
0.1.0-preprint
Solve optimal control problems with OpenSim models
|
Once the solver is created, you should not make any edits to the MocoProblem.
If you do, you must call resetProblem(const MocoProblem& problem).
#include <Moco/Moco/MocoSolver.h>
Public Member Functions | |
MocoSolver (const MocoProblem &problem) | |
This calls resetProblem() with the provided problem. | |
void | resetProblem (const MocoProblem &problem) |
Call this to prepare the solver for use on the provided problem. | |
MocoTrajectory | createGuessTimeStepping () const |
(Experimental) Run a forward simulation (using the OpenSim Manager, which uses a SimTK::Integrator), using the default controls for actuators and the default states as the initial states, to create a guess that is dynamically consistent (constraint errors should be small). More... | |
Protected Member Functions | |
const MocoProblemRep & | getProblemRep () const |
std::unique_ptr< ThreadsafeJar< const MocoProblemRep > > | createProblemRepJar (int size) const |
Create a library of MocoProblemReps for use in parallelized code. | |
Static Protected Member Functions | |
static void | setSolutionStats (MocoSolution &, bool success, double objective, const std::string &status, int numIterations, double duration) |
This is a service for derived classes, because MocoSolution::setStatus(), MocoSolution::setSuccess(), etc. More... | |
MocoTrajectory OpenSim::MocoSolver::createGuessTimeStepping | ( | ) | const |
(Experimental) Run a forward simulation (using the OpenSim Manager, which uses a SimTK::Integrator), using the default controls for actuators and the default states as the initial states, to create a guess that is dynamically consistent (constraint errors should be small).
The time range for the simulation is the upper bound on the initial time and the lower bound on the final time. The initial state values are the default state values unless:
The number of times in the iterate is the number of successful integration steps.
Exception | If the lower bound on the final time is less than or equal to the upper bound on the initial time. This situation is okay in general; it's just that this function doesn't support it. |
|
staticprotected |
This is a service for derived classes, because MocoSolution::setStatus(), MocoSolution::setSuccess(), etc.
are private but this class is a friend of MocoSolution.