Package SimPy :: Module Simulation

[hide private]
[frames] | no frames]

# Module Simulation

source code

    Simulation 2.1 Implements SimPy Processes, Resources, Buffers, and the backbone simulation
    scheduling by coroutine calls. Provides data collection through classes
    Monitor and Tally.
    Based on generators (Python 2.3 and later; not 3.0)

    LICENSE:
    Copyright (C) 2002, 2005, 2006, 2007, 2008, 2009, 2010  Klaus G. Muller, Tony Vignaux
    mailto: kgmuller at xs4all.nl and Tony.Vignaux at vuw.ac.nz

        This library is free software; you can redistribute it and / or
        modify it under the terms of the GNU Lesser General Public
        License as published by the Free Software Foundation; either
        version 2.1 of the License, or (at your option) any later version.

        This library 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
        Lesser General Public License for more details.

        You should have received a copy of the GNU Lesser General Public
        License along with this library; if not, write to the Free Software
        Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111 - 1307  USA
    END OF LICENSE

Version: 2.1 $Revision: 484 $ $Date: 2010-05-10 09:18:06 +0200 (Mon, 10 May 2010) $

Classes | [hide private]

| Infinity
| Simulation

Functions | [hide private]

holdfunc(a) | source code

requestfunc(a) Handles 'yield request, self, res' and 'yield (request, self, res),(<code>,self, par)'. | source code

releasefunc(a) | source code

passivatefunc(a) | source code

waitevfunc(a) | source code

queueevfunc(a) | source code

waituntilfunc(par) | source code

getfunc(a) Handles 'yield get, self, buffer, what, priority' and 'yield (get, self, buffer, what, priority),(<code>,self, par)'. | source code

putfunc(a) Handles 'yield put' (simple and compound hold / waitevent) | source code

peek() Returns the time of the next event or infinity, if no more events are scheduled. | source code

step() Executes the next uncancelled event in the eventqueue. | source code

Variables | [hide private]

| __TESTING = `False`
| version = ``'``2.1 $Revision: 484 $ $Date: 2010-05-10 09:18:06 +02``...``
| hold = `1`
| passivate = `2`
| request = `3`
| release = `4`
| waitevent = `5`
| queueevent = `6`
| waituntil = `7`
| get = `8`
| put = `9`
| infinity = `Infinity()`

Function Details | [hide private]

### requestfunc(a)

source code

Handles 'yield request, self, res' and 'yield (request, self, res),(<code>,self, par)'. <code > can be 'hold' or 'waitevent'.

### getfunc(a)

source code

Handles 'yield get, self, buffer, what, priority' and 'yield (get, self, buffer, what, priority),(<code>,self, par)'. <code > can be 'hold' or 'waitevent'.

Variables Details | [hide private]

### version

Value:

      '2.1 $Revision: 484 $ $Date: 2010-05-10 09:18:06 +0200 (Mon, 10 May 20
      10) $'