Questions tagged [simpy]

A discrete-event simulation framework for Python

SimPy is a process-based discrete-event simulation framework based on standard Python. Its event dispatcher is based on Python’s generators and can also be used for asynchronous networking or to implement multi-agent systems (with both, simulated and real communication).

341 questions
-1
votes
1 answer

Can you do you a closed loop system using SimPy on Python?

I am trying to model a garage which has cars available to drive. Then as times goes by cars need some repairs and they become unavailable. Once the car is repaired it goes back to the garage. I was wondering if you can model such a system where you…
-1
votes
2 answers

Simpy: How to monitor resource use

I am trying to understand how to collect data for computing resource use, for example, the average number of customers waiting in line. I looked at the documentation at the following link, but it is just too much for me. I am looking for an…
4Walk
  • 9
  • 2
-1
votes
1 answer

Create a global dictionary to keep track of iterations

I have created a train simulation in simpy, but to keep a track of the trains ahead, I plan to use a dictionary, where key values can act as 'Signal' status. The keys are basically signal numbers. The preceding trains can check if the next signal is…
-1
votes
1 answer

Networkx Shortest Path nodes movement

How can I make a function in Python that allows of the movement of the packets from source to target using the shortest path? The shortest_path() function just returns the names of the nodes. How can I make the packet move through that particular…
SSD Group
  • 1
  • 2
-1
votes
2 answers

python 2.7 SimPy ImportError

I have a virtualenv with python 2.7 and pip 9.0.1 I have installed SimPy with pip install SimPy but when i try to import import SimPy >>> import SimPy Traceback (most recent call last): File "", line 1, in ImportError: No module…
Al-Alamin
  • 1,438
  • 2
  • 15
  • 34
-1
votes
1 answer

Calling functions within SimPy processes

I am trying to write a program for process communication using Python and SimPy. If I put all code in a single function and call simpy.Environment().process(function_one()) everything runs perfectly. However, if I call another function within…
wir963
  • 181
  • 1
  • 9
-1
votes
1 answer

Can't cacth nameError in python

Here is my code: from SimPy.Simulation import * class Message(Process): def arrive(self, destination): yield hold, self, 2 try: print "%s %s going to %s" % (now(), self.name, destination.name) …
tobi
  • 75
  • 1
  • 7
-2
votes
0 answers

Wrong output in python simulation (SimPy library)

I'm using SimPy library for relatively simple hospital simulation. There are receptionists, nurses, acu and ed doctors. For each of them I assign the timeout. The point is to collect timeouts for each entity that visits patient. Then for each…
WizzVard
  • 1
  • 1
-2
votes
1 answer

Explain the working of a SimPy registration desk problem

The code is for a simulation of registration desk with 2 personnel and 10 students where, it takes 5 min to complete the registration and 3 min is the waiting period before the next student can start registration. I m new to simulation and I fail to…
Lexs
  • 1
-2
votes
1 answer

I want go get many items from FilterStore in Simpy Python

I want to get many items from FilterStore . factory.stock_part.items FilterStore is list type [{'order_id': 534066215, 'id': 0}, {'order_id': 534066215, 'id': 1}, {'order_id': 534066215, 'id': 2}, {'order_id': 534066215, 'id': 3}, {'order_id':…
Stjnu
  • 11
  • 2
-3
votes
1 answer

When not to rebuild the wheel?

I just graduated and started my career as a junior software engineer. The one thing I am struggling with right now is not knowing when to stop doing something from scratch. Last week I was told to simulate a warehouse environment and tell my boss…
1 2 3
22
23