control.optimal.OptimalControlResult¶
- class control.optimal.OptimalControlResult(ocp, res, return_states=False, print_summary=False, transpose=None, squeeze=None)¶
Bases:
OptimizeResult
Result from solving an optimal control problem.
This class is a subclass of
scipy.optimize.OptimizeResult
with additional attributes associated with solving optimal control problems.- inputs¶
The optimal inputs associated with the optimal control problem.
- Type
ndarray
- states¶
If return_states was set to true, stores the state trajectory associated with the optimal input.
- Type
ndarray
- success¶
Whether or not the optimizer exited successful.
- Type
bool
- problem¶
Optimal control problem that generated this solution.
- cost¶
Final cost of the return solution.
- Type
float
- system_simulations, {cost, constraint, eqconst}_evaluations
Number of system simulations and evaluations of the cost function, (inequality) constraint function, and equality constraint function performed during the optimzation.
- Type
int
- {cost, constraint, eqconst}_process_time
If logging was enabled, the amount of time spent evaluating the cost and constraint functions.
- Type
float
Methods
Create a new dictionary with keys from iterable and values set to value.
Return the value for key if key is in the dictionary, else default.
If key is not found, d is returned if given, otherwise KeyError is raised
2-tuple; but raise KeyError if D is empty.
Insert key with a value of default if key is not in the dictionary.
If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- __contains__(key, /)¶
True if the dictionary has the specified key, else False.
- __delattr__(key, /)¶
Delete self[key].
- __delitem__(key, /)¶
Delete self[key].
- __dir__()¶
Default dir() implementation.
- __eq__(value, /)¶
Return self==value.
- __ge__(value, /)¶
Return self>=value.
- __getattribute__(name, /)¶
Return getattr(self, name).
- __getitem__()¶
x.__getitem__(y) <==> x[y]
- __gt__(value, /)¶
Return self>value.
- __hash__ = None¶
- __iter__()¶
Implement iter(self).
- __le__(value, /)¶
Return self<=value.
- __len__()¶
Return len(self).
- __lt__(value, /)¶
Return self<value.
- __ne__(value, /)¶
Return self!=value.
- __new__(**kwargs)¶
- __setattr__(key, value, /)¶
Set self[key] to value.
- __setitem__(key, value, /)¶
Set self[key] to value.
- __sizeof__() size of D in memory, in bytes ¶
- clear() None. Remove all items from D. ¶
- copy() a shallow copy of D ¶
- fromkeys(value=None, /)¶
Create a new dictionary with keys from iterable and values set to value.
- get(key, default=None, /)¶
Return the value for key if key is in the dictionary, else default.
- items() a set-like object providing a view on D's items ¶
- keys() a set-like object providing a view on D's keys ¶
- pop(k[, d]) v, remove specified key and return the corresponding value. ¶
If key is not found, d is returned if given, otherwise KeyError is raised
- popitem() (k, v), remove and return some (key, value) pair as a ¶
2-tuple; but raise KeyError if D is empty.
- setdefault(key, default=None, /)¶
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.
- update([E, ]**F) None. Update D from dict/iterable E and F. ¶
If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
- values() an object providing a view on D's values ¶