Jonathan Leivent | 12 May 2013 02:35
Picon

SimPy 3: zombie timeout events

Here's an unexpected behavior in SimPy 3.  Sorry if it sounds a bit too 
much like a bad horror movie.

I have a large simulation (thousands of processes), and was measuring 
several things about it, including the event queue length 
(len(env._events)).  After the simulation ran for a while, the event 
queue length was growing much larger than I could account for just based 
on how many processes exist.  I then measured both the length of the 
event queue and the number of events on it that have callbacks. 
Interestingly, the number of events with callbacks never grows very 
high, but the number without callbacks - which I'll refer to as zombie 
events (since they won't do anything but die when step finally gets to 
them) - grows very high.  Further investigation shows that all the 
zombies are timeout events (type simpy.core.Timeout).

This simulation makes heavy use of interrupts.  That's probably the 
source of the zombies.  Unfortunately, it would be very hard to change 
the simulation design to use substantially fewer interrupts.  One very 
common type of loop is like this:

   while True:
       self.adjust_state()
       delay = self.compute_delay_to_next_adjustment()
       try:
           yield self.env.timeout(delay)
       except simpy.Interrupt:
           continue

where successive timeouts after recalculating following an interrupt are 
usually earlier than the timeout they interrupted.  Fortunately, there 
(Continue reading)

Mercedeh TariVerdi | 2 May 2013 18:07
Picon

update the priorities in waitQ and re-sort it

Hi, 

I'm trying to figure out how I can use SimPy for my problem. I need to modify the priorities of entities in resource.waitQ each time one of the servers start service to an entities. I read the documents on priorityQ and at some point it is suggested to delete entity and re-introduce it to the queue. However, I could not implement it to waitQ. I really appreciate any help on updating and resorting entities in waitQ somehow. 

Bests, 
Mercedeh

--
Mercedeh TariVerdi, Graduate Student
Transportation Engineering
Department of Civil Engineering
University of Maryland at College Park
Email: Mercedeh <at> umd.edu
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Simpy-users mailing list
Simpy-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/simpy-users
Jonathan Leivent | 3 May 2013 04:26
Picon

getting determinism in Simpy is hard!

I'm amazed at how hard it is to get a python program - a simpy 
simulation - to run deterministically.  I'd like to do this to help 
debug my simulation, and am having a very hard time.

I'm using simpy 3 with pseudo-random number generators from numpy, 
careful to initialize the numpy.random.seed to the same value very early 
in each run (prior to importing anything other than numpy).  I am not 
using set or dict, since these create non-deterministic iterators. 
Instead, I'm using collections.OrderedDict - even though the specific 
order doesn't matter to me when iterating over such dictionaries, that 
there is a specific deterministic order is sufficient.  I don't call 
sorted on things that contain unordered object references - since that 
can also create nondeterminism.  I have examined all uses of "<" and ">" 
to make sure none do comparisons on unordered object references.

I didn't see any obvious sources of non-determinism in the simpy 
sources, either.

The simulation iterates over tens of thousands of events before any 
non-determinism begins - which I can tell my calling 
numpy.random.random_sample() after every call to step - comparing these 
values across multiple runs with the same seed.  Of course, after the 
first case of non-determinism shows up this way, things vary 
considerably from run to run.

Has anyone else had a similar issue?  If so, can you tell me what you 
did to track down the source of non-determinism?

My environment is: Ubuntu 12.10 32bit, using aptana studio 3 (which is 
eclipse 3.7.2 with python pydev), running standard python 2.7.3, with a 
very recent (about a month old) simpy 3 hg pull.

Thanks in advance for any help you can offer.
-- Jonathan Leivent

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
Mario Ceresa | 2 May 2013 01:16
Picon
Gravatar

simpy 3 concurrency or parallelism?

Hi everybody,

first of all, thank you for your work on Simpy, I just discovered it
and it really intrigued me!

I would like to use it to model agent-based systems, however, it's not
clear to me how big the models can be.

AFAIG simpy achieves concurrency through corutines. Is that correct?
How can I run a model on multiple processors?

Thanks and regards,

Mario

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
Stefan Scherfke | 19 Apr 2013 08:27
Gravatar

SimPy 3 Status Update

It’s been a while since our last status update and we have to admit that not
much happened in the default branch during that time.

The most visible changes are improved stacktraces for Python 2, better
"__repr__" implementations and that events now store their "value"---it can now
be accessed at any time via a property of that name.

In the background, we have been working on a new implementation of SimPy’s
resources and implemented a first draft for the monitoring capabilities.

Cheers,
Ontje & Stefan
Attachment (smime.p7s): application/pkcs7-signature, 2772 bytes
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Simpy-users mailing list
Simpy-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/simpy-users
Yanshuo Sun | 17 Apr 2013 15:43
Picon
Favicon

Any approach or idea to simulate Batch Service Queue

Hi All,

I am quite new to SimPy, but I love it so much. It's very powerful and easy to implement. 

I am working on a shuttle service simulation problem. Several vehicles are available to transport passengers waiting at multiple hotels to several tour centers. I formulate each vehicle as a moving server providing batch service. The service time is travel time from hotel to tour center. After transporting passengers to tour center, the vehicle will return empty. Then the server (vehicle) becomes available again. 

I have known three classes of congestion points, Resource, Level and Store. I just think that none of them are suitable to model a server with batch service. 

I think there must be some way to tackle this. Or someone has encountered similar problems before. I am just expecting any idea on that.


Sorry if this is a duplicate mail.

Thanks,
Yanshuo
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Simpy-users mailing list
Simpy-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/simpy-users
Majken Tranby | 16 Apr 2013 21:36

question about your website



Would you ever post this on your website?

Just a quick note to let you know that Enthought launched Canopy this past week. Canopy includes the base scientific/analytic stack packages (like EPD did) as well as an analysis desktop. The free version is Canopy Express. More info here: https://www.enthought.com/products/canopy/
--
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´ (¸.·´ Majken E. Tranby

Enthought Inc
515 Congress Avenue, Suite 2100
Austin, TX 78701



--
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´ (¸.·´ Majken E. Tranby

Enthought Inc
515 Congress Avenue, Suite 2100
Austin, TX 78701
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Simpy-users mailing list
Simpy-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/simpy-users
Yanshuo Sun | 16 Apr 2013 19:11
Picon
Gravatar

Any approach or idea to simulate Batch Service Queue

Hi All, 

I am quite new to SimPy, but I love it so much. It's very powerful and easy to implement. 

I am working on a shuttle service simulation problem. Several vehicles are available to transport passengers waiting at multiple hotels to several tour centers. I formulate each vehicle as a moving server providing batch service. The service time is travel time from hotel to tour center. After transporting passengers to tour center, the vehicle will return empty. Then the server (vehicle) becomes available again. 

I have known three classes of congestion points, Resource, Level and Store. I just think that none of them are suitable to model a server with batch service. 

I think there must be some way to tackle this. Or someone has encountered similar problems before. I am just expecting any idea on that.

Thanks,
Yanshuo

--
Yanshuo Sun, Graduate Research Assistant
Transportation Engineering Program, University of Maryland
0122D Engineering Lab Building, College Park, MD 20742 
Email: yssun <at> umd.edu
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Simpy-users mailing list
Simpy-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/simpy-users
barantoppare | 3 Apr 2013 19:33
Picon

simpy - earliest deadline first

Hi,
I am learning simpy to simulate our processes in bank. So far, resources about bank examples were very useful. However now i need a dynamic priority system. In our bank, each customer segment has a service level agreement (SLA) and prioritization is done with earliest deadline first method and i want to simulate this. Can u give an example about dynamic prioritization is it possible with current simpy module? If not, can u suggest me another method (maybe another language). Since i am not an IT worker, i cant dive deeply  in programming language so i need some examples to compare.
Thank you for your help
Sincerely
Baran Toppare
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
Simpy-users mailing list
Simpy-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/simpy-users
barantoppare | 3 Apr 2013 19:47
Picon

simpy - earliest deadline first

Hi,
I am learning simpy to simulate our processes in bank. So far, resources about bank examples were very useful. However now i need a dynamic priority system. In our bank, each customer segment has a service level agreement (SLA) and prioritization is done with earliest deadline first method and i want to simulate this. Can u give an example about dynamic prioritization is it possible with current simpy module? If not, can u suggest me another method (maybe another language). Since i am not an IT worker, i cant dive deeply  in programming language so i need some examples to compare.
Thank you for your help
Sincerely
Baran Toppare
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
Simpy-users mailing list
Simpy-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/simpy-users
Neill Byrne | 11 Mar 2013 13:59
Picon

Support of get filters in Simpy 3.0

Hi,
Will there/is there support of get filters from stores in Simpy 3.0. There does'nt seem to be any mention in the docs. I find them extremely useful in Simpy 2.0
 
Regards,
Neill
 
 
------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
Simpy-users mailing list
Simpy-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/simpy-users

Gmane