Lotka
PyCellChemistry documentation index
source code: src/Lotka.py

#---------------------------------------------------------------------------
#
# Lotka.py: Lotka-Volterra demo, ODE vs. stochastic
#
# usage: python Lotka.py [ stoch ]
#
# if the string 'stoch' is passed as argument, a stochastic simulation
# is performed, else a deterministic ODE integration is performed
#
# by Lidia Yamamoto, Univ. Basel, Switzerland, January 2010
#
# 20130621: ported from an initial version running on top of breve
# 20150621: easier switch between stochastic and deterministic modes
#
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
# Copyright (C) 2015 Lidia A. R. Yamamoto
# Contact: http://www.artificial-chemistries.org/
#
# This file is part of PyCellChemistry.
#
# PyCellChemistry is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# version 3, as published by the Free Software Foundation.
#
# PyCellChemistry is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with PyCellChemistry, see file COPYING. If not, see
# http://www.gnu.org/licenses/
#


Modules
numpy
sys


Classes
LotkaVolterra


class LotkaVolterra
Methods defined here:
__init__(self, usestoch)
Lotka-Volterra predator-prey system, with option for stochastic
(usestoch=True) or deterministic simulation (usestoch=False)
exploded(self)
true if either predator or prey exploded to infinity
extinct(self)
true if either predator or prey speces have gone extinct
run(self, finalvt=40.0, dt=0.001)
run Lotka-Volterra system until simulation time 'finalvt' is
reached; a plot line is generated every integration interval dt


Generated automatically by pydoc, July 10, 2015


Generated automatically by pydoc, July 10, 2015