Stefan Scherfke wrote:
> Hello everyone,
>
> on a first glimpse there doesn't seem to be performance overhead, but
> I'll test it with a larger example next week to get more reliable
> information about that.
>
> I also took a first closer look at the other Simulation*.py files and
> they are 80–95 % the same code as Simulation.py. I think before I
> start to transfer our changes from Simulation.py to 3*2500 lines of
> nearly the same code, we should consider refactoring everything. Most
> of the changes in the other simulations add only a few extra lines or
> methods.
>
> In my opinion it should be possible to extract classes like Process
> and implement a default Simulation class from which SimulationRT and
> the others will inherit. With that, we might reduce the LOC from ~10k
> to maybe ~3k and remove dublicate code which will improve further
> development and maintenance drastically.
>
> How do you feel about this?
>
> Regards,
> Stefan
>
>
>
> Am 13.07.2008 um 18:24 schrieb kgmuller:
>
>> Stefan,
>> This is promising and definitely wanted for future versions of
>> SimPy. The
>> one thing which needs to be looked at is the performance overhead of
>> the
>> extra function call, e.g.
>>
>> def now():
>> global sim
>> return sim.now()
>>
>>
>> Re: If you'd like
>> to add this to the develoment version, we could clean up our changes
>> and apply them to Simulation*.py as well.
>>
>> Yes, please, do!
>>
>> Klaus Müller
>>
>> -----Original Message-----
>> From:
simpy-users-bounces <at> lists.sourceforge.net
>> [mailto:
simpy-users-bounces <at> lists.sourceforge.net] On Behalf Of Stefan
>> Scherfke
>> Sent: Donnerstag, 10. Juli 2008 15:48
>> To:
simpy-users <at> lists.sourceforge.net
>> Subject: [Simpy-users] Simultaneous simulations
>>
>> Hi everyone,
>>
>> in April 08, Ontje suggested simultaneous simulations for SimPy. A
>> Simulation-class should encapsulate all the global stuff needed for a
>> simulation (initialize(), activate(), now(), …) so that you can run
>> multiple simulations concurrently (e.g. in different threads) by
>> calling simA.initialize() … simA.simulate() … simX.initialize() … See
>>
http://sourceforge.net/mailarchive/forum.php?thread_name=200804091432.55594
>> .
>> The_COM%
40gmx.de&forum_name=simpy-users
>> for details.
>>
>> Meanwhile we have implemented that for Simulation.py and are
>> considering to release our changes as a patch for
1.9.1. If you'd like
>> to add this to the develoment version, we could clean up our changes
>> and apply them to Simulation*.py as well.
>>
>> I have attached our current modifications so that you can see what we
>> want to do, testSimPy.py still runs.

>>
>> Regards,
>> Stefan
>>
>>
>>
>
>