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
@@ -852,6 +857,11 @@ function SciMLBase.BVProblem{iip, specialize}(sys::AbstractODESystem, u0map = []
852
857
end
853
858
!isnothing(callback) &&error("BVP solvers do not support callbacks.")
854
859
860
+
if!isempty(get_costs(sys))
861
+
error("An ODESystem with costs cannot be solved using a regular DAEProblem.
862
+
Solvers for optimal control problems are forthcoming.")
863
+
end
864
+
855
865
has_alg_eqs(sys) &&
856
866
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.
857
867
@@ -953,6 +963,11 @@ function DiffEqBase.DAEProblem{iip}(sys::AbstractODESystem, du0map, u0map, tspan
953
963
if!iscomplete(sys)
954
964
error("A completed system is required. Call `complete` or `structural_simplify` on the system before creating a `DAEProblem`")
955
965
end
966
+
967
+
if!isempty(get_costs(sys))
968
+
error("An ODESystem with costs cannot be solved using a regular DAEProblem.
969
+
Solvers for optimal control problems are forthcoming.")
970
+
end
956
971
f, du0, u0, p =process_SciMLProblem(DAEFunction{iip}, sys, u0map, parammap;
0 commit comments