Skip to content

Simplest simulation model of using broadcast for a group of nodes to vote on an issue

License

Notifications You must be signed in to change notification settings

andrewasfa/simple-pythone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-pythone

Simplest simulation model of using broadcast for a group of nodes to vote on an issue

Usage instructions

  • Pull the code, you should have two files:

    • mobilephone.py : defines the class for the nodes
    • simdriver.py : defines the main program to run which constructs the nodes, generates the question, generates responses, etc.
  • Run: python simdriver.py 10 2 , where 10 is the number of nodes we want to create, and 2 is the number of options the questions have.

  • At the end of the calculation you will receive output like this:

Key, count 1 3 
Key, count 2 7 

Key 2 wins here, because it has 7 votes over 3.

  • Folders will be creates in the Testdata directory. It will contain information respective to each node.

About

Simplest simulation model of using broadcast for a group of nodes to vote on an issue

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages