- 3.0.2 optimal control module.
|
Namespaces | |
tpl | |
Classes | |
class | ConstraintTerm1D |
A simple example with an 1d constraint. More... | |
class | ConstraintTerm2D |
A simple example with a 2d constraint. More... | |
class | DiehlSystem |
Dynamics class for the Diehl system. More... | |
class | DiehlSystemLinear |
Linear system class for the Diehl system. More... | |
class | Dynamics |
Dynamics class for the GNMS unit test, slightly nonlinear dynamics. More... | |
class | LinearizedSystem |
Linear system class for the GNMS unit test. More... | |
class | MatFilesGenerator |
class | MIMOIntegrator |
Dynamics class for the GNMS unit test. More... | |
class | MIMOIntegratorLinear |
Linear system class for the GNMS unit test. More... | |
class | OscDms |
class | OscillatorDms |
class | PureStateConstraint_Example |
A pure state constraint term. More... | |
class | SpringLoadedMass |
Dynamics class for the GNMS unit test. More... | |
class | SpringLoadedMassLinear |
Linear system class for the GNMS unit test. More... | |
class | StateInputConstraint_Example |
A state input constraint term. More... | |
class | TestTerm |
Typedefs | |
typedef tpl::LinearOscillator< double > | LinearOscillator |
typedef tpl::LinearOscillatorLinear< double > | LinearOscillatorLinear |
Functions | |
TEST (ConstraintComparison, comparisonAnalyticAD) | |
TEST (pureStateConstraintTest, pureStateConstraintTest) | |
TEST (stateInputConstraintTest, stateInputConstraintTest) | |
TEST (AD_TEST_TIME_VAR, AD_TEST_TIME_VAR) | |
template<size_t state_dim, size_t control_dim> | |
void | compareCostFunctionOutput (CostFunctionQuadratic< state_dim, control_dim > &costFunction, CostFunctionQuadratic< state_dim, control_dim > &costFunction2) |
This method is called from different unit tests in order to compare the cost, first and second order gradients of two cost functions. More... | |
template<size_t state_dim, size_t control_dim> | |
void | printCostFunctionOutput (CostFunctionQuadratic< state_dim, control_dim > &costFunction, CostFunctionQuadratic< state_dim, control_dim > &costFunction2) |
TEST (CostFunctionTest, ADQuadraticTest) | |
TEST (CostFunctionTest, ADQuadMultTest) | |
TEST (CostFunctionTest, TrackingTermTest) | |
TEST (CostFunctionTest, TermSmoothAbsTest) | |
TEST (LoadCostFromFileTest, LoadAnalyticalDirect) | |
Test case: trying to load analytical cost function directly from file. More... | |
TEST (LoadCostFromFileTest, LoadAnalyticalViaTerms) | |
Test case: trying to load analytical cost terms separately and then add them cost function. More... | |
TEST (LoadCostFromFileTest, LoadADViaTerms) | |
Test case: trying to load AD cost terms separately and then add them to the cost function. More... | |
TEST (LoadCostFromFileTest, LoadADDirect1) | |
Test case: trying to load AD cost directly, but calling standard constructor first. More... | |
TEST (LoadCostFromFileTest, LoadADDirect2) | |
Test case: trying to load AD cost directly. More... | |
TEST (DmsTest, OscDmsTest) | |
TEST (DmsTest, OscillatorDmsTestAllVariants) | |
TEST (LQRTest, DARETest) | |
TEST (LQRTest, quadTest) | |
TEST (MPCTestA, ForwardIntegratorTest) | |
TEST (MPCTestB, NLOC_MPC_DoublePrecision) | |
TEST (LinearSystemsSolverComparison, LinearSystemsSolverComparison) | |
TEST (LinearSystemsTest, NLOCSolverTest) | |
TEST (ILQRTestA, InstancesComparison) | |
TEST (ILQRTestB, MultiThreadingTest) | |
TEST (ILQRTestC, PolicyComparison) | |
TEST (NLOCTest, NonlinearSystemAlgorithmComparison) | |
std::shared_ptr< CostFunctionQuadratic< state_dim, control_dim > > | createCostFunction (Eigen::Vector2d &x_final) |
Create a cost function for the GNMS unit test. More... | |
void | symplecticTest () |
TEST (SystemInterfaceTest, ContinuousSystemInterface) | |
TEST (SystemInterfaceTest, DiscreteSystemInterface) | |
std::shared_ptr< CostFunctionQuadratic< 1, 1 > > | createDiehlCostFunction (const core::StateVector< 1 > &x_final) |
create a cost function of appropriate Dimensions for the Diehl system More... | |
template<size_t state_dim, size_t control_dim> | |
std::shared_ptr< CostFunctionQuadratic< state_dim, control_dim > > | createMIMOIntegratorCostFunction (const core::StateVector< state_dim > &x_final) |
std::shared_ptr< CostFunctionQuadratic< 2, 1 > > | createSpringLoadedMassCostFunction (const core::StateVector< 2 > &x_final) |
Variables | |
const bool | verbose = true |
const size_t | state_dim = 3 |
const size_t | control_dim = 3 |
const double | kStiffness = 1 |
typedef tpl::LinearOscillator<double> ct::optcon::example::LinearOscillator |
ct::optcon::example::TEST | ( | ConstraintComparison | , |
comparisonAnalyticAD | |||
) |
Referenced by TEST().
ct::optcon::example::TEST | ( | pureStateConstraintTest | , |
pureStateConstraintTest | |||
) |
References i.
ct::optcon::example::TEST | ( | stateInputConstraintTest | , |
stateInputConstraintTest | |||
) |
void ct::optcon::example::compareCostFunctionOutput | ( | CostFunctionQuadratic< state_dim, control_dim > & | costFunction, |
CostFunctionQuadratic< state_dim, control_dim > & | costFunction2 | ||
) |
This method is called from different unit tests in order to compare the cost, first and second order gradients of two cost functions.
costFunction | the first cost function to be compared |
costFunction2 | the second cost function to be compared |
References ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::controlDerivativeIntermediate(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::controlDerivativeTerminal(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::controlSecondDerivativeIntermediate(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::controlSecondDerivativeTerminal(), ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::evaluateIntermediate(), ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::evaluateTerminal(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::stateControlDerivativeIntermediate(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::stateControlDerivativeTerminal(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::stateDerivativeIntermediate(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::stateDerivativeTerminal(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::stateSecondDerivativeIntermediate(), and ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::stateSecondDerivativeTerminal().
Referenced by TEST().
void ct::optcon::example::printCostFunctionOutput | ( | CostFunctionQuadratic< state_dim, control_dim > & | costFunction, |
CostFunctionQuadratic< state_dim, control_dim > & | costFunction2 | ||
) |
References ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::controlDerivativeIntermediate(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::controlDerivativeTerminal(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::controlSecondDerivativeIntermediate(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::controlSecondDerivativeTerminal(), ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::evaluateIntermediate(), ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::evaluateTerminal(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::stateControlDerivativeIntermediate(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::stateControlDerivativeTerminal(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::stateDerivativeIntermediate(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::stateDerivativeTerminal(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::stateSecondDerivativeIntermediate(), and ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::stateSecondDerivativeTerminal().
ct::optcon::example::TEST | ( | CostFunctionTest | , |
ADQuadraticTest | |||
) |
References ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::addFinalTerm(), ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::addIntermediateTerm(), compareCostFunctionOutput(), ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >::controlDerivativeIntermediate(), ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >::controlSecondDerivativeIntermediate(), i, ct::optcon::CostFunction< STATE_DIM, CONTROL_DIM, SCALAR >::setCurrentStateAndControl(), ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >::stateDerivativeIntermediate(), ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >::stateDerivativeTerminal(), ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >::stateSecondDerivativeIntermediate(), ct::optcon::CostFunctionAnalytical< STATE_DIM, CONTROL_DIM, SCALAR >::stateSecondDerivativeTerminal(), u, and x.
ct::optcon::example::TEST | ( | CostFunctionTest | , |
ADQuadMultTest | |||
) |
ct::optcon::example::TEST | ( | CostFunctionTest | , |
TrackingTermTest | |||
) |
References control_dim, i, ct::core::DiscreteTrajectoryBase< T, Alloc, SCALAR >::push_back(), state_dim, t, u, and x.
ct::optcon::example::TEST | ( | CostFunctionTest | , |
TermSmoothAbsTest | |||
) |
Test the TermSmoothAbs term for first and second order derivatives
References compareCostFunctionOutput(), control_dim, i, state_dim, t, u, and x.
ct::optcon::example::TEST | ( | LoadCostFromFileTest | , |
LoadAnalyticalDirect | |||
) |
Test case: trying to load analytical cost function directly from file.
References costFunctionFile, t, and verbose.
ct::optcon::example::TEST | ( | LoadCostFromFileTest | , |
LoadAnalyticalViaTerms | |||
) |
Test case: trying to load analytical cost terms separately and then add them cost function.
References costFunctionFile, t, and verbose.
ct::optcon::example::TEST | ( | LoadCostFromFileTest | , |
LoadADViaTerms | |||
) |
Test case: trying to load AD cost terms separately and then add them to the cost function.
References costFunctionFile, t, and verbose.
ct::optcon::example::TEST | ( | LoadCostFromFileTest | , |
LoadADDirect1 | |||
) |
Test case: trying to load AD cost directly, but calling standard constructor first.
References costFunctionFile, t, and verbose.
ct::optcon::example::TEST | ( | LoadCostFromFileTest | , |
LoadADDirect2 | |||
) |
Test case: trying to load AD cost directly.
References costFunctionFile, t, and verbose.
ct::optcon::example::TEST | ( | DmsTest | , |
OscDmsTest | |||
) |
References ct::optcon::example::OscDms::compareIpoptSolutions(), ct::optcon::example::OscDms::compareSnoptSolutions(), ct::optcon::example::OscDms::getIpoptMatlabTrajectories(), ct::optcon::example::OscDms::getIpoptSolution(), ct::optcon::example::OscDms::getSnoptMatlabTrajectories(), ct::optcon::example::OscDms::getSnoptSolution(), and ct::optcon::example::OscDms::initialize().
ct::optcon::example::TEST | ( | DmsTest | , |
OscillatorDmsTestAllVariants | |||
) |
References ct::optcon::DmsSettings::absErrTol_, ct::optcon::DmsSettings::costEvaluationType_, ct::optcon::DmsSettings::dt_sim_, ct::optcon::example::OscillatorDms::getSolution(), ct::optcon::DmsSettings::h_min_, ct::optcon::example::OscillatorDms::initialize(), ct::optcon::DmsSettings::integrationType_, ct::optcon::IPOPT, ct::optcon::DmsSettings::N_, ct::optcon::DmsSettings::nThreads_, ct::optcon::DmsSettings::objectiveType_, ct::optcon::DmsSettings::relErrTol_, ct::optcon::DmsSettings::RK4, ct::optcon::SNOPT, ct::optcon::DmsSettings::solverSettings_, ct::optcon::NlpSolverSettings::solverType_, ct::optcon::DmsSettings::splineType_, and ct::optcon::DmsSettings::T_.
ct::optcon::example::TEST | ( | LQRTest | , |
DARETest | |||
) |
ct::optcon::example::TEST | ( | LQRTest | , |
quadTest | |||
) |
References ct::optcon::LQR< STATE_DIM, CONTROL_DIM >::compute(), i, and TEST().
ct::optcon::example::TEST | ( | MPCTestA | , |
ForwardIntegratorTest | |||
) |
Test the MPC forward integrator
required for this test
Run the first MPC cycle, in which the pre-integrator should not be active at all. after one mpc cycle the solution must still be the same (time horizon unchanged, state unchanged)
Test the forward integration scheme employing a 'custom controller'. In this test,
References ct::optcon::NLOptConSettings::computeK(), ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::configure(), ct::optcon::NLOptConSettings::discretization, ct::optcon::MPC< OPTCON_SOLVER >::doForwardIntegration(), ct::optcon::NLOptConSettings::dt, ct::optcon::MPC< OPTCON_SOLVER >::finishIteration(), ct::core::StateFeedbackController< STATE_DIM, CONTROL_DIM, SCALAR >::getFeedforwardTrajectory(), ct::core::StateFeedbackController< STATE_DIM, CONTROL_DIM, SCALAR >::getReferenceStateTrajectory(), ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::getSolution(), ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::getStateTrajectory(), i, ct::optcon::NLOptConSettings::integrator, ct::optcon::NLOptConSettings::K_sim, ct::optcon::NLOptConSettings::lqocp_solver, ct::optcon::NLOptConSettings::max_iterations, ct::optcon::NLOptConSettings::nlocp_algorithm, ct::optcon::mpc_settings::postTruncation_, ct::optcon::MPC< OPTCON_SOLVER >::prepareIteration(), ct::optcon::NLOptConSettings::printSummary, ct::optcon::MPC< OPTCON_SOLVER >::setInitialGuess(), ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::setInitialGuess(), ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::solve(), ct::optcon::mpc_settings::stateForwardIntegration_, ct::optcon::mpc_settings::stateForwardIntegration_dt_, ct::optcon::mpc_settings::stateForwardIntegratorType_, t, timeHorizon, ct::core::StateFeedbackController< STATE_DIM, CONTROL_DIM, SCALAR >::uff(), and x0.
ct::optcon::example::TEST | ( | MPCTestB | , |
NLOC_MPC_DoublePrecision | |||
) |
References ct::optcon::mpc_settings::additionalDelayUs_, ct::optcon::mpc_settings::coldStart_, ct::optcon::NLOptConSettings::computeK(), ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::configure(), ct::optcon::NLOptConSettings::debugPrint, ct::optcon::mpc_settings::delayMeasurementMultiplier_, ct::optcon::NLOptConSettings::discretization, ct::optcon::NLOptConSettings::dt, ct::core::DiscreteTrajectoryBase< T, Alloc, SCALAR >::eval(), ct::optcon::MPC< OPTCON_SOLVER >::finishIteration(), ct::optcon::FIXED_FINAL_TIME, ct::optcon::mpc_settings::fixedDelayUs_, ct::core::DiscreteTrajectoryBase< T, Alloc, SCALAR >::front(), ct::core::StateFeedbackController< STATE_DIM, CONTROL_DIM, SCALAR >::getReferenceStateTrajectory(), ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::getSolution(), i, ct::optcon::NLOptConSettings::integrator, ct::optcon::NLOptConSettings::K_shot, ct::optcon::NLOptConSettings::K_sim, ct::optcon::NLOptConSettings::lineSearchSettings, ct::optcon::NLOptConSettings::lqocp_solver, ct::optcon::NLOptConSettings::max_iterations, ct::optcon::mpc_settings::measureDelay_, ct::optcon::NLOptConSettings::min_cost_improvement, ct::optcon::mpc_settings::mpc_mode, ct::optcon::NLOptConSettings::nlocp_algorithm, ct::optcon::NLOptConSettings::nThreads, ct::optcon::NLOptConSettings::nThreadsEigen, ct::optcon::mpc_settings::postTruncation_, ct::optcon::MPC< OPTCON_SOLVER >::prepareIteration(), ct::optcon::MPC< OPTCON_SOLVER >::printMpcSummary(), ct::optcon::NLOptConSettings::printSummary, ct::optcon::MPC< OPTCON_SOLVER >::setInitialGuess(), ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::setInitialGuess(), ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::solve(), ct::optcon::mpc_settings::stateForwardIntegration_, ct::optcon::mpc_settings::stateForwardIntegration_dt_, ct::optcon::mpc_settings::stateForwardIntegratorType_, t, timeHorizon, ct::optcon::MPC< OPTCON_SOLVER >::timeHorizonReached(), ct::optcon::LineSearchSettings::type, ct::optcon::mpc_settings::useExternalTiming_, and x0.
ct::optcon::example::TEST | ( | LinearSystemsSolverComparison | , |
LinearSystemsSolverComparison | |||
) |
This unit test considers a variety of different solver/algorithm options for NLOC, and explicitly compares HPIPM and GNRiccati solvers against each other.
run two iterations to solve LQ problem
run two iterations to solve LQ problem
retrieve summaries
check that all logs from both solvers are identical
References ct::optcon::NLOptConSettings::computeK(), ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::configure(), control_dim, SummaryAllIterations< SCALAR >::defect_l1_norms, SummaryAllIterations< SCALAR >::defect_l2_norms, ct::optcon::NLOptConSettings::discretization, ct::optcon::NLOptConSettings::dt, ct::optcon::NLOptConSettings::epsilon, ct::optcon::NLOptConSettings::fixedHessianCorrection, ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::getBackend(), ct::optcon::NLOptConSettings::integrator, ct::optcon::NLOptConSettings::K_shot, ct::optcon::NLOptConSettings::K_sim, kStiffness, ct::optcon::NLOptConSettings::lineSearchSettings, ct::optcon::NLOptConSettings::lqocp_solver, SummaryAllIterations< SCALAR >::lu_norms, SummaryAllIterations< SCALAR >::lx_norms, SummaryAllIterations< SCALAR >::merits, ct::optcon::NLOptConSettings::nlocp_algorithm, ct::optcon::NLOptConSettings::nThreads, ct::optcon::NLOptConSettings::printSummary, ct::optcon::NLOptConSettings::recordSmallestEigenvalue, ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::runIteration(), ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::setInitialGuess(), state_dim, ct::optcon::LineSearchSettings::type, ct::optcon::NLOptConSettings::useSensitivityIntegrator, and x0.
ct::optcon::example::TEST | ( | LinearSystemsTest | , |
NLOCSolverTest | |||
) |
run two iterations to solve LQ problem
retrieve summary of the optimization
check that the policy improved in the first iteration
check that we are converged after the first iteration
References ct::optcon::NLOptConSettings::computeK(), ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::configure(), control_dim, SummaryAllIterations< SCALAR >::defect_l1_norms, SummaryAllIterations< SCALAR >::defect_l2_norms, ct::optcon::NLOptConSettings::discretization, ct::optcon::NLOptConSettings::dt, ct::optcon::NLOptConSettings::epsilon, ct::optcon::NLOptConSettings::fixedHessianCorrection, ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::getBackend(), ct::optcon::NLOptConSettings::integrator, ct::optcon::NLOptConSettings::K_shot, ct::optcon::NLOptConSettings::K_sim, kStiffness, ct::optcon::NLOptConSettings::lineSearchSettings, ct::optcon::NLOptConSettings::lqocp_solver, SummaryAllIterations< SCALAR >::lu_norms, SummaryAllIterations< SCALAR >::lx_norms, ct::optcon::NLOptConSettings::nlocp_algorithm, ct::optcon::NLOptConSettings::nThreads, ct::optcon::NLOptConSettings::printSummary, ct::optcon::NLOptConSettings::recordSmallestEigenvalue, ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::runIteration(), ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::setInitialGuess(), state_dim, ct::optcon::LineSearchSettings::type, ct::optcon::NLOptConSettings::useSensitivityIntegrator, and x0.
ct::optcon::example::TEST | ( | ILQRTestA | , |
InstancesComparison | |||
) |
check that if retrieving solution now, we exactly get back the init guess.
References ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::configure(), costFunctionFile, ct::optcon::LineSearchSettings::debugPrint, ct::optcon::NLOptConSettings::debugPrint, ct::optcon::NLOptConSettings::discretization, ct::optcon::NLOptConSettings::dt, ct::optcon::NLOptConSettings::epsilon, ct::optcon::NLOptConSettings::fixedHessianCorrection, ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::getSolution(), i, ct::optcon::NLOptConSettings::integrator, ct::optcon::NLOptConSettings::K_shot, ct::optcon::NLOptConSettings::K_sim, ct::optcon::NLOptConSettings::lineSearchSettings, ct::optcon::NLOptConSettings::lqocp_solver, ct::optcon::NLOptConSettings::max_iterations, ct::optcon::NLOptConSettings::min_cost_improvement, ct::optcon::NLOptConSettings::nlocp_algorithm, ct::optcon::NLOptConSettings::nThreads, ct::optcon::NLOptConSettings::printSummary, ct::optcon::NLOptConSettings::recordSmallestEigenvalue, ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::setInitialGuess(), ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::solve(), ct::optcon::LineSearchSettings::type, and x0.
ct::optcon::example::TEST | ( | ILQRTestB | , |
MultiThreadingTest | |||
) |
References ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::configure(), costFunctionFile, ct::optcon::NLOptConSettings::discretization, ct::optcon::NLOptConSettings::dt, ct::optcon::NLOptConSettings::epsilon, ct::optcon::NLOptConSettings::fixedHessianCorrection, ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::getBackend(), ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::getControlTrajectory(), ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::getStateTrajectory(), i, ct::optcon::NLOptConSettings::integrator, ct::optcon::NLOptConSettings::lineSearchSettings, ct::optcon::NLOptConSettings::lqocp_solver, ct::optcon::NLOptConSettings::max_iterations, ct::optcon::NLOptConSettings::min_cost_improvement, ct::optcon::NLOptConSettings::nlocp_algorithm, ct::optcon::NLOptConSettings::nThreads, ct::optcon::NLOptConSettings::printSummary, ct::optcon::NLOptConSettings::recordSmallestEigenvalue, ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::runIteration(), ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::setInitialGuess(), ct::core::DiscreteTrajectoryBase< T, Alloc, SCALAR >::size(), ct::optcon::LineSearchSettings::type, and x0.
ct::optcon::example::TEST | ( | ILQRTestC | , |
PolicyComparison | |||
) |
References ct::core::DiscreteTrajectoryBase< T, Alloc, SCALAR >::back(), ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::configure(), costFunctionFile, ct::optcon::NLOptConSettings::discretization, ct::optcon::NLOptConSettings::dt, ct::optcon::NLOptConSettings::epsilon, ct::optcon::NLOptConSettings::fixedHessianCorrection, ct::optcon::NLOptConSettings::getSimulationTimestep(), ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::getSolution(), ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::getStateTrajectory(), i, ct::core::Integrator< STATE_DIM, SCALAR >::integrate_n_steps(), ct::optcon::NLOptConSettings::integrator, ct::optcon::NLOptConSettings::lineSearchSettings, ct::optcon::NLOptConSettings::lqocp_solver, ct::optcon::NLOptConSettings::max_iterations, ct::optcon::NLOptConSettings::min_cost_improvement, ct::optcon::NLOptConSettings::nlocp_algorithm, ct::optcon::NLOptConSettings::nThreads, ct::optcon::NLOptConSettings::printSummary, ct::optcon::NLOptConSettings::recordSmallestEigenvalue, ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::runIteration(), ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::setInitialGuess(), ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::solve(), ct::optcon::LineSearchSettings::type, and x0.
ct::optcon::example::TEST | ( | NLOCTest | , |
NonlinearSystemAlgorithmComparison | |||
) |
References ct::optcon::NLOptConSettings::computeK(), ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::configure(), costFunctionFile, ct::optcon::NLOptConSettings::dt, ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::getControlTrajectory(), ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::getStateTrajectory(), i, ct::optcon::NLOptConSettings::load(), ct::core::loadMatrix(), ct::core::loadScalar(), ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::setInitialGuess(), ct::core::DiscreteTrajectoryBase< T, Alloc, SCALAR >::size(), ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::solve(), and x0.
std::shared_ptr<CostFunctionQuadratic<state_dim, control_dim> > ct::optcon::example::createCostFunction | ( | Eigen::Vector2d & | x_final | ) |
Create a cost function for the GNMS unit test.
Referenced by symplecticTest().
void ct::optcon::example::symplecticTest | ( | ) |
References ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::configure(), control_dim, createCostFunction(), ct::optcon::NLOptConSettings::dt, ct::optcon::NLOptConSettings::epsilon, ct::optcon::NLOptConSettings::fixedHessianCorrection, ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::getControlTrajectory(), ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::getStateTrajectory(), i, ct::optcon::NLOptConSettings::integrator, ct::optcon::NLOptConSettings::K_shot, ct::optcon::NLOptConSettings::K_sim, ct::optcon::NLOptConSettings::lineSearchSettings, ct::optcon::NLOptConSettings::loggingPrefix, ct::optcon::NLOptConSettings::lqocp_solver, ct::optcon::NLOptConSettings::max_iterations, ct::optcon::NLOptConSettings::min_cost_improvement, ct::optcon::NLOptConSettings::nlocp_algorithm, ct::optcon::NLOptConSettings::nThreads, ct::optcon::NLOptConSettings::printSummary, ct::optcon::NLOptConSettings::recordSmallestEigenvalue, ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::runIteration(), ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, P_DIM, V_DIM, SCALAR, CONTINUOUS >::setInitialGuess(), state_dim, ct::optcon::LineSearchSettings::type, ct::optcon::NLOptConSettings::useSensitivityIntegrator, and x0.
Referenced by main().
ct::optcon::example::TEST | ( | SystemInterfaceTest | , |
ContinuousSystemInterface | |||
) |
References control_dim, ct::optcon::NLOptConSettings::discretization, ct::optcon::NLOptConSettings::dt, ct::optcon::NLOptConSettings::getSimulationTimestep(), i, ct::optcon::NLOptConSettings::integrator, ct::optcon::NLOptConSettings::K_sim, state_dim, ct::optcon::NLOptConSettings::timeVaryingDiscretization, and ct::optcon::NLOptConSettings::useSensitivityIntegrator.
ct::optcon::example::TEST | ( | SystemInterfaceTest | , |
DiscreteSystemInterface | |||
) |
std::shared_ptr<CostFunctionQuadratic<1, 1> > ct::optcon::example::createDiehlCostFunction | ( | const core::StateVector< 1 > & | x_final | ) |
create a cost function of appropriate Dimensions for the Diehl system
std::shared_ptr<CostFunctionQuadratic<state_dim, control_dim> > ct::optcon::example::createMIMOIntegratorCostFunction | ( | const core::StateVector< state_dim > & | x_final | ) |
std::shared_ptr<CostFunctionQuadratic<2, 1> > ct::optcon::example::createSpringLoadedMassCostFunction | ( | const core::StateVector< 2 > & | x_final | ) |
Referenced by TEST().
const bool ct::optcon::example::verbose = true |
Referenced by ct::optcon::addADTerm(), ct::optcon::addTerm(), ct::optcon::OptConSolver< DmsSolver< STATE_DIM, CONTROL_DIM, SCALAR >, DmsPolicy< STATE_DIM, CONTROL_DIM, SCALAR >, DmsSettings, STATE_DIM, CONTROL_DIM, SCALAR >::configureFromFile(), ct::optcon::LineSearchSettings::load(), ct::optcon::DmsSettings::load(), ct::optcon::LQOCSolverSettings::load(), ct::optcon::NlpSolverSettings::load(), ct::optcon::NLOptConSettings::load(), main(), TEST(), TEST(), and ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >::~CostFunctionQuadratic().
const size_t ct::optcon::example::state_dim = 3 |
const size_t ct::optcon::example::control_dim = 3 |
const double ct::optcon::example::kStiffness = 1 |