ukhsa-collaboration / pygom

ODE modelling in Python
GNU General Public License v2.0
27 stars 20 forks source link

Broken plotting function #26

Closed hareball90 closed 5 years ago

hareball90 commented 5 years ago

The plot function does not give an output.

from pygom import DeterministicOde, Transition, TransitionType import numpy as np

states= ['S', 'I', 'R'] params = {'beta':0.3, 'gamma':0.5} t = np.arange(0, 100, 0.5) transitions = [Transition(origin='S', destination='I', equation='beta*S*I', transition_type='T'), Transition(origin='I', destination='R', equation='gamma*I', transition_type='T')]

model = DeterministicOde(states, params, transition=transitions) model.get_ode_eqn() model.initial_values = ([95, 5, 0], t[0]) model.parameters = {'beta':0.3, 'gamma':0.5} solution, output = model.integrate(t[1::], full_output=True) model.plot()

twomagpi commented 5 years ago

should work as of 0.1.4.dev47+g71975dd.d20190819