Class SolverIpopt

Inheritance Relationships

Base Type

Class Documentation

class SolverIpopt : public crocoddyl::SolverAbstractTpl<Ipopt::Number>

Ipopt solver.

This solver solves the optimal control problem by transcribing with the multiple shooting approach.

See also

solve()

Public Types

typedef SolverAbstractTpl<Scalar> SolverAbstract
typedef ShootingProblemTpl<Scalar> ShootingProblem
typedef IpoptInterfaceTpl<Scalar> IpoptInterface
typedef MathBaseTpl<Scalar> MathBase
typedef MathBase::VectorXs VectorXs
typedef MathBase::Vector3s Vector3s

Public Functions

inline SolverIpopt(std::shared_ptr<ShootingProblem> problem)

Initialize the Ipopt solver.

Parameters:

problem[in] solver to be diagnostic

~SolverIpopt() = default
inline bool solve(const std::vector<VectorXs> &init_xs = DefaultVector<Scalar>::value, const std::vector<VectorXs> &init_us = DefaultVector<Scalar>::value, const std::size_t maxiter = 100, const bool is_feasible = false, const Scalar reg_init = Scalar(1e-9)) override
inline virtual void resizeData() override

Resizing the solver data.

If the shooting problem has changed after construction, then this function resizes all the data before starting resolve the problem.

inline void setStringIpoptOption(const std::string &tag, const std::string &value)

Set a string ipopt option.

Parameters:
  • tag[in] name of the parameter

  • value[in] string value for the parameter

inline void setNumericIpoptOption(const std::string &tag, Ipopt::Number value)

Set a string ipopt option.

Parameters:
  • tag[in] name of the parameter

  • value[in] numeric value for the parameter

inline void set_th_stop(const Scalar th_stop)
virtual void resizeData()

Resizing the solver data.

If the shooting problem has changed after construction, then this function resizes all the data before starting resolve the problem.

virtual void setCandidate(const std::vector<VectorXs> &xs_warm = DefaultVector<Scalar>::value, const std::vector<VectorXs> &us_warm = DefaultVector<Scalar>::value, const bool is_feasible = false)

Set the solver candidate trajectories \((\mathbf{x}_s,\mathbf{u}_s)\).

The solver candidates are defined as a state and control trajectories \((\mathbf{x}_s,\mathbf{u}_s)\) of \(T+1\) and \(T\) elements, respectively. Additionally, we need to define the dynamic feasibility of the \((\mathbf{x}_s,\mathbf{u}_s)\) pair. Note that the trajectories are feasible if \(\mathbf{x}_s\) is the resulting trajectory from the system rollout with \(\mathbf{u}_s\) inputs. Updating the candidate invalidates any previously computed linearization; the next call to computeDirection() will therefore refresh the derivatives on demand.

Parameters:
  • xs[in] state trajectory of \(T+1\) elements (default [])

  • us[in] control trajectory of \(T\) elements (default [])

  • isFeasible[in] true if the xs are obtained from integrating the us (rollout)

Public Members

EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef Ipopt::Number Scalar