case_2and3
index
/home/shotaro/Workspace/sotsuron/sotsuron/simple3/case_2and3.py

# -*- coding:utf-8 -*-

 
Modules
       
mpld3
numpy
matplotlib.pyplot
mpld3.plugins

 
Classes
       
Meeting
Person

 
class Meeting
    Simulate a meeting with "simple3" situation.
 
Give keyword arguments:
 
    K = 20 # Time limit
    N = 6 # a number of participants
    S = 10 # a number of ideas for each participants
    a = 2 # the dimension of an idea
    p = 0.5 # probability that a person speak
    draw = True # draw image od don't
 
Output:
 
    self.minutes: list of
                  ( idea(which is vector with a dimension)
                  , who(person_id in the list "self.membes"))
    self.k: stopped time (=len(self.minutes))
 
  Methods defined here:
__init__(self, K=20, N=6, S=10, a=2, p=0.5, draw=True)
after(self)
callback(self)
gather_people(self)
gather people for the meeting.
 
You can edit what ideas they have in here.
init(self)
progress(self)
meeting progress

 
class Person
     Methods defined here:
__init__(self, S, a, p=0.5)
chose_idea(self, idea)
gather(self)
make person to participate the meeting.
has_idea(self)
a person has self.S ideas with self.a dimension.