You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/systems/diffeqs/abstractodesystem.jl
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -841,35 +841,35 @@ function SciMLBase.BVProblem{iip, specialize}(sys::AbstractODESystem, u0map = []
841
841
eval_expression =false,
842
842
eval_module =@__MODULE__,
843
843
kwargs...) where {iip, specialize}
844
-
845
844
if!iscomplete(sys)
846
845
error("A completed system is required. Call `complete` or `structural_simplify` on the system before creating an `BVProblem`")
847
846
end
848
847
!isnothing(callback) &&error("BVP solvers do not support callbacks.")
849
848
850
-
has_alg_eqs(sys) &&error("The BVProblem constructor currently does not support ODESystems with algebraic equations.") # Remove this when the BVDAE solvers get updated, the codegen should work when it does.
849
+
has_alg_eqs(sys) &&
850
+
error("The BVProblem constructor currently does not support ODESystems with algebraic equations.") # Remove this when the BVDAE solvers get updated, the codegen should work when it does.
@warn"The BVProblem is overdetermined. The total number of conditions (# constraints + # fixed initial values given by u0map) exceeds the total number of states. The BVP solvers will default to doing a nonlinear least-squares optimization."
@warn"The BVProblem is overdetermined. The total number of conditions (# constraints + # fixed initial values given by u0map) exceeds the total number of states. The BVP solvers will default to doing a nonlinear least-squares optimization."
859
859
end
860
860
861
861
# ODESystems without algebraic equations should use both fixed values + guesses
@@ -725,22 +728,26 @@ function process_constraint_system(constraints::Vector{Equation}, sts, ps, iv; c
725
728
# Validate the states.
726
729
for var in constraintsts
727
730
if!iscall(var)
728
-
occursin(iv, var) && (var ∈ sts ||throw(ArgumentError("Time-dependent variable $var is not an unknown of the system.")))
731
+
occursin(iv, var) && (var ∈ sts ||
732
+
throw(ArgumentError("Time-dependent variable $var is not an unknown of the system.")))
729
733
elseiflength(arguments(var)) >1
730
734
throw(ArgumentError("Too many arguments for variable $var."))
731
735
elseiflength(arguments(var)) ==1
732
736
arg =only(arguments(var))
733
-
operation(var)(iv) ∈ sts ||
737
+
operation(var)(iv) ∈ sts ||
734
738
throw(ArgumentError("Variable $var is not a variable of the ODESystem. Called variables must be variables of the ODESystem."))
735
739
736
-
isequal(arg, iv) ||isparameter(arg) || arg isa Integer || arg isa AbstractFloat ||
740
+
isequal(arg, iv) ||isparameter(arg) || arg isa Integer ||
741
+
arg isa AbstractFloat ||
737
742
throw(ArgumentError("Invalid argument specified for variable $var. The argument of the variable should be either $iv, a parameter, or a value specifying the time that the constraint holds."))
738
743
739
744
isparameter(arg) &&push!(constraintps, arg)
740
745
else
741
-
var ∈ sts &&@warn"Variable $var has no argument. It will be interpreted as $var($iv), and the constraint will apply to the entire interval."
746
+
var ∈ sts &&
747
+
@warn"Variable $var has no argument. It will be interpreted as $var($iv), and the constraint will apply to the entire interval."
742
748
end
743
749
end
744
750
745
-
ConstraintsSystem(constraints, collect(constraintsts), collect(constraintps); name = consname)
751
+
ConstraintsSystem(
752
+
constraints, collect(constraintsts), collect(constraintps); name = consname)
0 commit comments