Ejemplo n.º 1
0
 def __init__(self, b):
   GregorySTV.__init__(self, b)
   MethodPlugin.__init__(self)
   
   self.prec = 2
   self.weakTieBreakMethod = "forward"
   self.threshName = ["Droop", "Static", "Whole"]
   self.delayedTransfer = "On"
   self.batchElimination = "Losers"
Ejemplo n.º 2
0
    def allocateRound(self):
        "Add quota allocation."

        GregorySTV.allocateRound(self)
        self.quota.append(0)
        # These are copied from the previous round.  Depending on the situation,
        # they will be reused or updated in place.
        if self.R > 0:
            self.quota[self.R] = self.quota[self.R - 1]
            self.thresh[self.R] = self.thresh[self.R - 1]
Ejemplo n.º 3
0
    def __init__(self, b):
        GregorySTV.__init__(self, b)
        MethodPlugin.__init__(self)

        self.prec = 2
        self.weakTieBreakMethod = "forward"
        self.threshName = ["ERS97", "Dynamic", "Fractional"]
        self.delayedTransfer = "On"
        self.batchElimination = "LosersERS97"
        self.numStages = 0
Ejemplo n.º 4
0
  def allocateRound(self):
    "Add quota allocation."

    GregorySTV.allocateRound(self)
    self.quota.append(0)
    # These are copied from the previous round.  Depending on the situation,
    # they will be reused or updated in place.
    if self.R > 0:
      self.quota[self.R] = self.quota[self.R-1]
      self.thresh[self.R] = self.thresh[self.R-1]
Ejemplo n.º 5
0
 def __init__(self, b):    
   GregorySTV.__init__(self, b)
   MethodPlugin.__init__(self)
   
   self.prec = 2
   self.weakTieBreakMethod = "forward"
   self.threshName = ["ERS97", "Dynamic", "Fractional"]
   self.delayedTransfer = "On"
   self.batchElimination = "LosersERS97"
   self.numStages = 0
Ejemplo n.º 6
0
    def preCount(self):
        GregorySTV.preCount(self)

        # Data structures needed only for ERS97 rules.
        # ERS97 rules contain stages and substages, but each of these is a round.
        # Example:
        #   R S
        #   ---
        #   1 1
        #   2 2
        #   3
        #   4 3
        # We need to compute all of the rounds but only print the stages.
        # Round 3 is a substage between stages 2 and 3.  Substages occur when
        # transferring ballots from eliminated candidate and different ballots
        # have different values.  The stage involves transferring all of the
        # ballots, but each substage involves transferring ballots of a given
        # value.
        self.quota = []
        self.S = 0
        self.stages = []  # Stores rounds for each stage
Ejemplo n.º 7
0
 def preCount(self):
   GregorySTV.preCount(self)
   
   # Data structures needed only for ERS97 rules.
   # ERS97 rules contain stages and substages, but each of these is a round.
   # Example:
   #   R S
   #   ---
   #   1 1
   #   2 2
   #   3
   #   4 3
   # We need to compute all of the rounds but only print the stages.
   # Round 3 is a substage between stages 2 and 3.  Substages occur when
   # transferring ballots from eliminated candidate and different ballots
   # have different values.  The stage involves transferring all of the
   # ballots, but each substage involves transferring ballots of a given
   # value.
   self.quota = []
   self.S = 0
   self.stages = []    # Stores rounds for each stage
Ejemplo n.º 8
0
 def postCount(self):
     GregorySTV.postCount(self)
     self.numStages = self.S + 1
Ejemplo n.º 9
0
 def postCount(self):
   GregorySTV.postCount(self)
   self.numStages = self.S+1