title: leader election process on uppaal
body: <p>I have such a connection in my topology:</p>
  
  <p><a href="https://courses.cs.ttu.ee/w/images/e/e5/ITI0130_Lab3_IEEE1394.pdf" rel="nofollow noreferrer">https://courses.cs.ttu.ee/w/images/e/e5/ITI0130_Lab3_IEEE1394.pdf</a></p>
  
  <p>I have written such a declaration to run a simulation on uppaal:</p>
  
  <pre><code>const int N=7;
  const int d1=1;
  const int d2=2;
  const int d3=3; 
  typedef int[0,N] id_t;
  id_t Id;
  const bool nb[N+1][N+1]=
  {
  {0,0,0,0,0,0,0,0},
  {0,0,1,0,1,1,0,0},
  {0,1,0,1,0,0,1,0},
  {0,0,1,0,0,0,0,0},
  {0,1,0,0,0,0,0,0},
  {0,1,0,0,0,0,0,0},
  {1,0,1,0,0,0,0,1},
  {0,0,0,0,0,0,1,0}
  };
  
  urgent chan req[N+1];
  urgent chan ack[N+1];
  id_t req_[N+1], ack_[N+1];
  </code></pre>
  
  <p>The array specifies the connection of nodes with indexes. For instance, node "0" is not connected with any node, so it has 0 in all the indexes. But node "1" is connected with node "2, 4, 5". So it has 1 in that indexes.</p>
  
  <p>Now I get two leaders when I run the simulation.</p>
  
  <p>I have to connect node "0" to the topology to get one leader when I run the simulation.</p>
  
  <p>I have tried to connect node "0" to some nodes, but it hasn't worked.</p>
  
  <p>This is my model:</p>
  
  <p><img src="https://i.stack.imgur.com/ss0ja.png" alt="enter image description here"></p>
  
  <p>How can I manage to do this? </p>