Compute the optimal trajectory as lists of and terms.
From an initial guess init_xs, init_us (feasible or not), iterate over computeDirection() and tryStep() until stoppingCriteria() is below threshold. It also describes the globalization strategy used during the numerical optimization.
Parameters
[in]
init_xs
initial guess for state trajectory with elements (default [])
[in]
init_us
initial guess for control trajectory with elements (default [])
[in]
maxiter
maximum allowed number of iterations (default 100)
[in]
is_feasible
true if the init_xs are obtained from integrating the init_us (rollout) (default false)
[in]
init_reg
initial guess for the regularization value. Very low values are typical used with very good guess points (default 1e-9).
Returns
A boolean that describes if convergence was reached.
Compute the search direction for the current guess .
You must call setCandidate() first in order to define the current guess. A current guess defines a state and control trajectory of and elements, respectively.
Parameters
[in]
recalc
true for recalculating the derivatives at current state and control
Returns
The search direction and the dual lambdas as lists of , and lengths, respectively
Try a predefined step length and compute its cost improvement .
It uses the search direction found by computeDirection() to try a determined step length . Therefore, it assumes that we have run computeDirection() first. Additionally, it returns the cost improvement along the predefined step length .
Return a positive value that quantifies the algorithm termination.
These values typically represents the gradient norm which tell us that it's been reached the local minima. The stopping criteria strictly speaking depends on the search direction (calculated by computeDirection()) but it could also depend on the chosen step length, tested by tryStep().