@@ -174,7 +174,7 @@ function variable!(
174
174
175
175
# checkings
176
176
is_fixed (ocp) && throw (UnauthorizedCall (" the ocp has no variable, you cannot use variable! function." ))
177
- __is_variable_set (ocp) && throw (UnauthorizedCall (" the variable has already been set. Use variable! once. " ))
177
+ __is_variable_set (ocp) && throw (UnauthorizedCall (" the variable has already been set." ))
178
178
(q > 1 ) && (size (components_names, 1 ) ≠ q) && throw (IncorrectArgument (" the number of variable names must be equal to the variable dimension" ))
179
179
180
180
ocp. variable_dimension = q
@@ -256,7 +256,7 @@ function state!(
256
256
components_names:: Vector{String} = __state_components_names (n, name))
257
257
258
258
# checkings
259
- __is_state_set (ocp) && throw (UnauthorizedCall (" the state has already been set. Use state! once. " ))
259
+ __is_state_set (ocp) && throw (UnauthorizedCall (" the state has already been set." ))
260
260
(n > 1 ) && (size (components_names, 1 ) ≠ n) && throw (IncorrectArgument (" the number of state names must be equal to the state dimension" ))
261
261
262
262
ocp. state_dimension = n
@@ -342,7 +342,7 @@ function control!(
342
342
components_names:: Vector{String} = __control_components_names (m, name))
343
343
344
344
# checkings
345
- __is_control_set (ocp) && throw (UnauthorizedCall (" the control has already been set. Use control! once. " ))
345
+ __is_control_set (ocp) && throw (UnauthorizedCall (" the control has already been set." ))
346
346
(m > 1 ) && (size (components_names, 1 ) ≠ m) && throw (IncorrectArgument (" the number of control names must be equal to the control dimension" ))
347
347
348
348
ocp. control_dimension = m
@@ -425,7 +425,7 @@ function time!(
425
425
! isnothing (indf) && ! (1 ≤ indf ≤ q) && throw (IncorrectArgument (" the index of tf variable must be contained in 1:$q " ))
426
426
427
427
# check if the function has been already called
428
- __is_time_set (ocp) && throw (UnauthorizedCall (" the time has already been set. Use time! once. " ))
428
+ __is_time_set (ocp) && throw (UnauthorizedCall (" the time has already been set." ))
429
429
430
430
# check consistency
431
431
! isnothing (t0) && ! isnothing (ind0) && throw (IncorrectArgument (" Providing t0 and ind0 has no sense. The initial time cannot be fixed and free." ))
@@ -673,7 +673,7 @@ function dynamics!(ocp::OptimalControlModel{T, V}, f::Function) where {T <: Time
673
673
674
674
# we check if the dimensions and times have been set
675
675
__check_all_set (ocp)
676
- __is_dynamics_set (ocp) && throw (UnauthorizedCall (" the dynamics has already been set. Use dynamics! once. " ))
676
+ __is_dynamics_set (ocp) && throw (UnauthorizedCall (" the dynamics has already been set." ))
677
677
678
678
ocp. dynamics = Dynamics (f, T, V)
679
679
@@ -710,7 +710,7 @@ function objective!(ocp::OptimalControlModel{T, V}, type::Symbol, f::Function,
710
710
711
711
# we check if the dimensions and times have been set
712
712
__check_all_set (ocp)
713
- __is_objective_set (ocp) && throw (UnauthorizedCall (" the objective has already been set. Use objective! once. " ))
713
+ __is_objective_set (ocp) && throw (UnauthorizedCall (" the objective has already been set." ))
714
714
715
715
# check the validity of the criterion
716
716
! __is_criterion_valid (criterion) && throw (IncorrectArgument (" the following criterion is not valid: " * String (criterion) *
@@ -755,7 +755,7 @@ function objective!(ocp::OptimalControlModel{T, V}, type::Symbol, g::Function, f
755
755
756
756
# we check if the dimensions and times have been set
757
757
__check_all_set (ocp)
758
- __is_objective_set (ocp) && throw (UnauthorizedCall (" the objective has already been set. Use objective! once. " ))
758
+ __is_objective_set (ocp) && throw (UnauthorizedCall (" the objective has already been set." ))
759
759
760
760
# check the validity of the criterion
761
761
! __is_criterion_valid (criterion) && throw (IncorrectArgument (" the following criterion is not valid: " * String (criterion) *
0 commit comments