Skip to content

Commit

Permalink
fix: remove implicit dependency on MTK
Browse files Browse the repository at this point in the history
  • Loading branch information
AayushSabharwal committed Jan 25, 2024
1 parent 1089e00 commit 4cf5129
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/remake.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ function remake(prob::ODEProblem; f = missing,
u0 = prob.u0
end
if (eltype(p) <: Pair && !isempty(p)) || (eltype(u0) <: Pair && !isempty(u0)) # one is a non-empty symbolic map
hasproperty(prob.f, :sys) && hasfield(typeof(prob.f.sys), :ps) ||
isempty(parameter_symbols(prob)) &&
throw(ArgumentError("This problem does not support symbolic maps with `remake`, i.e. it does not have a symbolic origin." *
" Please use `remake` with the `p` keyword argument as a vector of values, paying attention to parameter order."))
hasproperty(prob.f, :sys) && hasfield(typeof(prob.f.sys), :states) ||
isempty(variable_symbols(prob)) &&
throw(ArgumentError("This problem does not support symbolic maps with `remake`, i.e. it does not have a symbolic origin." *
" Please use `remake` with the `u0` keyword argument as a vector of values, paying attention to state order."))
p, u0 = process_p_u0_symbolic(prob, p, u0)
Expand Down Expand Up @@ -273,10 +273,10 @@ function remake(prob::OptimizationProblem;
u0 = prob.u0
end
if (eltype(p) <: Pair && !isempty(p)) || (eltype(u0) <: Pair && !isempty(u0)) # one is a non-empty symbolic map
hasproperty(prob.f, :sys) && hasfield(typeof(prob.f.sys), :ps) ||
isempty(parameter_symbols(prob)) &&
throw(ArgumentError("This problem does not support symbolic maps with `remake`, i.e. it does not have a symbolic origin." *
" Please use `remake` with the `p` keyword argument as a vector of values, paying attention to parameter order."))
hasproperty(prob.f, :sys) && hasfield(typeof(prob.f.sys), :states) ||
isempty(variable_symbols(prob)) &&
throw(ArgumentError("This problem does not support symbolic maps with `remake`, i.e. it does not have a symbolic origin." *
" Please use `remake` with the `u0` keyword argument as a vector of values, paying attention to state order."))
p, u0 = process_p_u0_symbolic(prob, p, u0)
Expand Down Expand Up @@ -342,10 +342,10 @@ function remake(prob::NonlinearProblem;
u0 = prob.u0
end
if (eltype(p) <: Pair && !isempty(p)) || (eltype(u0) <: Pair && !isempty(u0)) # one is a non-empty symbolic map
hasproperty(prob.f, :sys) && hasfield(typeof(prob.f.sys), :ps) ||
isempty(parameter_symbols(prob)) &&
throw(ArgumentError("This problem does not support symbolic maps with `remake`, i.e. it does not have a symbolic origin." *
" Please use `remake` with the `p` keyword argument as a vector of values, paying attention to parameter order."))
hasproperty(prob.f, :sys) && hasfield(typeof(prob.f.sys), :states) ||
isempty(variable_symbols(prob)) &&
throw(ArgumentError("This problem does not support symbolic maps with `remake`, i.e. it does not have a symbolic origin." *
" Please use `remake` with the `u0` keyword argument as a vector of values, paying attention to state order."))
p, u0 = process_p_u0_symbolic(prob, p, u0)
Expand Down

0 comments on commit 4cf5129

Please sign in to comment.