@@ -940,7 +940,7 @@ def __init__(
940
940
941
941
# Compute the input for a nonlinear, (constrained) optimal control problem
942
942
def solve_ocp (
943
- sys , horizon , X0 , cost , trajectory_constraints = None , terminal_cost = None ,
943
+ sys , timepts , X0 , cost , trajectory_constraints = None , terminal_cost = None ,
944
944
terminal_constraints = [], initial_guess = None , basis = None , squeeze = None ,
945
945
transpose = None , return_states = True , print_summary = True , log = False ,
946
946
** kwargs ):
@@ -952,7 +952,7 @@ def solve_ocp(
952
952
sys : InputOutputSystem
953
953
I/O system for which the optimal input will be computed.
954
954
955
- horizon : 1D array_like
955
+ timepts : 1D array_like
956
956
List of times at which the optimal input should be computed.
957
957
958
958
X0: array-like or number, optional
@@ -990,9 +990,9 @@ def solve_ocp(
990
990
991
991
initial_guess : 1D or 2D array_like
992
992
Initial inputs to use as a guess for the optimal input. The inputs
993
- should either be a 2D vector of shape (ninputs, horizon) or a 1D
994
- input of shape (ninputs,) that will be broadcast by extension of the
995
- time axis.
993
+ should either be a 2D vector of shape (ninputs, len(timepts)) or a
994
+ 1D input of shape (ninputs,) that will be broadcast by extension of
995
+ the time axis.
996
996
997
997
log : bool, optional
998
998
If `True`, turn on logging messages (using Python logging module).
@@ -1069,7 +1069,7 @@ def solve_ocp(
1069
1069
1070
1070
# Set up the optimal control problem
1071
1071
ocp = OptimalControlProblem (
1072
- sys , horizon , cost , trajectory_constraints = trajectory_constraints ,
1072
+ sys , timepts , cost , trajectory_constraints = trajectory_constraints ,
1073
1073
terminal_cost = terminal_cost , terminal_constraints = terminal_constraints ,
1074
1074
initial_guess = initial_guess , basis = basis , log = log , ** kwargs )
1075
1075
@@ -1081,12 +1081,12 @@ def solve_ocp(
1081
1081
1082
1082
# Create a model predictive controller for an optimal control problem
1083
1083
def create_mpc_iosystem (
1084
- sys , horizon , cost , constraints = [], terminal_cost = None ,
1084
+ sys , timepts , cost , constraints = [], terminal_cost = None ,
1085
1085
terminal_constraints = [], log = False , ** kwargs ):
1086
1086
"""Create a model predictive I/O control system
1087
1087
1088
1088
This function creates an input/output system that implements a model
1089
- predictive control for a system given the time horizon , cost function and
1089
+ predictive control for a system given the time points , cost function and
1090
1090
constraints that define the finite-horizon optimization that should be
1091
1091
carried out at each state.
1092
1092
@@ -1095,7 +1095,7 @@ def create_mpc_iosystem(
1095
1095
sys : InputOutputSystem
1096
1096
I/O system for which the optimal input will be computed.
1097
1097
1098
- horizon : 1D array_like
1098
+ timepts : 1D array_like
1099
1099
List of times at which the optimal input should be computed.
1100
1100
1101
1101
cost : callable
@@ -1133,7 +1133,7 @@ def create_mpc_iosystem(
1133
1133
"""
1134
1134
# Set up the optimal control problem
1135
1135
ocp = OptimalControlProblem (
1136
- sys , horizon , cost , trajectory_constraints = constraints ,
1136
+ sys , timepts , cost , trajectory_constraints = constraints ,
1137
1137
terminal_cost = terminal_cost , terminal_constraints = terminal_constraints ,
1138
1138
log = log , kwargs_check = False , ** kwargs )
1139
1139
0 commit comments