fix alldifferent example

master
Martin Lackner 2022-02-16 14:53:54 +01:00
rodzic 6d21dd8470
commit 29e8b8081d
1 zmienionych plików z 2 dodań i 5 usunięć

Wyświetl plik

@ -19,14 +19,11 @@ for iterations, votes in enumerate(iterator):
apportionments = set()
for method in methods:
try: # in case of ties an exception occurs because tiesallowed=False
apportionments.add(
apportionments.add(
tuple(
app.compute(method, votes, seats, tiesallowed=False, verbose=False)
app.compute(method, votes, seats, verbose=False)
)
)
except Exception:
pass
if len(apportionments) == len(methods):
break