@@ -25,7 +25,7 @@ class OptimalControlProblem():
25
25
"""Description of a finite horizon, optimal control problem.
26
26
27
27
The `OptimalControlProblem` class holds all of the information required to
28
- specify and optimal control problem: the system dynamics, cost function,
28
+ specify an optimal control problem: the system dynamics, cost function,
29
29
and constraints. As much as possible, the information used to specify an
30
30
optimal control problem matches the notation and terminology of the SciPy
31
31
`optimize.minimize` module, with the hope that this makes it easier to
@@ -94,13 +94,13 @@ class OptimalControlProblem():
94
94
The `_cost_function` method takes the information computes the cost of the
95
95
trajectory generated by the proposed input. It does this by calling a
96
96
user-defined function for the integral_cost given the current states and
97
- inputs at each point along the trajetory and then adding the value of a
97
+ inputs at each point along the trajectory and then adding the value of a
98
98
user-defined terminal cost at the final pint in the trajectory.
99
99
100
100
The `_constraint_function` method evaluates the constraint functions along
101
101
the trajectory generated by the proposed input. As in the case of the
102
102
cost function, the constraints are evaluated at the state and input along
103
- each point on the trjectory . This information is compared against the
103
+ each point on the trajectory . This information is compared against the
104
104
constraint upper and lower bounds. The constraint function is processed
105
105
in the class initializer, so that it only needs to be computed once.
106
106
@@ -567,7 +567,7 @@ def _process_initial_guess(self, initial_guess):
567
567
#
568
568
# Initially guesses from the user are passed as input vectors as a
569
569
# function of time, but internally we store the guess in terms of the
570
- # basis coefficients. We do this by solving a least squares probelm to
570
+ # basis coefficients. We do this by solving a least squares problem to
571
571
# find coefficients that match the input functions at the time points (as
572
572
# much as possible, if the problem is under-determined).
573
573
#
@@ -880,7 +880,7 @@ def solve_ocp(
880
880
Function that returns the terminal cost given the current state
881
881
and input. Called as terminal_cost(x, u).
882
882
883
- terminal_constraint : list of tuples, optional
883
+ terminal_constraints : list of tuples, optional
884
884
List of constraints that should hold at the end of the trajectory.
885
885
Same format as `constraints`.
886
886
@@ -914,7 +914,7 @@ def solve_ocp(
914
914
res : OptimalControlResult
915
915
Bundle object with the results of the optimal control problem.
916
916
917
- res.success: bool
917
+ res.success : bool
918
918
Boolean flag indicating whether the optimization was successful.
919
919
920
920
res.time : array
@@ -982,7 +982,7 @@ def create_mpc_iosystem(
982
982
Function that returns the terminal cost given the current state
983
983
and input. Called as terminal_cost(x, u).
984
984
985
- terminal_constraint : list of tuples, optional
985
+ terminal_constraints : list of tuples, optional
986
986
List of constraints that should hold at the end of the trajectory.
987
987
Same format as `constraints`.
988
988
@@ -992,7 +992,7 @@ def create_mpc_iosystem(
992
992
Returns
993
993
-------
994
994
ctrl : InputOutputSystem
995
- An I/O system taking the currrent state of the model system and
995
+ An I/O system taking the current state of the model system and
996
996
returning the current input to be applied that minimizes the cost
997
997
function while satisfying the constraints.
998
998
@@ -1039,9 +1039,9 @@ def quadratic_cost(sys, Q, R, x0=0, u0=0):
1039
1039
R : 2D array_like
1040
1040
Weighting matrix for input cost. Dimensions must match system input.
1041
1041
x0 : 1D array
1042
- Nomimal value of the system state (for which cost should be zero).
1042
+ Nominal value of the system state (for which cost should be zero).
1043
1043
u0 : 1D array
1044
- Nomimal value of the system input (for which cost should be zero).
1044
+ Nominal value of the system input (for which cost should be zero).
1045
1045
1046
1046
Returns
1047
1047
-------
@@ -1082,7 +1082,7 @@ def quadratic_cost(sys, Q, R, x0=0, u0=0):
1082
1082
# As in the cost function evaluation, the main "trick" in creating a constrain
1083
1083
# on the state or input is to properly evaluate the constraint on the stacked
1084
1084
# state and input vector at the current time point. The constraint itself
1085
- # will be called at each poing along the trajectory (or the endpoint) via the
1085
+ # will be called at each point along the trajectory (or the endpoint) via the
1086
1086
# constrain_function() method.
1087
1087
#
1088
1088
# Note that these functions to not actually evaluate the constraint, they
@@ -1250,7 +1250,7 @@ def input_range_constraint(sys, lb, ub):
1250
1250
def output_poly_constraint (sys , A , b ):
1251
1251
"""Create output constraint from polytope
1252
1252
1253
- Creates a linear constraint on the system ouput of the form A y <= b that
1253
+ Creates a linear constraint on the system output of the form A y <= b that
1254
1254
can be used as an optimal control constraint (trajectory or terminal).
1255
1255
1256
1256
Parameters
0 commit comments