<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.python.simpy.user">
    <title>gmane.comp.python.simpy.user</title>
    <link>http://blog.gmane.org/gmane.comp.python.simpy.user</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.simpy.user/1360"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.simpy.user/1352"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.simpy.user/1343"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.simpy.user/1341"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.simpy.user/1338"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.simpy.user/1337"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.simpy.user/1327"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.simpy.user/1316"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.simpy.user/1315"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.simpy.user/1313"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.simpy.user/1309"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.simpy.user/1307"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.simpy.user/1302"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.simpy.user/1301"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.simpy.user/1299"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.simpy.user/1295"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.simpy.user/1293"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.simpy.user/1291"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.simpy.user/1288"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.python.simpy.user/1287"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.simpy.user/1360">
    <title>Order and line stucture</title>
    <link>http://comments.gmane.org/gmane.comp.python.simpy.user/1360</link>
    <description>&lt;pre&gt;Hello, 

I am trying to simulate a production line, all the way from customer order to 
dispatch. This will allow me to load the factory with different types of work 
based on historic data. 

But a down side of this, I need to simulate the process of order creation. So 
first the customer places and order, that order has a number of lines and the 
line has a number of units. 

I have made a procedural source which can create the right number of number 
lines per order and units per line based on some variables.

But the problem I am facing is; the factory stores kits a parts for an entire 
order line (based on which parts they have), but then the builders pick 
individual units (based on the units which are kitted).

So I need to be able to manipulate an entire line at one stage, but at a later 
stage I need to work with individual units.

This seems like the sort of thing that some one might have done before 
(possibly using OO), so is there an example of this structure that I could 
follow?

class Source(&lt;/pre&gt;</description>
    <dc:creator>Chris</dc:creator>
    <dc:date>2012-05-23T14:08:01</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.simpy.user/1352">
    <title>Lis tes messages avant qu'ils ne soient effacés!</title>
    <link>http://comments.gmane.org/gmane.comp.python.simpy.user/1352</link>
    <description>&lt;pre&gt;Lis ton message de Syn avant qu'il ne soit effacé!

Pour lire ton message, suis simplement ce lien:
http://eu1.badoo.com/0279183266/in/hbFeqxWJOkU/?lang_id=6&amp;amp;m=65&amp;amp;mid=4fbb0ff60000000000060000610b9a0b



Le lien ne fonctionnent pas dans ce message ? Copie le dans la barre d'adresse de ton navigateur.

Tu as reçu cet email suite à une requête de Syn auprès de notre système. S'il s'agit d'une erreur, ignore simplement cet email. La requête sera alors effacée du système.

Amuse-toi bien !
L'équipe Badoo

Vous avez reçu cet email de Badoo Trading Limited (adresse postale ci-dessous). 
http://eu1.badoo.com/impersonation.phtml?lang_id=6&amp;amp;mail_code=65&amp;amp;email=simpy-users%40lists.sourceforge.net&amp;amp;secret=&amp;amp;action=block&amp;amp;block_code=3b37f6&amp;amp;m=65&amp;amp;mid=4fbb0ff60000000000060000610b9a0b
Badoo Trading Limited est une Société à Responsabilité Limitée, enregistrée en Angleterre et Pays de Galles, sous le No. 7540255, bureaux enregistrés à l’adresse 12 Red Lion Square, London, WC1R 4QD.-----------------------------&lt;/pre&gt;</description>
    <dc:creator>Badoo</dc:creator>
    <dc:date>2012-05-22T04:03:04</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.simpy.user/1343">
    <title>Question about bus example in the simpy manual</title>
    <link>http://comments.gmane.org/gmane.comp.python.simpy.user/1343</link>
    <description>&lt;pre&gt;Hello,
I have been experimenting with the Bus breakdown example in the Simpy
manual and am really struggling to understand why when I create
multiple instances of Bus, the last instance seems to get "of
sequence" after the first repair.  I have modified the example code in
the manual very slightly just below the initialize() statement to
create two instances of Bus (Bus1 and Bus2).  Here is my code:

from SimPy.Simulation import *

class Bus(Process):

  def operate(self,repairduration,triplength):    # PEM
     tripleft = triplength
        # "tripleft" is the driving time to finish trip
        # if there are no further breakdowns
     while tripleft &amp;gt; 0:
        yield hold,self,tripleft      # try to finish the trip
            # if a breakdown intervenes
        if self.interrupted():
              print self.interruptCause.name, 'at %s' %now()
              tripleft=self.interruptLeft
                # update driving time to finish
                # the trip if no more breakdowns
              self.inte&lt;/pre&gt;</description>
    <dc:creator>Seymour Morris</dc:creator>
    <dc:date>2012-05-16T21:40:15</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.simpy.user/1341">
    <title>Python does not garbage-collect SimPy Simulationclasses</title>
    <link>http://comments.gmane.org/gmane.comp.python.simpy.user/1341</link>
    <description>&lt;pre&gt;Dear User-community

I have been using SimPy for over a year now in a forest machine simulation
project. It's complex simulations with a lot of data involved connected to
the spatial complexity of a forest. See
http://www.org.umu.se/umit/english/project-activities/discrete-event-forestry/
for
more info about the project.

Overall I like SimPy although we have problems with the one-PEM limitation
which unfortunately have resulted in close to unreadable code. But enough
about that.

Recently we had big simulation series with around 50 000 simulations.
Simply put, we ran out of memory. It turns out that all the 50 000
simulations are stored in memory and not garbage collected. And this is NOT
because we still have references to those simulations from our code. It
turns out that SimPy stores references to earlier simulations. Try running
the below/attached example and you will see what I mean.

I haven't time right now to look into the SimPy code to see what's wrong...
do you have any hints?

Best Regards

Linus&lt;/pre&gt;</description>
    <dc:creator>Linus Jundén</dc:creator>
    <dc:date>2012-05-16T16:02:25</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.simpy.user/1338">
    <title>1 queue, multiple resources: with equal probability for each resource to be utilized?</title>
    <link>http://comments.gmane.org/gmane.comp.python.simpy.user/1338</link>
    <description>&lt;pre&gt;Hi again :)

I intend to create a model of two resources sharing a common queue, where
if both resources are currently available, one of them will be selected at
random for the task (with a probability of 0.5). I have already set the
capacity parameter in Resource to 2, but how would I implement the random
selection of resource? Or does the Resource class inherently do that
already? I read up Resources in the SimPy manual but can't seem to find
anything about this.

Many thanks.

&lt;/pre&gt;</description>
    <dc:creator>Josephine Lim</dc:creator>
    <dc:date>2012-05-15T13:33:53</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.simpy.user/1337">
    <title>Découvre le message de Syn...</title>
    <link>http://comments.gmane.org/gmane.comp.python.simpy.user/1337</link>
    <description>&lt;pre&gt;Un message de Syn t'attend...

L'expéditeur et le contenu seront visibles seulement par toi et tu peux le supprimer à tout moment. Tu peux aussi y répondre directement au travers du messenger. Pour découvrir le message, suis simplement ce lien:
http://eu1.badoo.com/0279183266/in/hbFeqxWJOkU/?lang_id=6&amp;amp;m=63&amp;amp;mid=4fb186c500000000000600000512165f

D'autres personnes à proximité qui sont sur Badoo
Mickael (Nantes, France)
July (Nantes, France)
Statler  Waldorf (Nantes, France)

http://eu1.badoo.com/0279183266/in/hbFeqxWJOkU/?lang_id=6&amp;amp;m=63&amp;amp;mid=4fb186c500000000000600000512165f

Le lien ne fonctionne pas dans ce message ? Copie le dans la barre d'adresse de ton navigateur.

Tu as reçu cet email suite à une requête de Syn auprès de notre système. S'il s'agit d'une erreur, ignore simplement cet email. La requête sera alors effacée du système.

Merci,
L'équipe Badoo

Vous avez reçu cet email de Badoo Trading Limited (adresse postale ci-dessous). 
http://eu1.badoo.com/impersonation.phtml?lang_id=6&amp;amp;mail_&lt;/pre&gt;</description>
    <dc:creator>Badoo</dc:creator>
    <dc:date>2012-05-14T22:27:19</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.simpy.user/1327">
    <title>Different resource queue types,and sequential simulation with SimPy: Possible?</title>
    <link>http://comments.gmane.org/gmane.comp.python.simpy.user/1327</link>
    <description>&lt;pre&gt;Hi,

I'm new to SimPy, and looked it up because I had intended to model two
types of queues, LIFO (last in first out) and SJF (shortest job first),
with it. However, after getting through the tutorials, I noticed to my
disappointment in the manual that there were only two possible values for
Resource qType = FIFO or explicit priority. Is there any way to set up a
LIFO or SJF model with this?

Also, would it be possible to enact a sequential simulation with SimPy, so
that the simulation runs until the relative statistical error found is
smaller than the minimum acceptable error, before stopping?

Or would I be better off looking for other simulation libraries?

Many thanks.

&lt;/pre&gt;</description>
    <dc:creator>Josephine Lim</dc:creator>
    <dc:date>2012-05-13T17:05:39</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.simpy.user/1316">
    <title>Validation in Simpy</title>
    <link>http://comments.gmane.org/gmane.comp.python.simpy.user/1316</link>
    <description>&lt;pre&gt;Hello every one,

I'm new in Simpy, I'm trying to run several times a simulation model in order to 
estimate confidence intervals. However, I can't run my simulation model twice 
because an error appears with the estimation of "server.waitMon.timeAverage()":

During the first run there is no problem, but after that the following error 
appears:

print("Average waiting time %5.4f"%(server.waitMon.timeAverage()))
TypeError: a float is required

The whole main function is (comments and some variables are in Spanish...): 

def Votacion():
    maxTime = 1.0 *60   # minutes
    timeInSystem = 10.2 # minutes
    TiempoPromedio = 100*60/10000
    M=10000
    servidor = Resource(capacity = 17, name="Servidor",monitored=True)
    ## Model/Experiment ------------------------------

    #seed(99999) #Opcional si se quiere tener control sobre los numeros 
generados
    initialize()
    g = Generador4()
    activate(g,g.generar(M,timeInSystem,TiempoPromedio,servidor),at=0)
    simulate(until=maxTime)
    #----------------&lt;/pre&gt;</description>
    <dc:creator>Julian</dc:creator>
    <dc:date>2012-05-03T18:04:51</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.simpy.user/1315">
    <title>Made with Simpy</title>
    <link>http://comments.gmane.org/gmane.comp.python.simpy.user/1315</link>
    <description>&lt;pre&gt;I have created a simulation of software teams using SimPy:

Intro:   http://ugile.com/siminfo
Live simulation: http://localhost:8083/sim  &amp;lt;http://localhost:8083/sim&amp;gt;
Some charts generated from the simulations: http://ugile.com/simcharts

I had a great time working with SimPy. Most of what I wanted to get done
was straightforward and worked as expected.

Thanks Simpy!

&lt;/pre&gt;</description>
    <dc:creator>Sagi Smolarski</dc:creator>
    <dc:date>2012-05-01T11:51:24</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.simpy.user/1313">
    <title>Obtaining the execution trace of a preempted task?</title>
    <link>http://comments.gmane.org/gmane.comp.python.simpy.user/1313</link>
    <description>&lt;pre&gt;Let's say I have two tasks, T1 (low priority) and T2 (high priority). Each
task needs to execute for 10 seconds on the same resource. Consider the
following example scenario involving T1 and T2:

T1 arrives at time 0.
T2 arrives at time 5, preempting T1
T2 finishes at time 15, and T1 resumes execution
T1 finishes at time 20.
Let's refer to the above data as an "execution trace."

For this simple case, if we know the arrival and completion times of each
task, it's pretty trivial to "reverse engineer" the precise times when each
task was waiting or executing. However, if T1 is a low priority task, and
T1 is preempted by lots of tasks, the problem gets more ugly.

I'm looking for a "hook" in SimPy that gives me a list of the times when T1
was waiting, executing, or suspended.
Is there an easy way to obtain such an execution trace for tasks in SimPy?

This is an other way to look at the question: is there a way to obtain a
history of when a task T1 was in the waitQ or activeQ of a resource?

Yet an other way to &lt;/pre&gt;</description>
    <dc:creator>Forrest Iandola</dc:creator>
    <dc:date>2012-04-26T19:18:47</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.simpy.user/1309">
    <title>Yield in helper function for Process Execution</title>
    <link>http://comments.gmane.org/gmane.comp.python.simpy.user/1309</link>
    <description>&lt;pre&gt;Hi Forrest, you cannot nest generators the way you are trying to in Python.

The correct syntax would be something like this:

*for i in self.helperFunction(): yield i*

...instead of just calling   *self.helperFunction() *

Hope it helps.

&lt;/pre&gt;</description>
    <dc:creator>Sagi Smolarski</dc:creator>
    <dc:date>2012-04-22T09:11:14</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.simpy.user/1307">
    <title>Yield in helper function for Process Execution Method?</title>
    <link>http://comments.gmane.org/gmane.comp.python.simpy.user/1307</link>
    <description>&lt;pre&gt;Hi,

I am implementing a PEM that is intricate and requires quite a few lines of
code. I was hoping to break up the PEM logic into a few different functions
within the Process. To explain my question, I've included a couple of
simple processes below.

## Model components -------------------------------
class Process1(Process): # does a "hold" in a helper function for 10 time
units
    def run(self):
        self.helperFunction()
        yield hold,self,0 # boiler-plate. every PEM needs a yield statement.
        print "Instance of Process1 completed at: %s"%self.sim.now()

    def helperFunction(self): # This doesn't actually make the run()
function block!!!
        yield hold,self,10

class Process2(Process): # does a "hold" in the PEM for 10 time units
    def run(self):
        yield hold,self,10
        print "Instance of Process2 completed at: %s"%self.sim.now()

## Model and Experiment ---------------------------
s1=Simulation()
s1.initialize()
proc1 = Process1(sim=s1)
s1.activate(proc1, proc1.run())
s&lt;/pre&gt;</description>
    <dc:creator>Forrest Iandola</dc:creator>
    <dc:date>2012-04-21T22:09:23</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.simpy.user/1302">
    <title>Uniqueness of task names; event names?</title>
    <link>http://comments.gmane.org/gmane.comp.python.simpy.user/1302</link>
    <description>&lt;pre&gt;Using the objected-oriented API, does each SimPy Task need to have a unique
name?

For example, could anything go wrong if I do the following?
self.t1 = Task(name="don't need a name", sim=self.sim)
self.t2 = Task(name="don't need a name", sim=self.sim)
self.t3= Task(name="don't need a name", sim=self.sim)

Also, does it matter if event names are unique? Could anything go wrong
with the following setup?
self.e1 = SimEvent(name="don't need a name", sim=self.sim)
self.e2 = SimEvent(name="don't need a name", sim=self.sim)

Thanks,
Forrest

&lt;/pre&gt;</description>
    <dc:creator>Forrest Iandola</dc:creator>
    <dc:date>2012-04-19T21:31:11</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.simpy.user/1301">
    <title>Signals when Level reach a certain amount</title>
    <link>http://comments.gmane.org/gmane.comp.python.simpy.user/1301</link>
    <description>&lt;pre&gt;Hello,

I have a SimPy model of various vehicle operations, which includes a depot
for parts and fuel.

I would like to send a signal when any particular level reaches a threshold
(to request a refill). I would like to avoid a 'waituntil' in order to keep
runtime low. What is a way to accomplish this, if one exists?

Thank you!

James
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev_______________________________________________
Simpy-users mailing list
Simpy-users&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/simpy-users
&lt;/pre&gt;</description>
    <dc:creator>James Arruda</dc:creator>
    <dc:date>2012-04-18T15:34:18</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.simpy.user/1299">
    <title>Holding can only be done within the PEM context. How to overcome this?</title>
    <link>http://comments.gmane.org/gmane.comp.python.simpy.user/1299</link>
    <description>&lt;pre&gt;My objective is to simulate not only the network communication between
several agents but also, to have the agents processing the messages and
react according to the information within those messages.

Ok a simple example would be, to simulate the packet exchange and
processing for the Spanning Tree Protocol in a Switch Mesh Network.


&lt;/pre&gt;</description>
    <dc:creator>Carlos Ferreira</dc:creator>
    <dc:date>2012-04-17T20:22:44</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.simpy.user/1295">
    <title>How to yield an event periodically into schedulewithout wait in SimPy?</title>
    <link>http://comments.gmane.org/gmane.comp.python.simpy.user/1295</link>
    <description>&lt;pre&gt;Hi Tony and all,

I am learning SimPy. Currently I need to call a method periodically until
the simulation ends.

I wrote it like:

import SimPy.Simulation as Simpy

class mod(Simpy.Process):
    def do(self):
        print(Simpy.now(), "Do!")
        yield Simpy.hold, self, 5.0

class trigger(Simpy.Process):
    def ACTIONS(self):
        while True:
            for i in self.target.do():
                yield i
            yield Simpy.hold, self, 1.0

    def set_target(self, tar):
        self.target = tar


Simpy.initialize()
obj = mod()
tri = trigger()
tri.set_target(obj)
tri.start(at=0.0)
Simpy.simulate(until=100.0)

Due to the statements in the while True:,it should yield the target.do() by
every 1.0 time unit. Therefore the output should be:

0.0 Do!
1.0 Do!
2.0 Do!
......

But in fact, it yield the target.do() by every 6.0 time unit (the yield holds
to wait until thetarget.do() finishes):

0.0 Do!
6.0 Do!
12.0 Do!

I wonder that how can I yield the target function periodically into the
schedule, wit&lt;/pre&gt;</description>
    <dc:creator>Skyler Sun</dc:creator>
    <dc:date>2012-04-17T04:34:42</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.simpy.user/1293">
    <title>Simpy Cheatsheets</title>
    <link>http://comments.gmane.org/gmane.comp.python.simpy.user/1293</link>
    <description>&lt;pre&gt;Hi

Thanks to Steven Kennedy the cheat sheets have been updated.

The new versions are up on the Web site:
http://simpy.sourceforge.net/SimPy_Manual/Cheatsheets.html
and in the HG repo.

Cheers
  Karen

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
&lt;/pre&gt;</description>
    <dc:creator>Karen</dc:creator>
    <dc:date>2012-04-13T06:59:12</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.simpy.user/1291">
    <title>SimEvents Example</title>
    <link>http://comments.gmane.org/gmane.comp.python.simpy.user/1291</link>
    <description>&lt;pre&gt;

After looking through the documentation on SimEvents I still had to do a little bit of experimentation to figure out exactly how they worked.  Here is a modified version of an existing example that I think solidifies some unclear points (although I admit this information exists in bits in pieces across the site and former SimPy-User posts):

1)  A single signal will stockpile if it is received while no processes are waiting (waitevent) or queuing (queueevent), meaning that the next process to wait or queue will reactivate immediately.2)  Not more than one signal will stockpile.3)  How to use eventName.waits and eventName.queues to test for empty sequences.  This is useful for the case where you do not want to issue a signal if no processes are waiting or queuing.
#---------------------------------------------------------------from SimPy.Simulation import *
class Wait_Or_Queue(Process):    def waitup(self,myEvent):      # PEM illustrating "waitevent"                                   # wait for "myEvent" to&lt;/pre&gt;</description>
    <dc:creator>Mark M</dc:creator>
    <dc:date>2012-04-12T19:44:26</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.simpy.user/1288">
    <title>wiring a simpy simulation to a streaming web server</title>
    <link>http://comments.gmane.org/gmane.comp.python.simpy.user/1288</link>
    <description>&lt;pre&gt;Hi, I'm trying to feed the output of a real time simulation to a browser
via a web server in a streaming manner.

For example, this simple timer simulation:

timer.py:
1:  from SimPy.SimulationRT import *
2:
3:  class Timer(Process):
4:     def tick(self):
5:         while True:
6:             yield hold, self, 1.0
7:             print '&amp;lt;div&amp;gt;time is: %.2f&amp;lt;/div&amp;gt;'%self.sim.now()
8:
9:  class TimerSim(SimulationRT):
10:     def run(self):
11:        self.initialize()
12:        self.timer = Timer(name="timer", sim=self)
13:        self.activate(self.timer, self.timer.tick())
14:        self.simulate(until=50.0, real_time=True)
16:
17: def generate():
18:     TimerSim().run()

.. where I should be able to push the time to the browser instead of the
"print" statement in line 7.

on the server side, I could use a server which supports streaming like
CherryPy:

1: def sim(self):
2:   cherrypy.response.headers['Content-Type'] = 'text/html'
3:   import timer
4:   def content_generator(): # content generator which yie&lt;/pre&gt;</description>
    <dc:creator>Sagi Smolarski</dc:creator>
    <dc:date>2012-04-11T19:20:42</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.simpy.user/1287">
    <title>Holding can only be done within the PEM context. Howto overcome this?</title>
    <link>http://comments.gmane.org/gmane.comp.python.simpy.user/1287</link>
    <description>&lt;pre&gt;Hello all!

I'm trying to implement a simple Network Simulator (message passing between
agents) and I'm having trouble with the event system of SimPy. Since i can
only hold the Process's by using the yield method within the Process PEM
function, I'm having trouble in creating a Socket example, where an Agent
waits for a Message Receiving.

Can someone help me with this? I'v searched in several advanced SimPy usage
examples but I was unable to find an example to follow.


Thanks for any assistance!

&lt;/pre&gt;</description>
    <dc:creator>Carlos Ferreira</dc:creator>
    <dc:date>2012-04-09T16:34:41</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.python.simpy.user/1285">
    <title>OO API - .sim parameter with __init__() method</title>
    <link>http://comments.gmane.org/gmane.comp.python.simpy.user/1285</link>
    <description>&lt;pre&gt;
Hey,

I am having difficulty using the object oriented API with processes containing an __init__() method.
The only reference I see in the documentation is the line:
Example 2, with an __init__ method (snippet):class Car(Process):def __init__(self,name):Process.__init__(self,name=name, sim=self.sim)aSim = Simulation() aSim.initialize() c=Car(name=”Mine”, whichSim=aSim)
which didn't appear to work.  I am currently receiving the error:
FatalSimerror: 'SimPy: activate: Process a_process not in activating Simulation instance'

Can someone provide a simple working example of how the above code should be written so that the car appears in the correct simulation instance?
- Mark       ------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2_______________________________________________
Simpy-u&lt;/pre&gt;</description>
    <dc:creator>Mark M</dc:creator>
    <dc:date>2012-04-08T17:24:47</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.python.simpy.user">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.python.simpy.user</link>
  </textinput>
</rdf:RDF>

