![]() |
OpTaS
1.0.7
An optimization-based task specification library for trajectory optimization and model predictive control.
|


Public Member Functions | |
| def | setup (self, str method="SLSQP", Union[None, float] tol=None, Union[None, Dict] options=None) |
| cs.np.ndarray | f (self, cs.np.ndarray x) |
| Internal method. More... | |
| cs.np.ndarray | jac (self, cs.np.ndarray x) |
| Internal method. More... | |
| cs.np.ndarray | hess (self, cs.np.ndarray x) |
| Internal method. More... | |
| cs.np.ndarray | v (self, cs.np.ndarray x) |
| Internal method. More... | |
| cs.np.ndarray | dv (self, cs.np.ndarray x) |
| Internal method. More... | |
| cs.np.ndarray | g (self, cs.np.ndarray x) |
| Internal method. More... | |
| cs.np.ndarray | dg (self, cs.np.ndarray x) |
| Internal method. More... | |
| cs.np.ndarray | ddg (self, cs.np.ndarray x) |
| Internal method. More... | |
| cs.np.ndarray | h (self, cs.np.ndarray x) |
| Internal method. More... | |
| cs.np.ndarray | dh (self, cs.np.ndarray x) |
| Internal method. More... | |
| cs.np.ndarray | ddh (self, cs.np.ndarray x) |
| Internal method. More... | |
| None | reset_initial_seed (self, x0) |
| Reset initial seed for the optimization problem. More... | |
| def | reset_parameters (self, Dict[str, ArrayType] p) |
| Reset the parameters. More... | |
| def | stats (self) |
| Statistics relating to the previous call to solve. More... | |
| def | did_solve (self) |
| Returns True when the problem was solved. More... | |
| def | number_of_iterations (self) |
| Number of iterations it took the solver to converge. More... | |
Public Member Functions inherited from optas.solver.Solver | |
| def | __init__ (self, Optimization optimization, bool error_on_fail=False) |
| Constructor for the base Solver class. More... | |
| type | opt_type (self) |
| Optimization type. More... | |
| def | setup (self, *args, **kwargs) |
| Setup solver, note this method must return self. More... | |
| None | reset_initial_seed (self, Dict[str, ArrayType] x0) |
| Reset initial seed for the optimization problem. More... | |
| Dict | solve (self) |
| Solve the optimization problem. More... | |
| Tuple | violated_constraints (self, Dict[str, ArrayType] x, Dict[str, ArrayType] p) |
| Indicate the violated constraints. More... | |
| CasADiArrayType | evaluate_cost (self, Dict[str, ArrayType] x, Dict[str, ArrayType] p) |
| Evaluates the cost function for given decision variables x and parameters p. More... | |
| List | evaluate_cost_terms (self, Dict[str, ArrayType] x, Dict[str, ArrayType] p) |
| Evaluates each cost term for given decision variables and parameters. More... | |
Public Attributes | |
| method | |
| Method name. More... | |
| minimize_input | |
| Input to the minimize method. More... | |
Public Attributes inherited from optas.solver.Solver | |
| opt | |
| Instance of the optimization problem. More... | |
| x0 | |
| Initial guess for the optimization problem (set using reset_initial_seed). More... | |
| p | |
| Parameter vector. More... | |
Static Public Attributes | |
| dictionary | methods_req_jac |
| Methods that require the Jacobian of the objective. More... | |
| dictionary | methods_req_hess |
| Methods that require the Hessian of the objective. More... | |
| dictionary | methods_handle_constraints = {"COBYLA", "SLSQP", "trust-constr"} |
| Methods that handle constrained optimization problems. More... | |
Private Member Functions | |
| CasADiArrayType | _solve (self) |
| Solve the optimization problem using Scipy. More... | |
Private Attributes | |
| _stats | |
| Container for the statistics. More... | |
| _constraints | |
| Constraints definition passed to the minimize method. More... | |
| _solution | |
Additional Inherited Members | |
Static Public Member Functions inherited from optas.solver.Solver | |
| interp1d | interpolate (cs.DM traj, float T, **interp_args) |
| Interpolate a trajectory. More... | |
Scipy solver (scipy.optimize.minimize) interface.
|
private |
Solve the optimization problem using Scipy.
@return The solution of the optimization problem.
Reimplemented from optas.solver.Solver.
| cs.np.ndarray optas.solver.ScipyMinimizeSolver.ddg | ( | self, | |
| cs.np.ndarray | x | ||
| ) |
Internal method.
| cs.np.ndarray optas.solver.ScipyMinimizeSolver.ddh | ( | self, | |
| cs.np.ndarray | x | ||
| ) |
Internal method.
| cs.np.ndarray optas.solver.ScipyMinimizeSolver.dg | ( | self, | |
| cs.np.ndarray | x | ||
| ) |
Internal method.
| cs.np.ndarray optas.solver.ScipyMinimizeSolver.dh | ( | self, | |
| cs.np.ndarray | x | ||
| ) |
Internal method.
| def optas.solver.ScipyMinimizeSolver.did_solve | ( | self | ) |
Returns True when the problem was solved.
@return Boolean indicating if the solver converged.
Reimplemented from optas.solver.Solver.
| cs.np.ndarray optas.solver.ScipyMinimizeSolver.dv | ( | self, | |
| cs.np.ndarray | x | ||
| ) |
Internal method.
| cs.np.ndarray optas.solver.ScipyMinimizeSolver.f | ( | self, | |
| cs.np.ndarray | x | ||
| ) |
Internal method.
| cs.np.ndarray optas.solver.ScipyMinimizeSolver.g | ( | self, | |
| cs.np.ndarray | x | ||
| ) |
Internal method.
| cs.np.ndarray optas.solver.ScipyMinimizeSolver.h | ( | self, | |
| cs.np.ndarray | x | ||
| ) |
Internal method.
| cs.np.ndarray optas.solver.ScipyMinimizeSolver.hess | ( | self, | |
| cs.np.ndarray | x | ||
| ) |
Internal method.
| cs.np.ndarray optas.solver.ScipyMinimizeSolver.jac | ( | self, | |
| cs.np.ndarray | x | ||
| ) |
Internal method.
| def optas.solver.ScipyMinimizeSolver.number_of_iterations | ( | self | ) |
Number of iterations it took the solver to converge.
@return Number of iterations.
Reimplemented from optas.solver.Solver.
| None optas.solver.ScipyMinimizeSolver.reset_initial_seed | ( | self, | |
| x0 | |||
| ) |
Reset initial seed for the optimization problem.
@param x0 The initial seed.
| def optas.solver.ScipyMinimizeSolver.reset_parameters | ( | self, | |
| Dict[str, ArrayType] | p | ||
| ) |
Reset the parameters.
@param p The values for the parameters.
Reimplemented from optas.solver.Solver.
| def optas.solver.ScipyMinimizeSolver.setup | ( | self, | |
| str | method = "SLSQP", |
||
| Union[None, float] | tol = None, |
||
| Union[None, Dict] | options = None |
||
| ) |
Setup the Scipy solver. @param method Type of solver. Default is "SLSQP". @param tol Tolerance for termination. When tol is specified, the selected minimization algorithm sets some relevant solver-specific tolerance(s) equal to tol. For detailed control, use solver-specific options. @param options A dictionary of solver options. @return The instance of the solve (i.e. self).
| def optas.solver.ScipyMinimizeSolver.stats | ( | self | ) |
Statistics relating to the previous call to solve.
@return Dictionary containing the statistics.
Reimplemented from optas.solver.Solver.
| cs.np.ndarray optas.solver.ScipyMinimizeSolver.v | ( | self, | |
| cs.np.ndarray | x | ||
| ) |
Internal method.
|
private |
Constraints definition passed to the minimize method.
|
private |
|
private |
Container for the statistics.
| optas.solver.ScipyMinimizeSolver.method |
Method name.
|
static |
Methods that handle constrained optimization problems.
|
static |
Methods that require the Hessian of the objective.
|
static |
Methods that require the Jacobian of the objective.
| optas.solver.ScipyMinimizeSolver.minimize_input |
Input to the minimize method.