Skip to content

Commit bad52ef

Browse files
committed
up
1 parent a921ed4 commit bad52ef

File tree

2 files changed

+1
-38
lines changed

2 files changed

+1
-38
lines changed

ext/CatalystHomotopyContinuationExtension/homotopy_continuation_extension.jl

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -104,27 +104,4 @@ function filter_negative_f(sols; neg_thres=-1e-20)
104104
(neg_thres < sol[idx] < 0) && (sol[idx] = 0)
105105
end
106106
return filter(sol -> all(>=(0), sol), sols)
107-
end
108-
109-
### Archived ###
110-
111-
# # Unfolds a function (like mm or hill).
112-
# function deregister(fs::Vector{T}, expr) where T
113-
# for f in fs
114-
# expr = deregister(f, expr)
115-
# end
116-
# return expr
117-
# end
118-
# # Provided by Shashi Gowda.
119-
# deregister(f, expr) = wrap(Rewriters.Postwalk(Rewriters.PassThrough(___deregister(f)))(unwrap(expr)))
120-
# function ___deregister(f)
121-
# (expr) ->
122-
# if istree(expr) && operation(expr) == f
123-
# args = arguments(expr)
124-
# invoke_with = map(args) do a
125-
# t = typeof(a)
126-
# issym(a) || istree(a) ? wrap(a) => symtype(a) : a => typeof(a)
127-
# end
128-
# invoke(f, Tuple{last.(invoke_with)...}, first.(invoke_with)...)
129-
# end
130-
# end
107+
end

src/reactionsystem.jl

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -538,11 +538,6 @@ struct ReactionSystem{V <: NetworkProperties} <:
538538
checks && validate(rs)
539539
rs
540540
end
541-
542-
# Copies a reaction system, but with the option of having some fields replaced
543-
function ReactionSystem(rs::ReactionSystem; eqs = rs.eqs, rxs = rs.rxs, iv = rs.iv, sivs = rs.sivs, states = rs.states, species = rs.species, ps = rs.ps, var_to_name = rs.var_to_name, observed = rs.observed, name = rs.name, systems = rs.systems, defaults = rs.defaults, connection_type = rs.connection_type, networkproperties = rs.networkproperties, combinatoric_ratelaws = rs.combinatoric_ratelaws, continuous_events = rs.continuous_events, discrete_events = rs.discrete_events, complete = rs.complete)
544-
new{typeof(networkproperties)}(eqs, rxs, ModelingToolkit.unwrap(iv), ModelingToolkit.unwrap.(sivs), ModelingToolkit.unwrap.(states), ModelingToolkit.unwrap.(species), ModelingToolkit.unwrap.(ps), var_to_name, observed, name, systems, defaults, connection_type, networkproperties, combinatoric_ratelaws, continuous_events, discrete_events, complete)
545-
end
546541
end
547542

548543
function get_speciestype(iv, states, systems)
@@ -1301,9 +1296,6 @@ function Base.convert(::Type{<:ODESystem}, rs::ReactionSystem; name = nameof(rs)
13011296
eqs = assemble_drift(fullrs, ispcs; combinatoric_ratelaws, remove_conserved,
13021297
include_zero_odes)
13031298
eqs, sts, ps, obs, defs = addconstraints!(eqs, fullrs, ists, ispcs; remove_conserved)
1304-
1305-
# Converts expressions like mm(X,v,K) to v*X/(X+K).
1306-
expand_functions && (eqs = [eq.lhs ~ expand_registered_functions!(eq.rhs) for eq in eqs])
13071299

13081300
ODESystem(eqs, get_iv(fullrs), sts, ps;
13091301
observed = obs,
@@ -1412,12 +1404,6 @@ function Base.convert(::Type{<:SDESystem}, rs::ReactionSystem;
14121404
eqs, sts, ps, obs, defs = addconstraints!(eqs, flatrs, ists, ispcs; remove_conserved)
14131405
ps = (noise_scaling === nothing) ? ps : vcat(ps, toparam(noise_scaling))
14141406

1415-
# Converts expressions like mm(X,v,K) to v*X/(X+K).
1416-
if expand_functions
1417-
eqs = [eq.lhs ~ expand_registered_functions!(eq.rhs) for eq in eqs]
1418-
noiseeqs = [expand_registered_functions!(neq) for neq in noiseeqs]
1419-
end
1420-
14211407
if any(isbc, get_states(flatrs))
14221408
@info "Boundary condition species detected. As constraint equations are not currently supported when converting to SDESystems, the resulting system will be undetermined. Consider using constant species instead."
14231409
end

0 commit comments

Comments
 (0)