Table of Contents

Module: SimulationTrace simpy-1.3\SimPy\SimulationTrace.py

SimulationTrace 1.3 22 June 2003 LICENSE: Copyright (C) 2002 Klaus G. Muller, Tony Vignaux mailto: kgmuller@xs4all.nl and Tony.Vignaux@vuw.ac.nz

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

This program 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 this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. END OF LICENSE

Implements a trace capability for SimPy 1.3. Based on generators (Python 2.2 and later)

CVS: $Revision: 1.1 $' $Date: 2003/08/19 21:08:37 $

Change history: 9 May 03: - SimulationTrace module based on SimPy 1.3

Imported modules   
from SimPy.Lister import *
from __future__ import generators
import bisect
import sys
import types
Functions   
activate
holdfunc
initialize
now
passivatefunc
reactivate
releasefunc
requestfunc
scheduler
showEvents
simulate
stopSimulation
test_demo
test_interrupt
  activate 
activate (
        object,
        process,
        at="undefined",
        delay="undefined",
        prior=False,
        )

Application function to activate passive process.

Exceptions   
Simerror( "Fatal SimPy error: activating function which is not a generator (contains no 'yield')" )
  holdfunc 
holdfunc ( a )

  initialize 
initialize ()

  now 
now ()

  passivatefunc 
passivatefunc ( a )

  reactivate 
reactivate (
        object,
        at="undefined",
        delay="undefined",
        prior=False,
        )

Application function to reactivate a process which is active, suspended or passive.

  releasefunc 
releasefunc ( a )

  requestfunc 
requestfunc ( a )

  scheduler 
scheduler ( till=0 )

Schedules Processes/semi-coroutines until time till. Deprecated since version 0.5.

  showEvents 
showEvents ()

Returns string with eventlist as list of tuples (eventtime,action)

  simulate 
simulate ( until=0 )

Schedules Processes/semi-coroutines until time until

Exceptions   
Simerror( "Fatal SimPy error: Simulation not initialized" )
  stopSimulation 
stopSimulation ()

Application function to stop simulation run

  test_demo 
test_demo ()

  test_interrupt 
test_interrupt ()

Classes   

FIFO

PriorityQ

Queue is always ordered according to priority.

Process

Superclass of classes which may use generator functions

Queue

Resource

Models shared, limited capacity resources with queuing;

Simerror

Trace

_Action

Structure (who=process owner, generator=process)

__Evlist

Defines event list and operations on it


Table of Contents

This document was automatically generated on Sun Jun 22 11:12:00 2003 by HappyDoc version 2.1