Package SimPy :: Module SimulationStep
[show private | hide private]
[frames | no frames]

Module SimPy.SimulationStep

Classes
Buffer Abstract class for buffers Blocks a process when a put would cause buffer overflow or a get would cause buffer underflow.
FIFO  
Histogram A histogram gathering and sampling class
Level Models buffers for processes putting/getting un-distinguishable items.
Monitor Monitored variables
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; FIFO is default queuing discipline.
SimEvent Supports one-shot signalling between processes.
Store Models buffers for processes coupled by putting/getting distinguishable items.
Tally  

Exceptions
FatalSimerror  
Simerror  

Function Summary
  activate(object, process, at, delay, prior)
Application function to activate passive process.
  allEventNotices()
Returns string with eventlist as t1: [procname,procname2] t2: [procname4,procname5, .
  allEventTimes()
Returns list of all times for which events are scheduled.
  askCancel()
  getfunc(a)
Handles 'yield get'
  holdfunc(a)
  initialize()
  now()
  passivatefunc(a)
  putfunc(a)
Handles 'yield put'
  queueevfunc(a)
  reactivate(obj, at, delay, prior)
Application function to reactivate a process which is active, suspended or passive.
  releasefunc(a)
  requestfunc(a)
Handles 'yield request,self,res' and 'yield (request,self,res),(<code>,self,par)'.
  scheduler(till)
Schedules Processes/semi-coroutines until time 'till'.
  simulate(callback, until)
Schedules Processes/semi-coroutines until time 'until'
  simulateStep(callback, until)
Schedules Processes/semi-coroutines until next event
  startStepping()
Application function to start stepping through simulation.
  stopSimulation()
Application function to stop simulation run
  stopStepping()
Application function to stop stepping through simulation.
  test_demo()
  test_interrupt()
  testSimEvents()
  testwaituntil()
Demo of waitUntil capability.
  waitevfunc(a)
  waituntilfunc(par)

Variable Summary
str __version__ = '1.7.1 Jun 2006'
list condQ = []
int False = 0                                                                     
int get = 8                                                                     
int hold = 1                                                                     
int passivate = 2                                                                     
int paused = 0                                                                     
int put = 9                                                                     
int queueevent = 6                                                                     
int release = 4                                                                     
int request = 3                                                                     
int True = 1                                                                     
int waitevent = 5                                                                     
int waituntil = 7                                                                     

Function Details

activate(object, process, at='undefined', delay='undefined', prior=0)

Application function to activate passive process.

allEventNotices()

Returns string with eventlist as t1: [procname,procname2] t2: [procname4,procname5, . . . ] . . . .

allEventTimes()

Returns list of all times for which events are scheduled.

getfunc(a)

Handles 'yield get'

putfunc(a)

Handles 'yield put'

reactivate(obj, at='undefined', delay='undefined', prior=0)

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

requestfunc(a)

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

scheduler(till=0)

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

simulate(callback=<function <lambda> at 0x010C9970>, until=0)

Schedules Processes/semi-coroutines until time 'until'

simulateStep(callback=<function <lambda> at 0x010C99F0>, until=0)

Schedules Processes/semi-coroutines until next event

startStepping()

Application function to start stepping through simulation.

stopSimulation()

Application function to stop simulation run

stopStepping()

Application function to stop stepping through simulation.

testwaituntil()

Demo of waitUntil capability.

Scenario: Three workers require sets of tools to do their jobs. Tools are shared, scarce resources for which they compete.

Variable Details

__version__

Type:
str
Value:
'1.7.1 Jun 2006'                                                       

condQ

Type:
list
Value:
[]                                                                     

False

Type:
int
Value:
0                                                                     

get

Type:
int
Value:
8                                                                     

hold

Type:
int
Value:
1                                                                     

passivate

Type:
int
Value:
2                                                                     

paused

Type:
int
Value:
0                                                                     

put

Type:
int
Value:
9                                                                     

queueevent

Type:
int
Value:
6                                                                     

release

Type:
int
Value:
4                                                                     

request

Type:
int
Value:
3                                                                     

True

Type:
int
Value:
1                                                                     

waitevent

Type:
int
Value:
5                                                                     

waituntil

Type:
int
Value:
7                                                                     

Generated by Epydoc 2.1 on Wed Jun 14 14:32:41 2006 http://epydoc.sf.net