|
| OCPSolver (int numStates, int numInputs, std::chrono::duration< double > dt, int numSteps, function_ref< VariableMatrix(const VariableMatrix &x, const VariableMatrix &u)> dynamics, DynamicsType dynamicsType=DynamicsType::kExplicitODE, TimestepMethod timestepMethod=TimestepMethod::kFixed, TranscriptionMethod method=TranscriptionMethod::kDirectTranscription) |
| Build an optimization problem using a system evolution function (explicit ODE or discrete state transition function).
|
|
| OCPSolver (int numStates, int numInputs, std::chrono::duration< double > dt, int numSteps, function_ref< VariableMatrix(const Variable &t, const VariableMatrix &x, const VariableMatrix &u, const Variable &dt)> dynamics, DynamicsType dynamicsType=DynamicsType::kExplicitODE, TimestepMethod timestepMethod=TimestepMethod::kFixed, TranscriptionMethod method=TranscriptionMethod::kDirectTranscription) |
| Build an optimization problem using a system evolution function (explicit ODE or discrete state transition function).
|
|
template<typename T >
requires ScalarLike<T> || MatrixLike<T> |
void | ConstrainInitialState (const T &initialState) |
| Utility function to constrain the initial state.
|
|
template<typename T >
requires ScalarLike<T> || MatrixLike<T> |
void | ConstrainFinalState (const T &finalState) |
| Utility function to constrain the final state.
|
|
void | ForEachStep (const function_ref< void(const VariableMatrix &x, const VariableMatrix &u)> callback) |
| Set the constraint evaluation function.
|
|
void | ForEachStep (const function_ref< void(const Variable &t, const VariableMatrix &x, const VariableMatrix &u, const Variable &dt)> callback) |
| Set the constraint evaluation function.
|
|
template<typename T >
requires ScalarLike<T> || MatrixLike<T> |
void | SetLowerInputBound (const T &lowerBound) |
| Convenience function to set a lower bound on the input.
|
|
template<typename T >
requires ScalarLike<T> || MatrixLike<T> |
void | SetUpperInputBound (const T &upperBound) |
| Convenience function to set an upper bound on the input.
|
|
void | SetMinTimestep (std::chrono::duration< double > minTimestep) |
| Convenience function to set a lower bound on the timestep.
|
|
void | SetMaxTimestep (std::chrono::duration< double > maxTimestep) |
| Convenience function to set an upper bound on the timestep.
|
|
VariableMatrix & | X () |
| Get the state variables.
|
|
VariableMatrix & | U () |
| Get the input variables.
|
|
VariableMatrix & | DT () |
| Get the timestep variables.
|
|
VariableMatrix | InitialState () |
| Convenience function to get the initial state in the trajectory.
|
|
VariableMatrix | FinalState () |
| Convenience function to get the final state in the trajectory.
|
|
| OptimizationProblem () noexcept=default |
| Construct the optimization problem.
|
|
Variable | DecisionVariable () |
| Create a decision variable in the optimization problem.
|
|
VariableMatrix | DecisionVariable (int rows, int cols=1) |
| Create a matrix of decision variables in the optimization problem.
|
|
VariableMatrix | SymmetricDecisionVariable (int rows) |
| Create a symmetric matrix of decision variables in the optimization problem.
|
|
void | Minimize (const Variable &cost) |
| Tells the solver to minimize the output of the given cost function.
|
|
void | Minimize (Variable &&cost) |
| Tells the solver to minimize the output of the given cost function.
|
|
void | Maximize (const Variable &objective) |
| Tells the solver to maximize the output of the given objective function.
|
|
void | Maximize (Variable &&objective) |
| Tells the solver to maximize the output of the given objective function.
|
|
void | SubjectTo (const EqualityConstraints &constraint) |
| Tells the solver to solve the problem while satisfying the given equality constraint.
|
|
void | SubjectTo (EqualityConstraints &&constraint) |
| Tells the solver to solve the problem while satisfying the given equality constraint.
|
|
void | SubjectTo (const InequalityConstraints &constraint) |
| Tells the solver to solve the problem while satisfying the given inequality constraint.
|
|
void | SubjectTo (InequalityConstraints &&constraint) |
| Tells the solver to solve the problem while satisfying the given inequality constraint.
|
|
SolverStatus | Solve (const SolverConfig &config=SolverConfig{}) |
| Solve the optimization problem.
|
|
template<typename F >
requires requires(F callback, const SolverIterationInfo& info) { { callback(info) } -> std::same_as<void>; } |
void | Callback (F &&callback) |
| Sets a callback to be called at each solver iteration.
|
|
template<typename F >
requires requires(F callback, const SolverIterationInfo& info) { { callback(info) } -> std::same_as<bool>; } |
void | Callback (F &&callback) |
| Sets a callback to be called at each solver iteration.
|
|