Home | Trees | Index | Help |
---|
Package SimPy :: Module 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 |
|
__Evlist |
Defines event list and operations on it |
_Action |
Structure (who=process owner, generator=process) |
Exceptions | |
---|---|
FatalSimerror |
|
Simerror |
Function Summary | |
---|---|
Application function to activate passive process. | |
Returns string with eventlist as t1: [procname,procname2] t2: [procname4,procname5, . | |
Returns list of all times for which events are scheduled. | |
askCancel()
| |
Handles 'yield get' | |
holdfunc(a)
| |
initialize()
| |
now()
| |
passivatefunc(a)
| |
Handles 'yield put' | |
queueevfunc(a)
| |
Application function to reactivate a process which is active, suspended or passive. | |
releasefunc(a)
| |
Handles 'yield request,self,res' and 'yield (request,self,res),(<code>,self,par)'. | |
Schedules Processes/semi-coroutines until time 'till'. | |
Schedules Processes/semi-coroutines until time 'until' | |
Schedules Processes/semi-coroutines until next event | |
Application function to start stepping through simulation. | |
Application function to stop simulation run | |
Application function to stop stepping through simulation. | |
test_demo()
| |
test_interrupt()
| |
testSimEvents()
| |
Demo of waitUntil capability. | |
waitevfunc(a)
| |
waituntilfunc(par)
| |
Application function to start stepping through simulation for waituntil construct. | |
Application function to stop stepping through simulation. | |
Gets called by simulate after every event, as long as there are processes waiting in condQ for a condition to be satisfied. | |
_waitUntilFunc(proc,
cond)
|
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 |
bool |
__TESTING = False
|
NoneType |
_e = None |
int |
_endtime = 0 |
int |
_step = 0 |
bool |
_stop = True
|
int |
_t = 0 |
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. |
_startWUStepping()Application function to start stepping through simulation for waituntil construct. |
_stopWUStepping()Application function to stop stepping through simulation. |
_test()Gets called by simulate after every event, as long as there are processes waiting in condQ for a condition to be satisfied. Tests the conditions for all waiting processes. Where condition satisfied, reactivates that process immediately and removes it from queue. |
Variable Details |
---|
__version__
|
condQ
|
False
|
get
|
hold
|
passivate
|
paused
|
put
|
queueevent
|
release
|
request
|
True
|
waitevent
|
waituntil
|
__TESTING
|
_e
|
_endtime
|
_step
|
_stop
|
_t
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Wed Jun 14 14:32:41 2006 | http://epydoc.sf.net |