In [1]:
%run imports.py


/Users/amin/anaconda/lib/python2.7/site-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')

In [2]:
x = Bidirectional_Ring(6)



In [3]:
LCR(x)


--------------
Running LCR on
[P3 -> {P2, P5}, P2 -> {P4, P3}, P4 -> {P0, P2}, P0 -> {P1, P4}, P1 -> {P5, P0}, P5 -> {P3, P1}]
Round 1
P2.status is non-leader
P0.status is non-leader
P1.status is non-leader
Round 2
P3.status is non-leader
Round 3
P4.status is non-leader
Round 4
Round 5
Round 6
P5.status is leader
LCR Terminated
Message Complexity: 14
Time Complexity: 6
------------------
Out[3]:
<datk.core.algs.LCR instance at 0x10a648f80>

In [4]:
x.start_simulation()


Simulation started on [P3 -> {P2, P5}, P2 -> {P4, P3}, P4 -> {P0, P2}, P0 -> {P1, P4}, P1 -> {P5, P0}, P5 -> {P3, P1}]
canvas is set to frame
canvas is set to frame
canvas is set to frame
canvas is set to frame
canvas is set to frame
canvas is set to frame
canvas is set to frame
canvas is set to frame
GUI is set up

In [ ]: