djordon / queueing-tool Goto Github PK
View Code? Open in Web Editor NEWSimulator for queueing networks written in Python
Home Page: http://queueing-tool.readthedocs.org/
License: MIT License
Simulator for queueing networks written in Python
Home Page: http://queueing-tool.readthedocs.org/
License: MIT License
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
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?
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_graph
function.vertices2edge
function.graph2dict
function.shortest_paths
function.QueueServer
to make sure that Little's Law applies.QueueServer
.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.
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.
QueueNetwork
sortingQueueServer
sortingInfoAgent
and InfoQueue
networkResourceQueue
and ResourceAgent
networkadjacency2graph
with graph2dict
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
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.
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?
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.
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:
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
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
Somehow, agents are leaving the network when they shouldn't.
The time argument t
should be first, making it easier to create a partial function using functools.partial
.
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?
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'
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.
_test_graph
function.adjacency2graph
function.generate_transition_matrix
function.generate_random_graph
function.generate_pagerank_graph
function.minimal_random_graph
function.set_types_random
function.set_types_pagerank
function.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
This includes the following:
vType
property map dependence.vertices2edge
function.set_nServers
delay_service
next_event_description
simulate
clear
copy
This is an experimental feature, but it's real: https://docs.travis-ci.com/user/caching/
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
Is it correct behavour or bug?
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:
Suggested solution:
Increasing the amount of severs:
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:
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
adjacency2graph
generate_transition_matrix
generate_random_graph
generate_pagerank_graph
prepare_graph
add_edge_lengths
graph2dict
_test_graph
function.add_edge_lengths
function._prepare_graph
function._set_queues
function.The table of contents doesn't render right in the installation page.
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.
Also, test to make sure python 2.6+ works.
"(it’s edge index)"... grammar. Also looks like the headers have an extra tick "`".
This method needs to accept numpy matrices as an input. Also, dicts
need values can be arrays with length the number of vertices.
Hi
Is there a possibility when starting the simulation there will be already some amount of agents in each server?
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.
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.
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.
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?
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!
For the following functions:
adjacency2graph
set_transitions
draw
simulate
QueueNetwork
'sQueueServer
'sdata_queues
show_type
generate_random_graph
animate
The variable here should be kwargs
, not save_kwargs
: https://github.com/djordon/queueing-tool/blob/master/queueing_tool/network/queue_network.py#L605
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.