This is the base class for transcription schemes that convert a CasOC::Problem into a general nonlinear programming problem.
If you are creating a new derived class, make sure to override all virtual functions and obey the settings that the user specified in the CasOC::Solver.
#include <Moco/Moco/MocoCasADiSolver/CasOCTranscription.h>
|
| Transcription (const Solver &solver, const Problem &problem) |
|
Iterate | createInitialGuessFromBounds () const |
|
Iterate | createRandomIterateWithinBounds (const SimTK::Random *=nullptr) const |
| Use the provided random number generator to generate an iterate. More...
|
|
template<typename T > |
T | createTimes (const T &initialTime, const T &finalTime) const |
|
casadi::DM | createQuadratureCoefficients () const |
|
casadi::DM | createMeshIndices () const |
|
Solution | solve (const Iterate &guessOrig) |
|
|
void | createVariablesAndSetBounds (const casadi::DM &grid, int numDefectsPerMeshInterval, const casadi::DM &pointsForInterpControls=casadi::DM()) |
| This must be called in the constructor of derived classes so that overridden virtual methods are accessible to the base class. More...
|
|
casadi::MXVector | evalOnTrajectory (const casadi::Function &pointFunction, const std::vector< Var > &inputs, const casadi::Matrix< casadi_int > &timeIndices) const |
| We assume all functions depend on time and parameters. More...
|
|
template<typename TRow , typename TColumn > |
void | setVariableBounds (Var var, const TRow &rowIndices, const TColumn &columnIndices, const Bounds &bounds) |
|
void | printConstraintValues (const Iterate &it, const Constraints< casadi::DM > &constraints, std::ostream &stream=std::cout) const |
|
void | printObjectiveBreakdown (const Iterate &it, const casadi::DM &objectiveTerms, std::ostream &stream=std::cout) const |
|
|
const Solver & | m_solver |
|
const Problem & | m_problem |
|
int | m_numGridPoints = -1 |
|
int | m_numMeshPoints = -1 |
|
int | m_numMeshIntervals = -1 |
|
int | m_numMeshInteriorPoints = -1 |
|
int | m_numDefectsPerMeshInterval = -1 |
|
int | m_numMultibodyResiduals = -1 |
|
int | m_numAuxiliaryResiduals = -1 |
|
int | m_numConstraints = -1 |
|
casadi::DM | m_grid |
|
casadi::DM | m_pointsForInterpControls |
|
casadi::MX | m_times |
|
casadi::MX | m_duration |
|
◆ createRandomIterateWithinBounds()
Iterate CasOC::Transcription::createRandomIterateWithinBounds |
( |
const SimTK::Random * |
= nullptr | ) |
const |
Use the provided random number generator to generate an iterate.
Random::Uniform is used if a generator is not provided. The generator should produce numbers with [-1, 1].
◆ createVariablesAndSetBounds()
void CasOC::Transcription::createVariablesAndSetBounds |
( |
const casadi::DM & |
grid, |
|
|
int |
numDefectsPerMeshInterval, |
|
|
const casadi::DM & |
pointsForInterpControls = casadi::DM() |
|
) |
| |
|
protected |
This must be called in the constructor of derived classes so that overridden virtual methods are accessible to the base class.
This implementation allows initialization to occur during construction, avoiding an extra call on the instantiated object. pointsForInterpControls are grid points at which the transcription scheme applies constraints between control points.
◆ evalOnTrajectory()
casadi::MXVector CasOC::Transcription::evalOnTrajectory |
( |
const casadi::Function & |
pointFunction, |
|
|
const std::vector< Var > & |
inputs, |
|
|
const casadi::Matrix< casadi_int > & |
timeIndices |
|
) |
| const |
|
protected |
We assume all functions depend on time and parameters.
"inputs" is prepended by time and postpended (?) by parameters.
The documentation for this class was generated from the following file: