[Tutor] Lotka-Volterra Model Simulation Questions

Oscar Benjamin oscar.j.benjamin at gmail.com
Sat Sep 29 10:56:07 CEST 2012

On Sep 29, 2012 9:41 AM, "Oscar Benjamin" <oscar.j.benjamin at gmail.com>
> On Sep 29, 2012 2:25 AM, "Alan Gauld" <alan.gauld at btinternet.com> wrote:
> >
> > On 28/09/12 21:32, Jim Apto wrote:
> >
> >> I'm relatively new to python, and was asked to program a lotka-volterra
> >> model (predator and prey relation) simulator.
> >
> >
> > No idea what that means in practice but commenting purely on the code
> >
> >
> >> x represents prey population
> >> y represents predator population
> >
> >
> > so use names that say so, like preyPop and predatorPop
> > Its only a few extra letters typing but makes things much more readable.
> As a mathematician I'd have to disagree with you there Alan. This model
already has an established notation:
> http://en.m.wikipedia.org/wiki/Lotka%E2%80%93Volterra_equation

Accidentally sent that prematurely.

I meant to say that changing the notation will only lead to confusion.

Also there are good reasons for using short names in equations. It makes it
much easier to see the whole equation at once, which makes it easier to
understand the equations and easier to check your code. If you make the
variable names too long, even simple equations like these will have to
split over several lines and be more difficult to read/check.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120929/7a99741c/attachment.html>

More information about the Tutor mailing list