diff --git a/pyRCV2/method/meek.py b/pyRCV2/method/meek.py index 8530dda..f22519d 100644 --- a/pyRCV2/method/meek.py +++ b/pyRCV2/method/meek.py @@ -46,6 +46,12 @@ class MeekSTVCounter(BaseSTVCounter): BaseSTVCounter.__init__(self, *args) self.candidates = SafeDict([(c, MeekCountCard()) for c in self.election.candidates]) + # Withdraw candidates + for candidate in self.election.withdrawn: + __pragma__('opov') + self.candidates[candidate].state = CandidateState.WITHDRAWN + __pragma__('noopov') + self._quota_tolerance = Num('1.0001') def reset(self): @@ -117,7 +123,7 @@ class MeekSTVCounter(BaseSTVCounter): __pragma__('noopov') remaining_value = Num(0) break - elif count_card.state == CandidateState.EXCLUDED: + elif count_card.state == CandidateState.EXCLUDED or count_card.state == CandidateState.WITHDRAWN: # Excluded candidate has keep value 0, so skip over this candidate pass elif count_card.state == CandidateState.ELECTED: