Browse Source

Removed unnecessary conversion type

enzyme_reactions
Micah Halter 3 weeks ago
parent
commit
63695ead6c
Signed by: mehalter GPG Key ID: 4224A6EA9A8CAAA8
2 changed files with 0 additions and 11 deletions
  1. +0
    -8
      src/AlgebraicPetri.jl
  2. +0
    -3
      test/types.jl

+ 0
- 8
src/AlgebraicPetri.jl View File

@ -325,14 +325,6 @@ LabelledReactionNet{R,C}(pn::Union{AbstractPetriNet}, states, transitions) where
pn′
end
LabelledReactionNet{R,C}(pn::Union{AbstractLabelledPetriNet, AbstractLabelledReactionNet}, concentrations, rates) where {R, C} = begin
pn′ = LabelledReactionNet{R,C}()
copy_parts!(pn′, pn)
map(k->set_subpart!(pn′, k, :concentration, concentrations[k]), keys(concentrations))
map(k->set_subpart!(pn′, k, :rate, rates[k]), keys(rates))
pn′
end
# Interoperability with Petri.jl
Petri.Model(p::AbstractPetriNet) = begin
ts = TransitionMatrices(p)


+ 0
- 3
test/types.jl View File

@ -26,9 +26,6 @@ end
for pn [sir_lrxn]
@test LabelledReactionNet{Number, Int}(pn) == sir_lrxn
end
for pn [sir_lpetri, sir_lrxn]
@test LabelledReactionNet{Number, Int}(pn, [990, 10, 0], [.001, .25]) == sir_lrxn
end
for pn [sir_petri, sir_rxn]
@test LabelledReactionNet{Number, Int}(pn, [:S=>990, :I=>10, :R=>0], [:inf=>.001, :rec=>.25]) == sir_lrxn
end


Loading…
Cancel
Save