rtd.planner.trajopt.OptimizationEngine

class rtd.planner.trajopt.OptimizationEngine[source]

Bases: object

Base class for any sort of nonlinear optimizer used

__init__()

Methods

__init__()

performOptimization(initialGuess, ...)

Use the given optimizer to perform the optimization Vecnp :param initialGuess: An initial guess Vecnp used for the optimization.

abstract performOptimization(initialGuess: NDArray[Shape[N], float64], objectiveCallback: Callable, constraintCallback: Callable, bounds: dict) tuple[bool, nptyping.ndarray.NDArray, float][source]

Use the given optimizer to perform the optimization Vecnp :param initialGuess: An initial guess Vecnp used for the optimization. May not be the correct size and should be accounted for if not. :param objectiveCallback: A callback for the objective function of this specific optimization :param constraintCallback: A callback for the nonlinear constraints, where the return time is expected to be [c, ceq, gc, gceq]. :param bounds: A dict containing input and output bounds

Returns:

bool, parameters: Vecnp, cost: float): success is if the optimization was successful or didn’t time out. parameters are the trajectory parameters to use. cost is the final cost for the parameters found

Return type:

(success