rtd.planner.trajopt.ScipyOptimizationEngine

class rtd.planner.trajopt.ScipyOptimizationEngine(trajOptProps: TrajOptProps, **options)[source]

Bases: OptimizationEngine

Optimization Engine based on scipy.optimize.fsolve

__init__(trajOptProps: TrajOptProps, **options)[source]

Methods

__init__(trajOptProps, **options)

performOptimization(initialGuess, ...)

Use scipy solve to perform the optimization

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

Use scipy solve to perform the optimization

Parameters:
  • initialGuess – An initial guess Vecnp used for the optimization. May not be the correct size

  • objectiveCallback – A callback for the objective function of this specific optimization

  • constraintCallback – A callback for the nonlinear constraints, where the return time is expected to be [c, ceq, gc, gceq].

  • 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