Coder Social home page Coder Social logo

queueing-tool's People

Contributors

dependabot[bot] avatar djordon avatar josegonzalez avatar lauploix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

queueing-tool's Issues

Error using draw() and animate() functions

I'm trying to use draw() and animate() functions, however both functions raise the same error which is:

"AttributeError: 'LineCollection' object has no property 'offset_position'"

I have followed all the requirements in documentation and I use Python 3.7.

Would you please help me fix this issue?

Thanks

Change queue discipline

Hi. Is there any way to change queue discipline? For example instead using FIFO use Shortest Job Next or set custom priority depending on some function of waiting time and job size?

AttributeError: 'AxesSubplot' object has no attribute 'set_axis_bgcolor'

Drawing a queueing network results in pyplot (matplotlib) throwing the following exception:

Traceback (most recent call last):
  File "scripts/data_processing/07_queue_net.py", line 39, in <module>
    network.draw(figsize=(12, 2))
  File "/usr/local/lib/python3.6/dist-packages/queueing_tool/network/queue_network.py", line 735, in draw
    scatter_kwargs=scatter_kwargs, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/queueing_tool/graph/graph_wrapper.py", line 414, in draw_graph
    ax.set_axis_bgcolor(kwargs.get('bgcolor', [1, 1, 1, 1]))
AttributeError: 'AxesSubplot' object has no attribute 'set_axis_bgcolor' 

It looks like set_axis_bgcolor was replaced with set_facecolor (source)

Test functions against theory.

  • Test QueueServer to make sure that Little's Law applies.
  • Test Burke's Theorem for Markovian QueueServer.
  • Make sure routing is handled correctly.
  • Make a Jacksonian service network and test it against theory.

Queue Size Initialization

I was looking through the documentation and can not see any public method of function that allows users to set the initial queue sizes of any of the queues in the network.

Is there a way to set initial queue lengths for defined queues within the network. The reason I ask is that I would like to stop the simulation and some point and collect all the information, and then restart it at a later time using all the conditions from when I last ended it.

get_agent_data() does not provide enough information

I'm using both get_queue_data() and get_agent_data() functions where get_queue_data() provides all the output data regarding the queue, yet get_agent_data() provides only two columns of all the mentioned data and does not provide information regarding the agent type itself.

Write unit tests for simple routines.

  • Test QueueNetwork sorting
  • Test QueueServer sorting
  • Test agent count
  • Test max agent mechanism
  • Test simple InfoAgent and InfoQueue network
  • Test simple ResourceQueue and ResourceAgent network
  • Test adjacency2graph with graph2dict

Test all QueueNetwork methods

  • initialize
  • transitions
  • set_transitions
  • collect_data
  • stop_collecting_data
  • data_queues
  • data_agents
  • draw
  • show_active
  • show_type
  • next_event_description
  • animate
  • simulate
  • reset_colors
  • clear
  • clear_data

Use smarter clustering in minimal_random_graph

I want this function to find a random graph that has the "fewest" edges possible and is also connected*. Right now it doesn't do this. Moreover, it's very slow.

Use a faster clustering algorithm.

*Actually, this isn't exactly what I want either, but it's kinda close.

Directing two queue to one node

I'm encountering an issue in defining the q_args for 'num_servers' in case of connecting two queues to the same node. In my case each node has number of servers. Let's say two queues (labeled '2' and '3') arrive to the same node and the node's number of servers is '5'. Thus the 'num_servers' for queue '2' is set to '5', and 'num_servers' for queue '3' is set to '5'. But the thing is that I want both queues total 'num_servers' to be '5', not individually. Is this possible? How should I define the q_args in this case?

AttributeError: 'DiGraph' object has no attribute 'new_vertex_property'

When attempting to run the line:

g.new_vertex_property('pos')

from this link, I am getting this error:

AttributeError Traceback (most recent call last)
in ()
----> 1 g.new_vertex_property('pos')
2 pos = {}
3 for v in qn.g.nodes():
4 if v == 0:
5 pos[v] = [0, 0.8]

AttributeError: 'DiGraph' object has no attribute 'new_vertex_property'

I am running Python 2.7.10 on macOS Sierra. Please let me know if you have any suggestions. I'm currently reviewing the Graph docs to see how the inheritance from Graph to DiGraph is getting lost.

get_queue_data() provides "0" for the agent departure time.

Hi

In very minor cases the departure time for an agent is "0", where on the other hand the service start time is ok. This raises issue when calculating the service time, which results in a negative value. I also have the screenshot attached:

Screenshot 2022-12-06 at 00 46 24

The problem happens in the end of the simulation time. In my opinion because not all the agents manage to leave the network before the simulation finishes. Is there a way (e.g. a trigger) to fix this minor issue?

Regards

Create new NetworkX compatible versions of QueueNetwork class

The QueueNetwork class will need an new version of the following methods:

  • __init__
  • initialize
  • transitions
  • set_transitions
  • draw
  • show_active
  • show_type
  • _update_all_colors
  • _update_graph_colors
  • _simulate_next_event
  • animate
  • _update_kwargs
  • reset_colors
  • copy
  • _get_queues

Create a congestion network queueing class.

  • Has two different blocking types:
    • Blocking After Service: Handles blocking by holding agents back in their current queue for the exact amount of time before sending them to their desired queue.
    • Repetitive Service Blocking. Handles blocking by having the blocked agent recieve an aditional service.

Distribution based on file

I'm trying to use this repository to simulate a scenario in which I have peak hours, which varies per weekday and month, for example. Given that, I thought about using n steps of simulation and retrieve the arrival rate from a given file (step n would retrieve line n of the queried file). So, for example, I have a custom Distribution` class:

class Distributions:

    def __init__(self, site_id, start_date, end_date, granularity):
        self.arrival_rate_df = query.arrival_rate(site_id, start_date, end_date, granularity).dropna()
        self.service_rate_df = query.average_seconds(site_id, start_date, end_date, granularity).dropna()

    def arrival_rate_start(self, t):
        return 1 / self.arrival_rate_df.iloc[t]['number_of_vehicles']

However, even using q.simulate(n=iterations_int), the iteration is converted to time, I guess, cause when I debug the code I have a float variable inside arrival_rate_start, so I cannot fetch the data. Is it possible to model this kind of scenario with this tool?

'OutEdgeView' object has no attribute 'sort'

No longer compatible with NetworkX? I'm running OSX 10.11.6 and python 2.7.13, it's the same with python3.
This is my code:

import queueing_tool as qt  
import networkx as nx  
g = qt.generate_random_graph(20, seed=3)

And this is the crash:

Traceback (most recent call last):
  File "example.py", line 3, in <module>
    g = qt.generate_random_graph(200, seed=3)
  File "/usr/local/lib/python2.7/site-packages/queueing_tool/graph/graph_generation.py", line 121, in generate_random_graph
    g = minimal_random_graph(num_vertices, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/queueing_tool/graph/graph_generation.py", line 225, in minimal_random_graph
    g = QueueNetworkDiGraph(g.to_directed())
  File "/usr/local/lib/python2.7/site-packages/queueing_tool/graph/graph_wrapper.py", line 243, in __init__
    edges.sort()
AttributeError: 'OutEdgeView' object has no attribute 'sort'

QueueServer.clear() can use predefined deque.clear()

In QueueServer class method clear is defined as follows:

    def clear(self):
        """Clears out the queue. Removes all arrivals, departures, and
        queued agents from the :class:`.QueueServer`, resets
        ``num_arrivals``, ``num_departures``, ``num_system``, and the clock to
        zero. It also clears any stored ``data`` and the server is then
        set to inactive.
        """
        self.data = {}
        self._num_arrivals = 0
        self._oArrivals = 0
        self.num_departures = 0
        self.num_system = 0
        self._num_total = 0
        self._current_t = 0
        self._time = infty
        self._next_ct = 0
        self._active = False
        self.queue = collections.deque()
        inftyAgent = InftyAgent()
        self._arrivals = [inftyAgent]
        self._departures = [inftyAgent]

In line self.queue = collections.deque(), I would rather use self.queue.clear(), as it's already implemented in collections.deque.
I'll show user scenario where this approach would be more user-friendly. Let's say I overwrite self.queue attr:

class MyQueueServer(qt.QueueServer):
    def __init__(self, some_custom_argument, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.queue = MyQueue(some_custom_argument)

If in QueueServer.clear it would be self.queue.clear() I could make sure that MyQueue object has clear method and it would be end of the work, for now I have to override whole QueueServer.clear to make it works in my way. It's not big deal, but if someone else overwrite self.queue, he may be wondering why his custom self.queue is gone after clearing.

Create new NetworkX compatible versions of graph_generation

  • New _test_graph function.
  • New adjacency2graph function.
  • New generate_transition_matrix function.
  • New generate_random_graph function.
  • New generate_pagerank_graph function.
  • New minimal_random_graph function.
  • New set_types_random function.
  • New set_types_pagerank function.

Error using function generate_random_graph

Hi there,

Using queueing_tool with basic example from [1], following error appear:

>>> import queueing_tool as qt
>>> g = qt.generate_random_graph(5, seed=10)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "~/.env/lib/python3.5/site-packages/queueing_tool/graph/graph_generation.py", line 121, in generate_random_graph
    g = minimal_random_graph(num_vertices, **kwargs)
  File "~/.env/lib/python3.5/site-packages/queueing_tool/graph/graph_generation.py", line 225, in minimal_random_graph
    g = QueueNetworkDiGraph(g.to_directed())
  File "~/.env/lib/python3.5/site-packages/queueing_tool/graph/graph_wrapper.py", line 243, in __init__
    edges.sort()
AttributeError: 'OutEdgeView' object has no attribute 'sort'

[1] http://queueing-tool.readthedocs.io/en/latest/network.html

Tighten up codebase

This includes the following:

  • Remove vType property map dependence.
  • Maybe create vertices2edge function.

Zeros in service and departure time present in queue data

I simulate a simple network
`from numpy.random import uniform
g = nx.DiGraph()
g.add_node(0, type='generate')
g.add_node(1, type='advance')
g.add_node(2, type='terminate')

g.add_edge(0,1, edge_type=1)
g.add_edge(1,2, edge_type=2)
g.add_edge(2,2, edge_type=0)

def arr_f(t):
return t + np.random.exponential(300)

def ser_f(t):
return t + 330

q_classes = {1: qt.QueueServer, 2: qt.QueueServer}
q_args = {
1: {
'arrival_f': arr_f,
'service_f': lambda t: t,
'AgentFactory': qt.GreedyAgent
},
2: {
'num_servers': 1,
'service_f': ser_f
}
}

qn = qt.QueueNetwork(g=g, q_classes=q_classes, q_args=q_args, seed=13)
qn.initialize(edge_type=1)
qn.clear_data()
qn.start_collecting_data()
qn.simulate(n=6000)
data = qn.get_queue_data(edge_type=2)
df = pd.DataFrame(data, columns=['arrival','service','departure','num_queued','num_total','q_id'])
df['waiting_time'] = df['service'] - df['arrival']
df['service_time'] = df['departure'] - df['service']
df.loc[np.argmin(df['waiting_time'])-10:np.argmin(df['waiting_time']), :]
`

and get zeros in service and departure time

Screen Shot 2021-02-10 at 10 19 04

Is it correct behavour or bug?

Changing the number of servers in Queueserver not compatible with a non-empty queue

Changing the number of servers does not work properly when the queue of the server is not empty. This does not work for increasing or decreasing the amount of servers:

  1. Increasing the amount of servers:
  • When departures occur and there is a queue, an agent is from the queue is placed in service. However, this will only make sure that already existing servers are being occupied, this will never put an agent in a newly created server (when there is a queue)
  • When an arrivals occurs and the queue is empty, it is added to the new severs because the following logic is used in next_event: Add arrival to departures list if self.num_system <= self.num_servers: When the queue is empty this is always true. However, when there are agents in the queue, this logic fails. Furthermore, when there is a queue, we want the agents in the front of the queue to be added to the newly created servers, not the new arrivals.
  1. Decreasing the amount of servers:
  • When departures occur, an agent is from the queue is placed in service. So existing servers will always stay occupied, even when the number of servers is reduced as this is not checked.
  • When new arrivals occur and there is a queue, the arrivals are placed in the queue. So this will never reduce the amount of people in service.

Suggested solution:

Increasing the amount of severs:

  • Add agents from the queue to the new servers at the time when increasing the amount of servers.
    This can be done by added the following code to the function set_num_severs(self, n)
            if n > self.num_servers:
                for i in range(n - self.num_servers):
                    if len(self.queue) > 0:
                        agent = self.queue.popleft()
                        if self.collect_data and agent.agent_id in self.data:
                            self.data[agent.agent_id][-1][1] = self._current_t

                        agent._time = self.service_f(self._current_t)
                        agent.queue_action(self, 1)
                        heappush(self._departures, agent)
                        self._update_time()

Decreasing the amount of servers:

  • Add a check on the number of agents in service versus the amount of severs in the function next_event(self): when processing a departure.

if len(self.queue) > 0 & (self.num_system + 1 - len(self.queue)) < self.num_servers:

I have added my updated code for reference:
queue_servers.zip

Test all Graph methods

  • adjacency2graph
  • generate_transition_matrix
  • generate_random_graph
  • generate_pagerank_graph
  • prepare_graph
  • add_edge_lengths
  • graph2dict

Rename class attributes and parameters to be more Pythonic

There are a few attributes, such as: nAgents, nEdges, nEvents, nVertices, nBlocked, and nNodes, that are un-pythonic, and should probably be renamed to num_*. Keep the old names as properties but promote the new names in the documentation.

Host the documentation somewhere.

  • Set up the github branch with the docs.
  • Write a quick introduction page.
  • Make a graph for display on webpage.
  • Proofread the docs.
  • Change the readme to point to docs

num_arrivals attribute of Queuesever is not correct

When simulating a queue for 5 arrivals and getting the status of the queue, I get the following:

Out[22]: QueueServer:0. Servers: 4, queued: 0, arrivals: [5, 6], departures: 3, next time: 0.2

The arrivals attribute dispays [5, 6]. According to the documentation this is:

num_arrivals (list) A list with two entries. The first slot is the total number of arrivals, while the second slot is the number of arrivals from outside the network.

Based on this definition I expected both number to be 5 as I am using the Queuesever standalone and there will only be arrivals from outside the network.

Queue simulates for too long when simulating for amount of time

I understand that the time put into queue.simulate() is the minimum amount of simulation time. However, I think limiting the simulation time to the requested amount of time can be a nice improvement as it becomes a problem when having very low arrival rates.

Example:
I want to simulate a queue which has different arrival rate every 5 time steps. However, if the initial arrival rate is very low, e.g. 0.05 (uniform) the first arrival will only occur after 20 time steps. In this case the arrival rates for time steps 5-10, 10-15 and 15-20 are never used to simulate the queue (which may generate arrivals).

Therefore I am requesting a feature that simulates the queue no longer than the amount of time that is put into the simulate function.

Agents always served at time t (no queues or delays)

I'm using custom csvs to define both service and arrival rates.
For arrival rate, I have something like:

timestamp,number_of_vehicles
2020-01-01 00:00:00,26
2020-01-01 01:00:00,31
2020-01-01 02:00:00,26
2020-01-01 03:00:00,23

Which defines the number of vehicles that arrive per hour.
For service rate, I have:

timestamp,time_in_place1,time_in_place2,time_in_place3,time_in_place4, ...
01/01/20 00:00,456.0,131.0,168.0,93.0, ...
01/01/20 01:00,404.0,111.0,286.0,92.0, ...
01/01/20 02:00,491.0,163.0,272.0,140.0, ...
01/01/20 03:00,442.0,148.0,463.0,91.0, ...

Which define the mean time (seconds) a vehicle stays at placex per hour.

I have defined, after some research, my arrival and service rates such as:

    # ------------------------------------------------------------------------------------------------------------------
    # Arrival rates
    # ------------------------------------------------------------------------------------------------------------------
    def arrival_rate(self, t):
        self.update_iteration(t)
        return t + 1 / self._arrival_rate_df.iloc[self._iteration]['number_of_vehicles']

    # ------------------------------------------------------------------------------------------------------------------
    # Service rates
    # ------------------------------------------------------------------------------------------------------------------
    def service_rate_order(self, t):
        self.update_iteration(t)
        return t + self._service_rate_df.iloc[self._iteration]['time_in_place1']

After creating my network with 6 nodes and simulating, however, no matter what I do with the rates, it seems that all agents are served as they arrive. With no delays or queues happening. Collecting the data, I have something like:

          0      1      2    3    4     5
0      26.0   26.0   26.0  0.0  1.0   0.0
1      57.0   57.0   57.0  0.0  1.0   0.0
2      83.0   83.0   83.0  0.0  1.0   0.0
3     106.0  106.0  106.0  0.0  1.0   0.0
4     126.0  126.0  126.0  0.0  1.0   0.0
..      ...    ...    ...  ...  ...   ...
192   901.0    0.0    0.0  0.0  0.0  11.0

I wonder how this could be happening.

Another question that I have, is, given that I can correctly simulate what I need to, how do I validate the results? I know how many cars should arrive by hour and how long should they be in the system per hour. But, from the data obtained when collecting data, I cannot match agents to get the total time, per agent, spend in the system, for example.

@djordon, sorry to be opening an issue. I think it's more about me unable to figure it out how to use the tool properly, but any help would be appreciated.

Compatibility with Python 3.7

The package does not seem to install with python 3.7.

pip3 install queueing-tool

returns

Installing collected packages: queueing-tool
  Running setup.py install for queueing-tool ... error
    Complete output from command /Users/mohammt1/.virtualenvs/totem/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/88/h0b7gdt53sdf4_13d8q4q3n8012sxd/T/pip-install-u316q5r0/queueing-tool/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/88/h0b7gdt53sdf4_13d8q4q3n8012sxd/T/pip-record-5q8_088q/install-record.txt --single-version-externally-managed --compile --install-headers /Users/mohammt1/.virtualenvs/totem/bin/../include/site/python3.7/queueing-tool:
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.13-x86_64-3.7
    creating build/lib.macosx-10.13-x86_64-3.7/queueing_tool
    copying queueing_tool/__init__.py -> build/lib.macosx-10.13-x86_64-3.7/queueing_tool
    copying queueing_tool/union_find.py -> build/lib.macosx-10.13-x86_64-3.7/queueing_tool
    creating build/lib.macosx-10.13-x86_64-3.7/queueing_tool/graph
    copying queueing_tool/graph/graph_generation.py -> build/lib.macosx-10.13-x86_64-3.7/queueing_tool/graph
    copying queueing_tool/graph/graph_wrapper.py -> build/lib.macosx-10.13-x86_64-3.7/queueing_tool/graph
    copying queueing_tool/graph/graph_functions.py -> build/lib.macosx-10.13-x86_64-3.7/queueing_tool/graph
    copying queueing_tool/graph/__init__.py -> build/lib.macosx-10.13-x86_64-3.7/queueing_tool/graph
    copying queueing_tool/graph/graph_preparation.py -> build/lib.macosx-10.13-x86_64-3.7/queueing_tool/graph
    creating build/lib.macosx-10.13-x86_64-3.7/queueing_tool/network
    copying queueing_tool/network/__init__.py -> build/lib.macosx-10.13-x86_64-3.7/queueing_tool/network
    copying queueing_tool/network/queue_network.py -> build/lib.macosx-10.13-x86_64-3.7/queueing_tool/network
    creating build/lib.macosx-10.13-x86_64-3.7/queueing_tool/queues
    copying queueing_tool/queues/queue_servers.py -> build/lib.macosx-10.13-x86_64-3.7/queueing_tool/queues
    copying queueing_tool/queues/__init__.py -> build/lib.macosx-10.13-x86_64-3.7/queueing_tool/queues
    copying queueing_tool/queues/agents.py -> build/lib.macosx-10.13-x86_64-3.7/queueing_tool/queues
    copying queueing_tool/queues/queue_extentions.py -> build/lib.macosx-10.13-x86_64-3.7/queueing_tool/queues
    running build_ext
    building 'queueing_tool.network.priority_queue' extension
    creating build/temp.macosx-10.13-x86_64-3.7
    creating build/temp.macosx-10.13-x86_64-3.7/queueing_tool
    creating build/temp.macosx-10.13-x86_64-3.7/queueing_tool/network
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/Users/mohammt1/Homebrew/opt/ncurses/include -I/Users/mohammt1/Homebrew/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c queueing_tool/network/priority_queue.c -o build/temp.macosx-10.13-x86_64-3.7/queueing_tool/network/priority_queue.o
    queueing_tool/network/priority_queue.c:19405:21: error: no member named 'exc_type' in 'struct _ts'
        *type = tstate->exc_type;
                ~~~~~~  ^
    queueing_tool/network/priority_queue.c:19406:22: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        *value = tstate->exc_value;
                         ^~~~~~~~~
                         curexc_value
    /Users/mohammt1/Homebrew/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    queueing_tool/network/priority_queue.c:19407:19: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        *tb = tstate->exc_traceback;
                      ^~~~~~~~~~~~~
                      curexc_traceback
    /Users/mohammt1/Homebrew/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    queueing_tool/network/priority_queue.c:19414:24: error: no member named 'exc_type' in 'struct _ts'
        tmp_type = tstate->exc_type;
                   ~~~~~~  ^
    queueing_tool/network/priority_queue.c:19415:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        tmp_value = tstate->exc_value;
                            ^~~~~~~~~
                            curexc_value
    /Users/mohammt1/Homebrew/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    queueing_tool/network/priority_queue.c:19416:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        tmp_tb = tstate->exc_traceback;
                         ^~~~~~~~~~~~~
                         curexc_traceback
    /Users/mohammt1/Homebrew/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    queueing_tool/network/priority_queue.c:19417:13: error: no member named 'exc_type' in 'struct _ts'
        tstate->exc_type = type;
        ~~~~~~  ^
    queueing_tool/network/priority_queue.c:19418:13: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        tstate->exc_value = value;
                ^~~~~~~~~
                curexc_value
    /Users/mohammt1/Homebrew/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    queueing_tool/network/priority_queue.c:19419:13: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        tstate->exc_traceback = tb;
                ^~~~~~~~~~~~~
                curexc_traceback
    /Users/mohammt1/Homebrew/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    queueing_tool/network/priority_queue.c:19474:24: error: no member named 'exc_type' in 'struct _ts'
        tmp_type = tstate->exc_type;
                   ~~~~~~  ^
    queueing_tool/network/priority_queue.c:19475:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        tmp_value = tstate->exc_value;
                            ^~~~~~~~~
                            curexc_value
    /Users/mohammt1/Homebrew/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    queueing_tool/network/priority_queue.c:19476:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        tmp_tb = tstate->exc_traceback;
                         ^~~~~~~~~~~~~
                         curexc_traceback
    /Users/mohammt1/Homebrew/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    queueing_tool/network/priority_queue.c:19477:13: error: no member named 'exc_type' in 'struct _ts'
        tstate->exc_type = local_type;
        ~~~~~~  ^
    queueing_tool/network/priority_queue.c:19478:13: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        tstate->exc_value = local_value;
                ^~~~~~~~~
                curexc_value
    /Users/mohammt1/Homebrew/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    queueing_tool/network/priority_queue.c:19479:13: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        tstate->exc_traceback = local_tb;
                ^~~~~~~~~~~~~
                curexc_traceback
    /Users/mohammt1/Homebrew/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    queueing_tool/network/priority_queue.c:19501:24: error: no member named 'exc_type' in 'struct _ts'
        tmp_type = tstate->exc_type;
                   ~~~~~~  ^
    queueing_tool/network/priority_queue.c:19502:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        tmp_value = tstate->exc_value;
                            ^~~~~~~~~
                            curexc_value
    /Users/mohammt1/Homebrew/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:240:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    queueing_tool/network/priority_queue.c:19503:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        tmp_tb = tstate->exc_traceback;
                         ^~~~~~~~~~~~~
                         curexc_traceback
    /Users/mohammt1/Homebrew/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/include/python3.7m/pystate.h:241:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    queueing_tool/network/priority_queue.c:19504:13: error: no member named 'exc_type' in 'struct _ts'
        tstate->exc_type = *type;
        ~~~~~~  ^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    20 errors generated.
    error: command 'clang' failed with exit status 1

    ----------------------------------------
Command "/Users/mohammt1/.virtualenvs/totem/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/88/h0b7gdt53sdf4_13d8q4q3n8012sxd/T/pip-install-u316q5r0/queueing-tool/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/88/h0b7gdt53sdf4_13d8q4q3n8012sxd/T/pip-record-5q8_088q/install-record.txt --single-version-externally-managed --compile --install-headers /Users/mohammt1/.virtualenvs/totem/bin/../include/site/python3.7/queueing-tool" failed with error code 1 in /private/var/folders/88/h0b7gdt53sdf4_13d8q4q3n8012sxd/T/pip-install-u316q5r0/queueing-tool/

I tried the same on Travis-CI with python 3.7 and got

gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -coverage -fPIC -I/opt/python/3.7.1/include/python3.7m -c queueing_tool/network/priority_queue.c -o build/temp.linux-x86_64-3.7/queueing_tool/network/priority_queue.o
    queueing_tool/network/priority_queue.c: In function ‘__Pyx__ExceptionSave’:
    queueing_tool/network/priority_queue.c:19405:19: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
         *type = tstate->exc_type;
                       ^
    queueing_tool/network/priority_queue.c:19406:20: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
         *value = tstate->exc_value;
                        ^
    queueing_tool/network/priority_queue.c:19407:17: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
         *tb = tstate->exc_traceback;
                     ^
    queueing_tool/network/priority_queue.c: In function ‘__Pyx__ExceptionReset’:
    queueing_tool/network/priority_queue.c:19414:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
         tmp_type = tstate->exc_type;
                          ^
    queueing_tool/network/priority_queue.c:19415:23: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
         tmp_value = tstate->exc_value;
                           ^
    queueing_tool/network/priority_queue.c:19416:20: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
         tmp_tb = tstate->exc_traceback;
                        ^
    queueing_tool/network/priority_queue.c:19417:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
         tstate->exc_type = type;
               ^
    queueing_tool/network/priority_queue.c:19418:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
         tstate->exc_value = value;
               ^
    queueing_tool/network/priority_queue.c:19419:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
         tstate->exc_traceback = tb;
               ^
    queueing_tool/network/priority_queue.c: In function ‘__Pyx__GetException’:
    queueing_tool/network/priority_queue.c:19474:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
         tmp_type = tstate->exc_type;
                          ^
    queueing_tool/network/priority_queue.c:19475:23: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
         tmp_value = tstate->exc_value;
                           ^
    queueing_tool/network/priority_queue.c:19476:20: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
         tmp_tb = tstate->exc_traceback;
                        ^
    queueing_tool/network/priority_queue.c:19477:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
         tstate->exc_type = local_type;
               ^
    queueing_tool/network/priority_queue.c:19478:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
         tstate->exc_value = local_value;
               ^
    queueing_tool/network/priority_queue.c:19479:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
         tstate->exc_traceback = local_tb;
               ^
    queueing_tool/network/priority_queue.c: In function ‘__Pyx__ExceptionSwap’:
    queueing_tool/network/priority_queue.c:19501:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
         tmp_type = tstate->exc_type;
                          ^
    queueing_tool/network/priority_queue.c:19502:23: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
         tmp_value = tstate->exc_value;
                           ^
    queueing_tool/network/priority_queue.c:19503:20: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
         tmp_tb = tstate->exc_traceback;
                        ^
    queueing_tool/network/priority_queue.c:19504:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
         tstate->exc_type = *type;
               ^
    queueing_tool/network/priority_queue.c:19505:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
         tstate->exc_value = *value;
               ^
    queueing_tool/network/priority_queue.c:19506:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
         tstate->exc_traceback = *tb;
               ^
    error: command 'gcc' failed with exit status 1
    
    ----------------------------------------

The command "pip install -e ." failed and exited with 1 during .

Is there any work around to make it work with 3.7?

cannot run in example

Hello, I run the example file named "example_grocery_store.py". On my Mac+VMware Fusion+ Ubuntu 16.04+python3.5 settings, it shows "AttributeError: 'QueueNetworkDiGraph' object has no attribute 'node'". Detailed information can be seen in the screen snap. Can anybody tell me how to fix this issue? Thanks!
image
截屏2019-11-07下午12 42 36

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.