diff --git a/docs-source/source/usage.rst b/docs-source/source/usage.rst index a2b6f207..11a8978b 100644 --- a/docs-source/source/usage.rst +++ b/docs-source/source/usage.rst @@ -433,14 +433,16 @@ We also offer additive satisfaction functions, where the satisfaction for a set of projects is equal to the sum of the satisfaction of each individual project. The class :py:class:`~pabutools.election.satisfaction.additivesatisfaction.AdditiveSatisfaction` implements such functions. Its constructor takes a function as a parameter that maps -instance, profile, ballot, and project to a score. As an example, we demonstrate +instance, profile, ballot, project, and pre-computed values to a score. The pre-computed +argument is used to pass fixed parameters to the function that can be used +for expensive computations not to be done more than once. As an example, we demonstrate how to define the cardinality satisfaction function. .. code-block:: python from pabutools.election import AdditiveSatisfaction - def cardinality_sat_func(instance, profile, ballot, project): + def cardinality_sat_func(instance, profile, ballot, project, precomputed_values): return int(project in ballot) class Cardinality_Sat(AdditiveSatisfaction): diff --git a/docs/_modules/pabutools/analysis/category.html b/docs/_modules/pabutools/analysis/category.html index 8c848068..e2c5f2a0 100644 --- a/docs/_modules/pabutools/analysis/category.html +++ b/docs/_modules/pabutools/analysis/category.html @@ -322,6 +322,10 @@

Source code for pabutools.analysis.category

             app_total_cost += project.cost
             for category in project.categories:
                 app_cost_per_category[category] += project.cost
+        if app_total_cost == 0:
+            raise ValueError(
+                "Category proportionality can only be computed for instances with at least one non-empty ballot."
+            )
         for category in categories:
             proportional_app_cost_per_category[category] += (
                 app_cost_per_category[category]
diff --git a/docs/_modules/pabutools/analysis/profileproperties.html b/docs/_modules/pabutools/analysis/profileproperties.html
index ed65058d..7626fe73 100644
--- a/docs/_modules/pabutools/analysis/profileproperties.html
+++ b/docs/_modules/pabutools/analysis/profileproperties.html
@@ -308,6 +308,8 @@ 

Source code for pabutools.analysis.profileproperties

The median length of the ballots in the profile. """ + if profile.num_ballots() == 0: + return 0 ballot_lengths = np.zeros(profile.num_ballots()) index = 0 for ballot in profile: @@ -356,6 +358,8 @@

Source code for pabutools.analysis.profileproperties

The median cost of the ballots in the profile. """ + if profile.num_ballots() == 0: + return 0 ballot_costs = np.zeros(profile.num_ballots()) index = 0 for ballot in profile: @@ -404,6 +408,8 @@

Source code for pabutools.analysis.profileproperties

The median approval score of projects. """ + if len(instance) == 0: + return 0 return float( np.median([frac(profile.approval_score(project)) for project in instance]) )
@@ -446,6 +452,8 @@

Source code for pabutools.analysis.profileproperties

The median score assigned to a project. """ + if len(instance) == 0: + return 0 return float( np.median([frac(profile.total_score(project)) for project in instance]) )
diff --git a/docs/_modules/pabutools/election/profile/approvalprofile.html b/docs/_modules/pabutools/election/profile/approvalprofile.html index 55620aab..6aaa388e 100644 --- a/docs/_modules/pabutools/election/profile/approvalprofile.html +++ b/docs/_modules/pabutools/election/profile/approvalprofile.html @@ -572,7 +572,7 @@

Source code for pabutools.election.profile.approvalprofile

[docs]def get_all_approval_profiles( instance: Instance, num_agents: int -) -> Generator[Iterable[Project]]: +) -> Generator[ApprovalProfile]: """ Returns a generator over all the possible profile for a given instance of a given length. @@ -588,7 +588,8 @@

Source code for pabutools.election.profile.approvalprofile

Generator[Iterable[:py:class:`~pabutools.election.instance.Project`]] Generator over subsets of projects. """ - return product(powerset(instance), repeat=num_agents)
+ for p in product(powerset(instance), repeat=num_agents): + yield ApprovalProfile([ApprovalBallot(b) for b in p], instance=instance)
[docs]class ApprovalMultiProfile(MultiProfile, AbstractApprovalProfile): diff --git a/docs/_modules/pabutools/election/satisfaction/satisfactionmeasure.html b/docs/_modules/pabutools/election/satisfaction/satisfactionmeasure.html index 09d272f2..e4090646 100644 --- a/docs/_modules/pabutools/election/satisfaction/satisfactionmeasure.html +++ b/docs/_modules/pabutools/election/satisfaction/satisfactionmeasure.html @@ -395,7 +395,30 @@

Source code for pabutools.election.satisfaction.satisfactionmeasure

res = 0 for sat in self: res += sat.sat(projects) * self.multiplicity(sat) - return res
+ return res
+ +
[docs] @abstractmethod + def remove_satisfied( + self, sat_bound: dict[AbstractBallot, Number], projects: Iterable[Project] + ) -> GroupSatisfactionMeasure: + """ + Returns a new satisfaction profile excluding the satisfaction measurs corresponding to satisfied voters, i.e., + who have met or exceeded their satisfaction bound for a given collection of projects. + + Parameters + ---------- + sat_bound : dict[str, Number] + A dictionary of ballot names to numbers, specifying for each ballot the satisfaction bound above which + the voter is considered satisfied. Note that the keys are ballot names, and that nothing ensures ballot + names to be unique, so be careful here. + projects : Iterable[:py:class:`~pabutools.election.instance.Project`] + The collection of projects. + + Returns + ------- + :py:class:`~pabutools.election.satisfaction.satisfactionmeasure.GroupSatisfactionMeasure` + The new satisfaction profile. + """
diff --git a/docs/_modules/pabutools/election/satisfaction/satisfactionprofile.html b/docs/_modules/pabutools/election/satisfaction/satisfactionprofile.html index e113149e..19293a53 100644 --- a/docs/_modules/pabutools/election/satisfaction/satisfactionprofile.html +++ b/docs/_modules/pabutools/election/satisfaction/satisfactionprofile.html @@ -261,12 +261,14 @@

Source code for pabutools.election.satisfaction.satisfactionprofile

from collections import Counter from collections.abc import Iterable +from numbers import Number from pabutools.election.satisfaction.satisfactionmeasure import ( SatisfactionMeasure, GroupSatisfactionMeasure, ) -from pabutools.election.instance import Instance +from pabutools.election.instance import Instance, Project +from pabutools.election.ballot.ballot import AbstractBallot from typing import TYPE_CHECKING @@ -305,11 +307,11 @@

Source code for pabutools.election.satisfaction.satisfactionprofile

""" def __init__( - self, - init: Iterable[SatisfactionMeasure] = (), - instance: Instance = None, - profile: Profile = None, - sat_class: type[SatisfactionMeasure] = None, + self, + init: Iterable[SatisfactionMeasure] = (), + instance: Instance = None, + profile: Profile = None, + sat_class: type[SatisfactionMeasure] = None, ) -> None: list.__init__(self, init) GroupSatisfactionMeasure.__init__(self) @@ -339,7 +341,7 @@

Source code for pabutools.election.satisfaction.satisfactionprofile

self.sat_class = sat_class
[docs] def extend_from_profile( - self, profile: Profile, sat_class: type[SatisfactionMeasure] + self, profile: Profile, sat_class: type[SatisfactionMeasure] ) -> None: """ Extends the satisfaction profile with the profile passed as argument using the satisfaction class passed as @@ -372,6 +374,16 @@

Source code for pabutools.election.satisfaction.satisfactionprofile

""" return 1
+
[docs] def remove_satisfied( + self, sat_bound: dict[str, Number], projects: Iterable[Project] + ) -> SatisfactionProfile: + res = SatisfactionProfile( + (s for s in self if s.sat(projects) < sat_bound[s.ballot.name]), + instance=self.instance, + ) + res.sat_class = self.sat_class + return res
+ @classmethod def _wrap_methods(cls, names): def wrap_method_closure(name): @@ -445,20 +457,22 @@

Source code for pabutools.election.satisfaction.satisfactionprofile

""" def __init__( - self, - init: Iterable[SatisfactionMeasure] | dict[SatisfactionMeasure, int] = None, - instance: Instance = None, - profile: Profile = None, - multiprofile: MultiProfile = None, - sat_class: type[SatisfactionMeasure] = None, - inner_sat_class: type[SatisfactionMeasure] = None + self, + init: Iterable[SatisfactionMeasure] | dict[SatisfactionMeasure, int] = None, + instance: Instance = None, + profile: Profile = None, + multiprofile: MultiProfile = None, + sat_class: type[SatisfactionMeasure] = None, + inner_sat_class: type[SatisfactionMeasure] = None, ) -> None: if init is None: init = {} Counter.__init__(self, init) GroupSatisfactionMeasure.__init__(self) if instance is None: - if isinstance(init, SatisfactionMultiProfile) or isinstance(init, SatisfactionProfile): + if isinstance(init, SatisfactionMultiProfile) or isinstance( + init, SatisfactionProfile + ): instance = init.instance elif profile and profile.instance: instance = profile.instance @@ -487,13 +501,16 @@

Source code for pabutools.election.satisfaction.satisfactionprofile

if inner_sat_class: self.sat_class = inner_sat_class else: - if sat_class is None and (isinstance(init, SatisfactionMultiProfile) or isinstance(init, SatisfactionProfile)): + if sat_class is None and ( + isinstance(init, SatisfactionMultiProfile) + or isinstance(init, SatisfactionProfile) + ): self.sat_class = init.sat_class else: self.sat_class = sat_class
[docs] def extend_from_profile( - self, profile: Profile, sat_class: type[SatisfactionMeasure] + self, profile: Profile, sat_class: type[SatisfactionMeasure] ) -> None: """ Extends the satisfaction multiprofile with the profile passed as argument using the satisfaction class passed as @@ -524,7 +541,7 @@

Source code for pabutools.election.satisfaction.satisfactionprofile

self[element] = 1
[docs] def extend_from_multiprofile( - self, profile: MultiProfile, sat_class: type[SatisfactionMeasure] + self, profile: MultiProfile, sat_class: type[SatisfactionMeasure] ) -> None: """ Extends the satisfaction multiprofile with the multiprofile passed as argument using the satisfaction class @@ -547,6 +564,20 @@

Source code for pabutools.election.satisfaction.satisfactionprofile

[docs] def multiplicity(self, sat: SatisfactionMeasure) -> int: return self[sat]
+
[docs] def remove_satisfied( + self, sat_bound: dict[AbstractBallot, Number], projects: Iterable[Project] + ) -> SatisfactionMultiProfile: + res = SatisfactionMultiProfile( + { + s: m + for s, m in self.items() + if s.sat(projects) < sat_bound[s.ballot.name] + }, + instance=self.instance, + ) + res.sat_class = self.sat_class + return res
+ @classmethod def _wrap_methods(cls, names): def wrap_method_closure(name): @@ -567,7 +598,14 @@

Source code for pabutools.election.satisfaction.satisfactionprofile

wrap_method_closure(n) def __reduce__(self): - return self.__class__, (dict(self), self.instance, None, None, None, self.sat_class)
+ return self.__class__, ( + dict(self), + self.instance, + None, + None, + None, + self.sat_class, + )
SatisfactionMultiProfile._wrap_methods( diff --git a/docs/_modules/pabutools/rules/greedywelfare.html b/docs/_modules/pabutools/rules/greedywelfare.html index e2f9c840..92144857 100644 --- a/docs/_modules/pabutools/rules/greedywelfare.html +++ b/docs/_modules/pabutools/rules/greedywelfare.html @@ -259,7 +259,10 @@

Source code for pabutools.rules.greedywelfare

""" from copy import copy from collections.abc import Iterable +from math import inf +from numbers import Number +from pabutools.election import AbstractBallot from pabutools.election.profile import AbstractProfile from pabutools.fractions import frac @@ -279,6 +282,7 @@

Source code for pabutools.rules.greedywelfare

budget_allocation: Iterable[Project], tie_breaking: TieBreakingRule, resoluteness: bool = True, + sat_bounds: dict[AbstractBallot, Number] = None, ) -> Iterable[Project] | Iterable[Iterable[Project]]: """ The inner algorithm for the greedy rule. It selects projects in rounds, each time selecting a project that @@ -324,10 +328,14 @@

Source code for pabutools.rules.greedywelfare

argmax_marginal_score = [] for project in feasible: new_alloc = copy(alloc) + [project] - total_marginal_score = frac( - sats.total_satisfaction(new_alloc) - sats.total_satisfaction(alloc), - project.cost, - ) + if project.cost > 0: + total_marginal_score = frac( + sats.total_satisfaction(new_alloc) + - sats.total_satisfaction(alloc), + project.cost, + ) + else: + total_marginal_score = inf if ( best_marginal_score is None @@ -412,7 +420,9 @@

Source code for pabutools.rules.greedywelfare

def satisfaction_density(proj): total_sat = sat_profile.total_satisfaction([proj]) if total_sat > 0: - return frac(total_sat, proj.cost) + if proj.cost > 0: + return frac(total_sat, proj.cost) + return inf return 0 # We sort based on a tuple to ensure ties are broken as intended @@ -426,7 +436,6 @@

Source code for pabutools.rules.greedywelfare

if project.cost <= remaining_budget: selection.append(project) remaining_budget -= project.cost - return sorted(selection) @@ -485,7 +494,7 @@

Source code for pabutools.rules.greedywelfare

budget_allocation = [] if sat_class is None: if sat_profile is None: - raise ValueError("Satisfaction and sat_profile cannot both be None.") + raise ValueError("sat_class and sat_profile cannot both be None.") else: if sat_profile is None: sat_profile = profile.as_sat_profile(sat_class) diff --git a/docs/_modules/pabutools/rules/maxwelfare.html b/docs/_modules/pabutools/rules/maxwelfare.html index 0a0d259f..78f57612 100644 --- a/docs/_modules/pabutools/rules/maxwelfare.html +++ b/docs/_modules/pabutools/rules/maxwelfare.html @@ -406,7 +406,6 @@

Source code for pabutools.rules.maxwelfare

     else:
         if sat_profile is None:
             sat_profile = profile.as_sat_profile(sat_class=sat_class)
-
     return max_additive_utilitarian_welfare_scheme(
         instance, sat_profile, budget_allocation, resoluteness=resoluteness
     )
diff --git a/docs/_modules/pabutools/rules/mes.html b/docs/_modules/pabutools/rules/mes.html index 5173ebb1..4019858e 100644 --- a/docs/_modules/pabutools/rules/mes.html +++ b/docs/_modules/pabutools/rules/mes.html @@ -257,6 +257,7 @@

Source code for pabutools.rules.mes

 """
 The method of equal shares.
 """
+from itertools import chain
 from copy import copy, deepcopy
 from collections.abc import Iterable
 from numbers import Number
@@ -488,8 +489,10 @@ 

Source code for pabutools.rules.mes

         initial_projects.remove(proj)
     scores = {proj: sat_profile.total_satisfaction([proj]) for proj in initial_projects}
     for proj, score in scores.items():
-        if score <= 0 or proj.cost == 0:
+        if proj.cost == 0:
             initial_projects.remove(proj)
+            if score > 0:
+                initial_budget_allocation.append(proj)
 
     voters_details = [
         MESVoter(sat.ballot, sat, initial_budget, sat_profile.multiplicity(sat))
diff --git a/docs/_sources/usage.rst b/docs/_sources/usage.rst
index a2b6f207..11a8978b 100644
--- a/docs/_sources/usage.rst
+++ b/docs/_sources/usage.rst
@@ -433,14 +433,16 @@ We also offer additive satisfaction functions, where the satisfaction for a set
 of projects is equal to the sum of the satisfaction of each individual project. The class
 :py:class:`~pabutools.election.satisfaction.additivesatisfaction.AdditiveSatisfaction`
 implements such functions. Its constructor takes a function as a parameter that maps
-instance, profile, ballot, and project to a score. As an example, we demonstrate
+instance, profile, ballot, project, and pre-computed values to a score. The pre-computed
+argument is used to pass fixed parameters to the function that can be used
+for expensive computations not to be done more than once. As an example, we demonstrate
 how to define the cardinality satisfaction function.
 
 .. code-block:: python
 
     from pabutools.election import AdditiveSatisfaction
 
-    def cardinality_sat_func(instance, profile, ballot, project):
+    def cardinality_sat_func(instance, profile, ballot, project, precomputed_values):
         return int(project in ballot)
 
     class Cardinality_Sat(AdditiveSatisfaction):
diff --git a/docs/genindex.html b/docs/genindex.html
index d79514d7..6351b237 100644
--- a/docs/genindex.html
+++ b/docs/genindex.html
@@ -1492,6 +1492,14 @@ 

R

    +
  • remove_satisfied() (GroupSatisfactionMeasure method) + +
  • reverse() (ApprovalProfile method)
      diff --git a/docs/objects.inv b/docs/objects.inv index 851c1f72..0668761a 100644 Binary files a/docs/objects.inv and b/docs/objects.inv differ diff --git a/docs/reference/election/profile.html b/docs/reference/election/profile.html index 35373ac9..d2f61fa8 100644 --- a/docs/reference/election/profile.html +++ b/docs/reference/election/profile.html @@ -1929,7 +1929,7 @@

      Contents

      -get_all_approval_profiles(instance: Instance, num_agents: int) Generator[Iterable[Project]][source]#
      +get_all_approval_profiles(instance: Instance, num_agents: int) Generator[ApprovalProfile][source]#

      Returns a generator over all the possible profile for a given instance of a given length.

      Parameters:
      diff --git a/docs/reference/election/satisfaction.html b/docs/reference/election/satisfaction.html index 7565ee67..f311a489 100644 --- a/docs/reference/election/satisfaction.html +++ b/docs/reference/election/satisfaction.html @@ -311,6 +311,7 @@

      Contents

    • GroupSatisfactionMeasure
    • @@ -331,6 +332,7 @@

      Contents

    • SatisfactionMultiProfile.multiplicity()
    • SatisfactionMultiProfile.pop()
    • SatisfactionMultiProfile.popitem()
    • +
    • SatisfactionMultiProfile.remove_satisfied()
    • SatisfactionMultiProfile.setdefault()
    • SatisfactionMultiProfile.subtract()
    • SatisfactionMultiProfile.total()
    • @@ -353,6 +355,7 @@

      Contents

    • SatisfactionProfile.multiplicity()
    • SatisfactionProfile.pop()
    • SatisfactionProfile.remove()
    • +
    • SatisfactionProfile.remove_satisfied()
    • SatisfactionProfile.reverse()
    • SatisfactionProfile.sort()
    • SatisfactionProfile.total_satisfaction()
    • @@ -642,6 +645,29 @@

      Contents

      +
      +
      +abstract remove_satisfied(sat_bound: dict[AbstractBallot, numbers.Number], projects: Iterable[Project]) GroupSatisfactionMeasure[source]#
      +

      Returns a new satisfaction profile excluding the satisfaction measurs corresponding to satisfied voters, i.e., +who have met or exceeded their satisfaction bound for a given collection of projects.

      +
      +
      Parameters:
      +
        +
      • sat_bound (dict[str, Number]) – A dictionary of ballot names to numbers, specifying for each ballot the satisfaction bound above which +the voter is considered satisfied. Note that the keys are ballot names, and that nothing ensures ballot +names to be unique, so be careful here.

      • +
      • projects (Iterable[Project]) – The collection of projects.

      • +
      +
      +
      Returns:
      +

      The new satisfaction profile.

      +
      +
      Return type:
      +

      GroupSatisfactionMeasure

      +
      +
      +
      +
      total_satisfaction(projects: Iterable[Project]) Number[source]#
      @@ -848,6 +874,29 @@

      Contents

      Raises KeyError if the dict is empty.

      +
      +
      +remove_satisfied(sat_bound: dict[AbstractBallot, numbers.Number], projects: Iterable[Project]) SatisfactionMultiProfile[source]#
      +

      Returns a new satisfaction profile excluding the satisfaction measurs corresponding to satisfied voters, i.e., +who have met or exceeded their satisfaction bound for a given collection of projects.

      +
      +
      Parameters:
      +
        +
      • sat_bound (dict[str, Number]) – A dictionary of ballot names to numbers, specifying for each ballot the satisfaction bound above which +the voter is considered satisfied. Note that the keys are ballot names, and that nothing ensures ballot +names to be unique, so be careful here.

      • +
      • projects (Iterable[Project]) – The collection of projects.

      • +
      +
      +
      Returns:
      +

      The new satisfaction profile.

      +
      +
      Return type:
      +

      GroupSatisfactionMeasure

      +
      +
      +
      +
      setdefault(key, default=None, /)#
      @@ -1052,6 +1101,29 @@

      Contents

      Raises ValueError if the value is not present.

      +
      +
      +remove_satisfied(sat_bound: dict[str, numbers.Number], projects: Iterable[Project]) SatisfactionProfile[source]#
      +

      Returns a new satisfaction profile excluding the satisfaction measurs corresponding to satisfied voters, i.e., +who have met or exceeded their satisfaction bound for a given collection of projects.

      +
      +
      Parameters:
      +
        +
      • sat_bound (dict[str, Number]) – A dictionary of ballot names to numbers, specifying for each ballot the satisfaction bound above which +the voter is considered satisfied. Note that the keys are ballot names, and that nothing ensures ballot +names to be unique, so be careful here.

      • +
      • projects (Iterable[Project]) – The collection of projects.

      • +
      +
      +
      Returns:
      +

      The new satisfaction profile.

      +
      +
      Return type:
      +

      GroupSatisfactionMeasure

      +
      +
      +
      +
      reverse(*args)#
      @@ -2130,6 +2202,7 @@

      Contents

    • GroupSatisfactionMeasure
    • @@ -2150,6 +2223,7 @@

      Contents

    • SatisfactionMultiProfile.multiplicity()
    • SatisfactionMultiProfile.pop()
    • SatisfactionMultiProfile.popitem()
    • +
    • SatisfactionMultiProfile.remove_satisfied()
    • SatisfactionMultiProfile.setdefault()
    • SatisfactionMultiProfile.subtract()
    • SatisfactionMultiProfile.total()
    • @@ -2172,6 +2246,7 @@

      Contents

    • SatisfactionProfile.multiplicity()
    • SatisfactionProfile.pop()
    • SatisfactionProfile.remove()
    • +
    • SatisfactionProfile.remove_satisfied()
    • SatisfactionProfile.reverse()
    • SatisfactionProfile.sort()
    • SatisfactionProfile.total_satisfaction()
    • diff --git a/docs/searchindex.js b/docs/searchindex.js index 7d7a0cb9..3af50295 100644 --- a/docs/searchindex.js +++ b/docs/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["index", "installation", "quickstart", "reference/analysis/index", "reference/election/ballot", "reference/election/index", "reference/election/instance", "reference/election/libraries", "reference/election/profile", "reference/election/satisfaction", "reference/fractions", "reference/index", "reference/rules/index", "reference/tiebreaking", "reference/utils", "usage"], "filenames": ["index.rst", "installation.rst", "quickstart.rst", "reference/analysis/index.rst", "reference/election/ballot.rst", "reference/election/index.rst", "reference/election/instance.rst", "reference/election/libraries.rst", "reference/election/profile.rst", "reference/election/satisfaction.rst", "reference/fractions.rst", "reference/index.rst", "reference/rules/index.rst", "reference/tiebreaking.rst", "reference/utils.rst", "usage.rst"], "titles": ["Pabutools: PB as easy as ABC", "Installation", "Quick Start", "Analysis module", "Ballot module", "Election module", "Instance module", "Preference Libraries", "Profile module", "Satisfaction module", "Fractions", "Reference", "Rules module", "Tie-Breaking", "Utils", "Complete Guide"], "terms": {"For": [0, 2, 3, 4, 8, 12, 15], "pun": 0, "see": [0, 2, 4, 6, 8, 9, 12, 15], "awesom": 0, "The": [0, 2, 3, 4, 6, 7, 8, 9, 10, 12, 13, 14, 15], "ar": [0, 1, 2, 3, 4, 6, 8, 9, 10, 12, 13, 15], "complet": [0, 4, 8, 12], "set": [0, 2, 3, 4, 6, 8, 9, 12, 13, 15], "tool": [0, 3, 15], "work": [0, 12], "participatori": [0, 2, 3, 6, 7, 12, 15], "budget": [0, 2, 3, 6, 7, 8, 9, 12, 15], "instanc": [0, 3, 4, 5, 7, 8, 9, 11, 12, 13], "i": [0, 2, 3, 4, 6, 8, 9, 10, 12, 13, 14, 15], "democrat": 0, "us": [0, 2, 3, 4, 6, 7, 8, 9, 10, 12, 15], "alloc": [0, 3, 6, 9, 12, 15], "given": [0, 3, 4, 6, 8, 9, 12, 14, 15], "amount": [0, 3, 4, 6], "monei": [0, 3, 6, 12], "collect": [0, 2, 3, 4, 6, 8, 9, 14, 15], "project": [0, 3, 4, 5, 6, 7, 8, 9, 12, 13, 15], "base": [0, 2, 4, 6, 8, 9, 13, 15], "group": [0, 6, 9, 12], "individu": [0, 9, 15], "prefer": [0, 4, 5, 11, 12], "over": [0, 3, 4, 6, 8, 9, 12, 15], "It": [0, 2, 3, 4, 6, 9, 10, 12, 15], "ha": [0, 4, 6, 8, 9, 12, 15], "been": [0, 2, 4, 6, 8, 9, 12, 15], "invent": 0, "brazil": 0, "late": 0, "80": 0, "": [0, 2, 8, 9, 10, 12], "now": [0, 2, 12], "wide": [0, 15], "implement": [0, 4, 8, 9, 12, 13, 15], "wikipedia": 0, "page": [0, 2, 15], "more": [0, 2, 3, 4, 6, 8, 9, 10, 15], "detail": [0, 7, 8, 9, 12, 15], "In": [0, 4, 6, 8, 9, 15], "thi": [0, 2, 3, 4, 6, 8, 9, 12, 15], "librari": [0, 5, 11], "we": [0, 2, 3, 4, 8, 9, 12, 15], "provid": [0, 2, 8, 9, 10, 12, 13, 15], "handl": [0, 2, 6, 10, 15], "differ": [0, 3, 4, 6, 8, 9, 15], "kind": [0, 3, 6], "togeth": [0, 3, 6, 8, 9], "vote": [0, 2, 6, 15], "rule": [0, 2, 8, 11, 13], "determin": [0, 15], "outcom": [0, 3, 12, 15], "elect": [0, 3, 4, 6, 7, 8, 11, 12, 15], "some": [0, 4, 8, 12, 15], "analyt": 0, "particular": [0, 15], "full": [0, 15], "support": [0, 3, 8, 9, 12, 13, 15], "taken": [0, 8, 15], "from": [0, 1, 2, 3, 4, 6, 8, 9, 10, 12, 13, 15], "pabulib": [0, 7], "refer": [0, 15], "when": [0, 6, 13, 15], "come": 0, "data": [0, 3, 15], "sinc": [1, 2, 4, 9, 15], "pabutool": [1, 2, 7, 8, 12, 13, 15], "host": [1, 15], "pypi": 1, "should": [1, 4, 6, 8, 9, 12, 15], "easi": 1, "pip3": 1, "you": [1, 2, 15], "can": [1, 2, 3, 4, 6, 8, 9, 10, 12, 13, 15], "also": [1, 3, 4, 6, 8, 9, 12, 15], "directli": [1, 12, 15], "download": 1, "sourc": [1, 3, 4, 6, 7, 8, 9, 10, 12, 13, 14], "our": [1, 15], "github": 1, "repositori": 1, "seem": 1, "easier": 1, "have": [2, 4, 6, 8, 9, 12, 15], "instal": 2, "packag": [2, 15], "On": 2, "guid": 2, "through": [2, 4, 9, 15], "simpl": [2, 4], "exampl": [2, 8, 9, 15], "let": 2, "begin": 2, "need": [2, 8, 9, 12, 13], "encod": 2, "least": [2, 3, 4, 8, 9, 15], "limit": [2, 3, 6, 8, 12, 15], "voter": [2, 3, 4, 6, 8, 9, 12, 15], "fundament": [2, 15], "element": [2, 4, 6, 8, 9, 14, 15], "e": [2, 4, 6, 8, 9, 13, 15], "entiti": [2, 4, 6], "upon": [2, 6], "defin": [2, 4, 6, 7, 8, 9, 10, 12], "them": [2, 8, 9, 13, 15], "class": [2, 4, 6, 7, 8, 9, 12, 13, 15], "import": [2, 4, 8, 9, 15], "p1": [2, 15], "1": [2, 3, 8, 9, 12, 15], "constructor": [2, 8, 15], "take": [2, 4, 9, 13, 15], "name": [2, 4, 6, 7, 13, 15], "cost": [2, 3, 6, 8, 9, 12, 13, 15], "p2": [2, 15], "p3": [2, 15], "3": [2, 8, 9, 15], "next": [2, 15], "which": [2, 3, 4, 8, 9, 10, 12, 13, 15], "along": [2, 15], "addit": [2, 4, 6, 8, 9, 12], "inform": [2, 4, 6, 15], "about": [2, 6, 12, 15], "store": [2, 4, 6, 8, 9, 15], "all": [2, 3, 4, 6, 7, 8, 9, 10, 12, 13, 14, 15], "regard": 2, "except": [2, 4, 6, 8, 13], "what": [2, 15], "concern": [2, 4], "instanti": [2, 10, 15], "deriv": [2, 4, 8], "python": [2, 4, 6, 8, 9, 15], "one": [2, 3, 4, 6, 7, 8, 9, 12, 15], "There": 2, "mani": [2, 4, 8, 9], "option": [2, 3, 4, 6, 8, 9, 12, 13, 15], "paramet": [2, 3, 4, 6, 7, 8, 9, 10, 12, 13, 14, 15], "add": [2, 8, 9, 15], "method": [2, 4, 8, 9, 12], "popul": [2, 15], "updat": [2, 4, 6, 8, 9], "budget_limit": [2, 6, 15], "importantli": [2, 6, 9, 15], "ani": [2, 3, 9, 15], "comparison": [2, 3, 12, 15], "between": [2, 3, 6, 13, 15], "two": [2, 3, 4, 6, 8, 9, 10, 15], "g": 2, "equal": [2, 8, 9, 12], "ad": [2, 6, 8, 15], "p": [2, 15], "anoth": [2, 4, 6, 8, 9, 15], "result": [2, 15], "singl": [2, 13, 15], "essenti": [2, 4], "compon": [2, 15], "A": [2, 3, 4, 6, 7, 8, 9, 10, 12, 13, 14, 15], "gather": [2, 15], "assum": [2, 12, 14], "submit": [2, 4, 6, 15], "approv": [2, 3, 4, 7, 8, 9, 12, 13], "thei": [2, 4, 8, 9, 12, 15], "approvalballot": [2, 4, 5, 8, 15], "follow": [2, 4, 8, 9, 12, 15], "b1": [2, 15], "initi": [2, 6, 8, 9, 12, 15], "b2": [2, 15], "b3": [2, 15], "inherit": [2, 4, 8, 9, 15], "approvalprofil": [2, 3, 5, 7, 8, 15], "append": [2, 4, 8, 9, 15], "list": [2, 3, 8, 9, 12, 13, 15], "readi": [2, 15], "win": 2, "purpos": [2, 4, 8, 15], "modul": [2, 10, 11, 15], "want": 2, "standard": [2, 3, 4, 15], "greedi": [2, 12], "commonli": 2, "citi": 2, "around": 2, "world": 2, "cost_sat": [2, 5, 9, 15], "greedy_utilitarian_welfar": [2, 11, 12, 15], "sat_class": [2, 3, 8, 9, 12, 15], "approxim": [2, 9, 12], "utilitarian": [2, 12], "welfar": [2, 12], "satisfact": [2, 3, 5, 8, 11, 12], "measur": [2, 3, 8, 9, 12], "discuss": [2, 15], "yet": [2, 4], "keep": 2, "mind": 2, "wai": [2, 9, 12, 15], "assess": 2, "qualiti": 2, "total": [2, 3, 6, 8, 9, 12, 15], "select": [2, 3, 4, 6, 9, 12, 13, 15], "appear": [2, 3, 8, 9], "check": [2, 8], "out": [2, 8, 9], "other": [2, 4, 6, 8, 15], "phragm\u00e9n": [2, 12], "sequenti": [2, 12], "share": [2, 12], "sequential_phragmen": [2, 11, 12, 15], "method_of_equal_shar": [2, 11, 12, 15], "outcome1": 2, "outcome2": 2, "contain": [3, 4, 6, 7, 8, 9, 14, 15], "analys": 3, "avg_project_cost": [3, 11], "number": [3, 4, 6, 8, 9, 10, 12, 13, 14, 15], "return": [3, 4, 6, 7, 8, 9, 10, 12, 13, 14, 15], "averag": [3, 15], "type": [3, 4, 6, 7, 8, 9, 10, 12, 13, 14, 15], "funding_scarc": [3, 11], "ratio": 3, "divid": [3, 9, 12, 15], "call": [3, 4, 8], "fund": 3, "scarciti": 3, "median_project_cost": [3, 11], "median": 3, "std_dev_project_cost": [3, 11], "deviat": 3, "sum_project_cost": [3, 11], "avg_approval_scor": [3, 11], "profil": [3, 5, 6, 7, 9, 11, 12, 13], "abstractapprovalprofil": [3, 5, 7, 8, 12], "score": [3, 4, 8, 9, 13, 15], "avg_ballot_cost": [3, 11], "abstractprofil": [3, 5, 8, 9, 12], "ballot": [3, 5, 6, 7, 8, 9, 11, 12, 15], "avg_ballot_length": [3, 11], "length": [3, 8, 9, 15], "avg_total_scor": [3, 11], "abstractcardinalprofil": [3, 5, 7, 8], "assign": [3, 4, 6, 8, 9, 15], "median_approval_scor": [3, 11], "median_ballot_cost": [3, 11], "median_ballot_length": [3, 11], "int": [3, 4, 6, 8, 9, 12, 14, 15], "median_total_scor": [3, 11], "avg_satisfact": [3, 11], "budget_alloc": [3, 6, 15], "iter": [3, 4, 6, 8, 9, 12, 13, 14, 15], "satisfactionmeasur": [3, 5, 8, 9, 12, 15], "comput": [3, 8, 9, 10, 12, 14, 15], "do": [3, 9, 12, 15], "gini_coefficient_of_satisfact": [3, 11], "invert": 3, "bool": [3, 6, 8, 12], "fals": [3, 6, 8, 9, 12, 15], "gini": [3, 14], "coeffici": [3, 14], "true": [3, 6, 8, 12, 15], "minu": [3, 8, 9], "default": [3, 4, 6, 8, 9, 10, 12, 13, 15], "percent_non_empty_hand": [3, 11], "percentag": 3, "mostli": 3, "make": [3, 12, 15], "sens": 3, "though": [3, 6], "oper": [3, 9], "non": [3, 4, 8, 12, 15], "empti": [3, 8, 9, 12], "hand": 3, "satisfaction_histogram": [3, 11], "max_satisfact": 3, "num_bin": 3, "20": 3, "necessari": [3, 7, 8], "plot": [3, 15], "histogram": 3, "each": [3, 4, 8, 9, 12, 15], "bin": 3, "whose": [3, 8], "correspond": [3, 4, 6, 7, 8, 9, 12, 15], "normalis": [3, 9], "valu": [3, 4, 6, 8, 9, 13, 14, 15], "per": [3, 8, 9, 12, 15], "category_proportion": [3, 11], "categori": [3, 4, 6, 8], "exist": 3, "specif": [3, 8, 9, 12, 15], "an": [3, 4, 6, 8, 9, 10, 12, 13, 14, 15], "error": [3, 6, 10, 13, 15], "rais": [3, 4, 6, 8, 9, 10, 13, 15], "specifi": [3, 8, 9], "dedic": 3, "power": 3, "2": [3, 8, 9, 15], "global": 3, "consid": [3, 4, 8], "exponenti": 3, "proportion": 3, "describ": [4, 7, 8, 10, 15], "format": [4, 8, 15], "form": [4, 6, 8], "just": 4, "indic": [4, 6, 8, 12, 15], "complex": 4, "cardin": [4, 7, 8, 9], "introduc": [4, 8, 9, 10, 12, 15], "abstract": [4, 8, 9, 15], "abstractballot": [4, 5, 8, 9], "gener": [4, 6, 8, 9, 12, 14, 15], "first": [4, 8, 9, 12, 13, 14, 15], "These": [4, 6, 8, 15], "cardinalballot": [4, 5, 8, 15], "cumulativeballot": [4, 5, 8, 15], "ordinalballot": [4, 5, 8, 15], "second": [4, 8, 14, 15], "so": [4, 8, 15], "frozen": [4, 8, 15], "behav": [4, 15], "exactli": [4, 6, 9], "regular": 4, "mutabl": [4, 8], "thu": [4, 8, 9, 15], "hashabl": [4, 8], "u": 4, "allow": [4, 8, 9, 15], "kei": [4, 6, 8, 9, 13, 15], "dictionari": [4, 6, 8, 9, 12, 15], "multiprofil": [4, 5, 8, 9], "frozenapprovalballot": [4, 5, 8, 15], "frozencardinalballot": [4, 5, 8, 15], "frozencumulativeballot": [4, 5, 8, 15], "frozenordinalballot": [4, 5, 8, 15], "abstractapprovalballot": [4, 5, 9], "abstractcardinalballot": [4, 5, 9], "abstractcumulativeballot": [4, 5], "abstractordinalballot": [4, 5, 9], "str": [4, 6, 7, 9, 10, 15], "meta": [4, 6, 15], "dict": [4, 6, 7, 8, 9, 12, 15], "none": [4, 6, 7, 8, 9, 12, 13, 15], "abc": [4, 8, 9], "repres": [4, 6, 8, 9, 10, 15], "hint": 4, "identifi": [4, 6], "typic": [4, 6, 8, 12, 15], "string": [4, 6, 10, 15], "could": [4, 6, 12], "gender": 4, "locat": 4, "etc": [4, 15], "frozenballot": [4, 5, 8, 15], "its": [4, 8, 9, 14, 15], "init": [4, 6, 8, 9], "subclass": [4, 6, 8], "initialis": [4, 7, 8, 9], "case": [4, 6, 8, 9, 15], "object": [4, 6, 8, 9, 13], "pass": [4, 6, 8, 9, 12, 15], "attribut": [4, 6, 8, 9, 15], "copi": [4, 6, 8, 9], "keyword": [4, 6, 8, 12], "argument": [4, 6, 8, 9, 12, 14, 15], "arg": [4, 6, 8, 9, 10], "shallow": [4, 6, 8, 9], "new": [4, 6, 8, 9], "difference_upd": [4, 6], "remov": [4, 6, 8, 9, 15], "intersect": [4, 6], "both": [4, 6, 8, 9, 15], "intersection_upd": [4, 6], "itself": [4, 6, 8, 9], "symmetric_differ": [4, 6], "symmetr": [4, 6], "symmetric_difference_upd": [4, 6], "union": [4, 6], "either": [4, 6, 8, 9, 10], "get_random_approval_ballot": [4, 5], "randomappballot": 4, "random": [4, 6, 8], "probabl": [4, 8], "0": [4, 6, 8, 9, 12, 15], "5": [4, 8, 9, 15], "randomli": [4, 6, 8], "tupl": [4, 7, 8, 9, 14], "express": 4, "simpli": [4, 8, 9, 13, 15], "map": [4, 7, 9, 15], "default_scor": [4, 8], "d": [4, 8, 9], "overrid": 4, "set_item": 4, "ensur": [4, 8, 15], "cumul": [4, 8], "distribut": [4, 15], "point": [4, 15], "special": [4, 8, 13], "ordin": [4, 7, 8, 9], "order": [4, 8, 9, 13, 15], "accord": [4, 8, 9, 12, 13], "technic": 4, "reason": 4, "convent": 4, "present": [4, 8, 9, 15], "most": [4, 8, 9, 12, 15], "If": [4, 6, 8, 9, 10, 12, 14, 15], "alreadi": [4, 9], "posit": [4, 9], "doe": [4, 6, 8, 9, 15], "chang": [4, 15], "at_index": 4, "index": [4, 8, 9, 15], "valueerror": [4, 8, 9], "invalid": 4, "loop": 4, "until": [4, 12, 15], "find": [4, 6, 15], "requir": [4, 15], "found": [4, 6, 8, 9], "get_random_inst": [5, 6], "total_cost": [5, 6], "approvalmultiprofil": [3, 5, 8, 15], "get_random_approval_profil": [5, 8], "get_all_approval_profil": [5, 8], "cardinalprofil": [5, 7, 8, 15], "cardinalmultiprofil": [5, 8, 15], "abstractcumulativeprofil": [5, 8], "cumulativeprofil": [5, 8, 15], "cumulativemultiprofil": [5, 8, 15], "abstractordinalprofil": [5, 7, 8], "ordinalprofil": [5, 7, 8, 15], "ordinalmultiprofil": [5, 8, 15], "groupsatisfactionmeasur": [5, 8, 9, 12], "satisfactionmultiprofil": [5, 9, 15], "satisfactionprofil": [5, 9, 15], "functionalsatisfact": [5, 9, 15], "cc_sat": [5, 9, 15], "cost_sqrt_sat": [5, 9, 15], "cost_log_sat": [5, 9, 15], "additivesatisfact": [5, 9, 15], "cardinality_sat": [5, 9, 15], "relative_cardinality_sat": [5, 9, 15], "relative_cost_sat": [5, 9, 15], "relative_cost_approx_normaliser_sat": [5, 9, 15], "effort_sat": [5, 9, 15], "additive_cardinal_sat": [5, 9, 15], "positionalsatisfact": [5, 9, 15], "additive_borda_sat": [5, 9, 15], "parse_pabulib": [5, 7, 15], "init_preflib_inst": [5, 7], "approval_to_preflib": [5, 7, 15], "cardinal_to_preflib": [5, 7, 15], "ordinal_to_preflib": [5, 7, 15], "basic": 6, "here": [6, 8, 9, 15], "target": 6, "file_path": [6, 7], "file_nam": [6, 7], "parsing_error": 6, "project_meta": [6, 15], "part": [6, 9], "how": [6, 12, 15], "note": [6, 8, 9, 12, 15], "constitut": 6, "maximum": [6, 8, 9, 12, 15], "feasibl": [6, 15], "urban": 6, "greeneri": 6, "public": [6, 7], "transport": 6, "citizen": 6, "abov": [6, 15], "60": 6, "year": 6, "old": 6, "resid": 6, "district": 6, "pars": [6, 7, 15], "file": [6, 7, 15], "path": [6, 7], "boolean": [6, 8, 12, 15], "were": [6, 15], "encount": 6, "relev": 6, "get_project": 6, "project_nam": 6, "otherwis": [6, 8, 9, 15], "keyerror": [6, 8, 9], "is_exhaust": [6, 15], "test": [6, 8, 15], "exhaust": [6, 12], "said": 6, "without": 6, "violat": [6, 12], "is_feas": [6, 15], "mean": [6, 8, 14], "exce": [6, 8], "less": 6, "than": [6, 10, 15], "is_trivi": [6, 8], "trivial": [6, 8], "exceed": [6, 12], "uniqu": [6, 8], "enforc": 6, "member": [6, 15], "num_project": 6, "min_cost": 6, "max_cost": 6, "integ": [6, 15], "uniformli": 6, "sampl": 6, "uniform": 6, "minimum": [6, 8, 15], "round": [6, 12], "up": [6, 8, 9, 12, 15], "closest": 6, "sum": [6, 8, 9, 12, 15], "correct": 7, "depend": [7, 15], "metadata": [7, 8, 15], "preflib_inst": [7, 15], "preflibinst": 7, "modification_typ": 7, "relates_to": 7, "related_fil": 7, "titl": 7, "descript": 7, "publication_d": 7, "modification_d": 7, "alternative_nam": 7, "preflib": 7, "preflibtool": 7, "modif": 7, "document": 7, "relat": [7, 8, 15], "date": 7, "last": [7, 8, 9], "altern": 7, "origin": [7, 15], "categoricalinst": 7, "convert": [7, 8, 9, 10, 15], "py": [7, 8], "ordinalinst": 7, "structur": 8, "veri": 8, "similar": [8, 15], "Then": [8, 15], "usual": 8, "those": 8, "onli": [8, 9, 12, 13, 15], "multipl": [8, 9, 14, 15], "appli": [8, 9, 12, 13, 15], "ballot_valid": [8, 15], "ballot_typ": [8, 15], "meant": [8, 9], "whether": 8, "valid": [8, 15], "befor": [8, 9, 15], "being": 8, "against": 8, "as_sat_profil": [8, 15], "interchang": [8, 15], "inquir": 8, "num_ballot": 8, "validate_ballot": [8, 15], "throw": 8, "typeerror": [8, 15], "activ": [8, 15], "item": [8, 9], "end": [8, 9], "as_multiprofil": [8, 15], "extend": [8, 9], "insert": [8, 9], "regardless": [8, 9], "input": [8, 9, 13, 15], "even": [8, 9], "save": [8, 9], "counter": [8, 9, 15], "multiset": [8, 15], "force_freez": 8, "beforehand": 8, "legal_min_length": [8, 15], "legal_max_length": [8, 15], "legal_min_cost": [8, 15], "legal_max_cost": [8, 15], "approval_scor": [8, 15], "who": [8, 9], "approved_project": 8, "is_party_list": [8, 15], "parti": [8, 15], "disjoint": 8, "clear": [8, 9, 15], "count": [8, 9], "occurr": [8, 9], "start": [8, 9, 12, 15], "stop": [8, 9, 12], "9223372036854775807": [8, 9], "pop": [8, 9], "indexerror": [8, 9], "rang": [8, 9, 15], "revers": [8, 9], "IN": [8, 9], "place": [8, 9], "sort": [8, 9, 13], "ascend": [8, 9], "modifi": [8, 9], "stabl": [8, 9], "maintain": [8, 9], "function": [8, 9, 10, 12, 13, 14], "onc": [8, 9, 15], "descend": [8, 9], "flag": [8, 9], "repeat": [8, 9], "time": [8, 9, 12], "c": [8, 9], "abcabc": [8, 9], "b": [8, 9, 15], "knuth": [8, 9], "prime": [8, 9], "factor": [8, 9], "1836": [8, 9], "17": [8, 9], "math": [8, 9], "prime_factor": [8, 9], "prod": [8, 9], "zero": [8, 9], "neg": [8, 9], "ignor": [8, 9], "classmethod": [8, 9], "fromkei": [8, 9], "v": [8, 9], "creat": [8, 9, 15], "get": [8, 9, 15], "els": [8, 9, 15], "like": [8, 9], "view": [8, 9], "most_common": [8, 9], "n": [8, 9], "common": [8, 9], "abracadabra": [8, 9], "r": [8, 9], "k": [8, 9], "popitem": [8, 9], "pair": [8, 9], "lifo": [8, 9], "setdefault": [8, 9], "subtract": [8, 9], "kwd": [8, 9], "instead": [8, 9, 15], "replac": [8, 9], "reduc": [8, 9], "below": [8, 9, 15], "output": [8, 9], "witch": [8, 9], "watch": [8, 9], "h": [8, 9], "w": [8, 9], "four": [8, 9], "4": [8, 9, 15], "num_ag": 8, "respect": [6, 8, 15], "agent": 8, "possibl": [8, 12], "subset": [6, 8, 9, 14, 15], "legal_min_scor": [8, 15], "legal_max_scor": [8, 15], "total_scor": 8, "receiv": [8, 12], "legal_min_total_scor": [8, 15], "legal_max_total_scor": [8, 15], "across": 8, "forzenordinalballot": 8, "larg": 9, "thing": 9, "As": [9, 12, 15], "three": 9, "chamberlin": [9, 15], "courant": [9, 15], "squar": [9, 15], "root": [9, 15], "log": [9, 15], "rel": 9, "approx": 9, "effort": 9, "borda": [9, 15], "alwai": 9, "link": 9, "hase": 9, "compar": 9, "sole": 9, "sat": [9, 15], "intern": 9, "total_satisfact": 9, "extract": 9, "well": [9, 15], "potenti": [9, 15], "extend_from_multiprofil": 9, "extend_from_profil": 9, "func": [9, 13], "callabl": [9, 12, 13], "via": [9, 15], "actual": [9, 15], "under": 9, "consider": 9, "To": [9, 15], "speed": [9, 15], "precomput": 9, "fraction": [8, 9, 11], "precomputed_valu": 9, "preprocess": 9, "get_project_sat": 9, "after": 9, "avoid": 9, "re": 9, "largest": [9, 12, 15], "previou": [9, 15], "denomin": 9, "expens": [9, 15], "exact": 9, "version": 9, "long": [9, 15], "includ": [9, 15], "positional_func": 9, "aggregation_func": 9, "That": 9, "aggreg": [9, 15], "plu": 9, "frac": [10, 11, 15], "constant": [10, 15], "One": 10, "str_as_frac": [10, 11, 15], "gmpy2": [10, 15], "float": [10, 15], "max_additive_utilitarian_welfar": [11, 12, 15], "completion_by_rule_combin": [11, 12, 15], "exhaustion_by_budget_increas": [11, 12, 15], "popularity_comparison": [11, 12, 15], "social_welfare_comparison": [11, 12, 15], "analysi": [11, 15], "tie": [11, 12], "break": [11, 12], "tiebreakingexcept": [11, 13], "tiebreakingrul": [11, 12, 13, 15], "app_score_tie_break": [11, 13, 15], "lexico_tie_break": [11, 13, 15], "max_cost_tie_break": [11, 13, 15], "min_cost_tie_break": [11, 13, 15], "refuse_tie_break": [11, 13], "util": [11, 15], "gini_coeffici": [11, 14], "mean_gener": [11, 14], "powerset": [11, 14], "known": [12, 15], "maximis": 12, "mai": [12, 15], "much": 12, "notabl": [12, 15], "combin": [12, 15], "increas": [12, 15], "sat_profil": [12, 15], "is_sat_addit": [12, 15], "tie_break": [12, 15], "resolut": [12, 15], "initial_budget_alloc": [12, 15], "scheme": 12, "lead": [12, 15], "highest": [12, 13], "would": [12, 15], "constraint": [12, 15], "skip": 12, "social": [12, 15], "inheret": 12, "satisf": 12, "disregard": 12, "former": 12, "latter": 12, "deduct": 12, "tiebreak": [12, 13, 15], "lexicograph": [12, 13], "obtain": 12, "irresolut": [12, 15], "where": [12, 13, 15], "ti": [12, 13, 15], "maxim": [12, 15], "satisfactin": 12, "bugdet": 12, "linear": [12, 15], "program": [12, 15], "solver": [12, 15], "control": [12, 15], "broken": [12, 13, 15], "initial_load": 12, "virtual": 12, "currenc": 12, "continu": 12, "soon": 12, "asa": 12, "enough": 12, "bui": 12, "bought": 12, "load": 12, "By": [12, 15], "me": [12, 15], "websit": [12, 15], "equalshar": [12, 15], "net": [12, 15], "asssum": 12, "rule_sequ": 12, "rule_param": [12, 15], "run": [12, 15], "sequenc": [12, 14, 15], "reach": 12, "budget_step": [12, 15], "retriev": 12, "step": 12, "sever": [12, 15], "yield": [12, 15], "occur": 13, "among": [13, 15], "lambda": 13, "x": 13, "unti": [13, 15], "wher": 13, "favour": 13, "lowest": 13, "vector": 14, "offer": 15, "comprehens": 15, "explan": 15, "simpler": 15, "tutori": 15, "quick": 15, "pleas": 15, "encapsul": 15, "central": 15, "augment": 15, "accept": 15, "invok": 15, "print": 15, "serv": 15, "primarili": 15, "act": 15, "similarli": 15, "associ": 15, "consist": 15, "deactiv": 15, "10": 15, "8": 15, "membership": 15, "ask": 15, "becom": 15, "p0": 15, "p4": 15, "rank": 15, "unic": 15, "faster": 15, "counterpart": 15, "immut": 15, "represent": 15, "easili": 15, "app_ballot": 15, "freez": 15, "frozen_ballot": 15, "turn": 15, "gain": 15, "show": 15, "7": 15, "runtim": 15, "multiprofile_runtim": 15, "profile_runtim": 15, "max": 15, "insight": 15, "scale": 15, "conform": 15, "appropri": 15, "path_to_the_fil": 15, "extens": 15, "hous": 15, "subject": 15, "must": 15, "impos": 15, "categor": 15, "app_profil": 15, "card_profil": 15, "ord_profil": 15, "variou": 15, "concept": 15, "proxi": 15, "deduc": 15, "rather": 15, "flexibl": 15, "custom": 15, "ones": 15, "Such": 15, "addition": 15, "facilit": 15, "manag": 15, "workflow": 15, "involv": 15, "mysatisfact": 15, "def": 15, "self": 15, "100": 15, "len": 15, "simplifi": 15, "process": 15, "conveni": 15, "demonstr": 15, "illustr": 15, "cc_sat_func": 15, "__init__": 15, "super": 15, "Its": 15, "cardinality_sat_func": 15, "borda_sat_func": 15, "size": 15, "resembl": 15, "normal": 15, "celebr": 15, "aim": 15, "automat": 15, "Or": 15, "irresolute_outcom": 15, "mip": 15, "exclud": 15, "previous": 15, "becaus": 15, "moreov": 15, "adapt": 15, "primari": 15, "context": 15, "sai": 15, "highli": 15, "recommend": 15, "decid": 15, "reli": 15, "render": 15, "achiev": 15, "budget_allocation_mes_iter": 15, "hope": 15, "suitabl": 15, "24": [], "someth": 15, "compos": 15, "wa": 15, "wieliczka": 15, "\u015bwiec": 15, "mes_ful": 15, "popular": 15, "mainli": 15, "seen": 15, "customiz": 15, "Not": 15, "undesir": 15, "behavior": 15, "fraction_from_int": 15, "6": 15, "fraction_from_str": 15, "algorithm": 15, "21": 3, "max_budget_allocation_cardin": [5, 6], "max_budget_allocation_cost": [5, 6], "chosen": 6, "param": 8, "budget_allocation_mes_complet": 15, "inner_sat_class": 9, "rare": 9, "deepcopi": 9}, "objects": {"pabutools": [[3, 0, 0, "-", "analysis"], [5, 0, 0, "-", "election"], [10, 0, 0, "-", "fractions"], [12, 0, 0, "-", "rules"], [13, 0, 0, "-", "tiebreaking"], [14, 0, 0, "-", "utils"]], "pabutools.analysis": [[3, 0, 0, "-", "category"], [3, 0, 0, "-", "instanceproperties"], [3, 0, 0, "-", "profileproperties"], [3, 0, 0, "-", "votersatisfaction"]], "pabutools.analysis.category": [[3, 1, 1, "", "category_proportionality"]], "pabutools.analysis.instanceproperties": [[3, 1, 1, "", "avg_project_cost"], [3, 1, 1, "", "funding_scarcity"], [3, 1, 1, "", "median_project_cost"], [3, 1, 1, "", "std_dev_project_cost"], [3, 1, 1, "", "sum_project_cost"]], "pabutools.analysis.profileproperties": [[3, 1, 1, "", "avg_approval_score"], [3, 1, 1, "", "avg_ballot_cost"], [3, 1, 1, "", "avg_ballot_length"], [3, 1, 1, "", "avg_total_score"], [3, 1, 1, "", "median_approval_score"], [3, 1, 1, "", "median_ballot_cost"], [3, 1, 1, "", "median_ballot_length"], [3, 1, 1, "", "median_total_score"]], "pabutools.analysis.votersatisfaction": [[3, 1, 1, "", "avg_satisfaction"], [3, 1, 1, "", "gini_coefficient_of_satisfaction"], [3, 1, 1, "", "percent_non_empty_handed"], [3, 1, 1, "", "satisfaction_histogram"]], "pabutools.election": [[4, 0, 0, "-", "ballot"], [6, 0, 0, "-", "instance"], [8, 0, 0, "-", "profile"], [9, 0, 0, "-", "satisfaction"]], "pabutools.election.ballot.approvalballot": [[4, 2, 1, "", "AbstractApprovalBallot"], [4, 2, 1, "", "ApprovalBallot"], [4, 2, 1, "", "FrozenApprovalBallot"], [4, 1, 1, "", "get_random_approval_ballot"]], "pabutools.election.ballot.approvalballot.ApprovalBallot": [[4, 3, 1, "", "copy"], [4, 3, 1, "", "difference"], [4, 3, 1, "", "difference_update"], [4, 3, 1, "", "frozen"], [4, 3, 1, "", "intersection"], [4, 3, 1, "", "intersection_update"], [4, 4, 1, "", "meta"], [4, 4, 1, "", "name"], [4, 3, 1, "", "symmetric_difference"], [4, 3, 1, "", "symmetric_difference_update"], [4, 3, 1, "", "union"]], "pabutools.election.ballot.approvalballot.FrozenApprovalBallot": [[4, 4, 1, "", "meta"], [4, 4, 1, "", "name"]], "pabutools.election.ballot.ballot": [[4, 2, 1, "", "AbstractBallot"], [4, 2, 1, "", "Ballot"], [4, 2, 1, "", "FrozenBallot"]], "pabutools.election.ballot.ballot.AbstractBallot": [[4, 4, 1, "", "meta"], [4, 4, 1, "", "name"]], "pabutools.election.ballot.ballot.Ballot": [[4, 3, 1, "", "frozen"], [4, 4, 1, "", "meta"], [4, 4, 1, "", "name"]], "pabutools.election.ballot.ballot.FrozenBallot": [[4, 4, 1, "", "meta"], [4, 4, 1, "", "name"]], "pabutools.election.ballot.cardinalballot": [[4, 2, 1, "", "AbstractCardinalBallot"], [4, 2, 1, "", "CardinalBallot"], [4, 2, 1, "", "FrozenCardinalBallot"]], "pabutools.election.ballot.cardinalballot.CardinalBallot": [[4, 3, 1, "", "complete"], [4, 3, 1, "", "copy"], [4, 3, 1, "", "frozen"], [4, 4, 1, "", "meta"], [4, 4, 1, "", "name"]], "pabutools.election.ballot.cardinalballot.FrozenCardinalBallot": [[4, 4, 1, "", "meta"], [4, 4, 1, "", "name"]], "pabutools.election.ballot.cumulativeballot": [[4, 2, 1, "", "AbstractCumulativeBallot"], [4, 2, 1, "", "CumulativeBallot"], [4, 2, 1, "", "FrozenCumulativeBallot"]], "pabutools.election.ballot.cumulativeballot.CumulativeBallot": [[4, 3, 1, "", "copy"], [4, 3, 1, "", "frozen"], [4, 4, 1, "", "meta"], [4, 4, 1, "", "name"]], "pabutools.election.ballot.cumulativeballot.FrozenCumulativeBallot": [[4, 4, 1, "", "meta"], [4, 4, 1, "", "name"]], "pabutools.election.ballot.ordinalballot": [[4, 2, 1, "", "AbstractOrdinalBallot"], [4, 2, 1, "", "FrozenOrdinalBallot"], [4, 2, 1, "", "OrdinalBallot"]], "pabutools.election.ballot.ordinalballot.FrozenOrdinalBallot": [[4, 4, 1, "", "meta"], [4, 4, 1, "", "name"]], "pabutools.election.ballot.ordinalballot.OrdinalBallot": [[4, 3, 1, "", "append"], [4, 3, 1, "", "at_index"], [4, 3, 1, "", "copy"], [4, 3, 1, "", "frozen"], [4, 3, 1, "", "index"], [4, 4, 1, "", "meta"], [4, 4, 1, "", "name"]], "pabutools.election.instance": [[6, 2, 1, "", "Instance"], [6, 2, 1, "", "Project"], [6, 1, 1, "", "get_random_instance"], [6, 1, 1, "", "max_budget_allocation_cardinality"], [6, 1, 1, "", "max_budget_allocation_cost"], [6, 1, 1, "", "total_cost"]], "pabutools.election.instance.Instance": [[6, 3, 1, "", "budget_allocations"], [6, 4, 1, "", "budget_limit"], [6, 4, 1, "", "categories"], [6, 3, 1, "", "copy"], [6, 3, 1, "", "difference"], [6, 3, 1, "", "difference_update"], [6, 4, 1, "", "file_name"], [6, 4, 1, "", "file_path"], [6, 3, 1, "", "get_project"], [6, 3, 1, "", "intersection"], [6, 3, 1, "", "intersection_update"], [6, 3, 1, "", "is_exhaustive"], [6, 3, 1, "", "is_feasible"], [6, 3, 1, "", "is_trivial"], [6, 4, 1, "", "meta"], [6, 4, 1, "", "parsing_errors"], [6, 4, 1, "", "project_meta"], [6, 3, 1, "", "symmetric_difference"], [6, 3, 1, "", "symmetric_difference_update"], [6, 4, 1, "", "targets"], [6, 3, 1, "", "union"]], "pabutools.election.instance.Project": [[6, 4, 1, "", "categories"], [6, 4, 1, "", "cost"], [6, 4, 1, "", "name"], [6, 4, 1, "", "targets"]], "pabutools.election.pabulib": [[7, 1, 1, "", "parse_pabulib"]], "pabutools.election.preflib": [[7, 1, 1, "", "approval_to_preflib"], [7, 1, 1, "", "cardinal_to_preflib"], [7, 1, 1, "", "init_preflib_instance"], [7, 1, 1, "", "ordinal_to_preflib"]], "pabutools.election.profile.approvalprofile": [[8, 2, 1, "", "AbstractApprovalProfile"], [8, 2, 1, "", "ApprovalMultiProfile"], [8, 2, 1, "", "ApprovalProfile"], [8, 1, 1, "", "get_all_approval_profiles"], [8, 1, 1, "", "get_random_approval_profile"]], "pabutools.election.profile.approvalprofile.AbstractApprovalProfile": [[8, 3, 1, "", "approval_score"], [8, 3, 1, "", "approved_projects"], [8, 3, 1, "", "is_party_list"], [8, 3, 1, "", "is_trivial"], [8, 4, 1, "", "legal_max_cost"], [8, 4, 1, "", "legal_max_length"], [8, 4, 1, "", "legal_min_cost"], [8, 4, 1, "", "legal_min_length"]], "pabutools.election.profile.approvalprofile.ApprovalMultiProfile": [[8, 3, 1, "", "append"], [8, 3, 1, "", "approval_score"], [8, 3, 1, "", "approved_projects"], [8, 3, 1, "", "as_sat_profile"], [8, 4, 1, "", "ballot_type"], [8, 4, 1, "", "ballot_validation"], [8, 3, 1, "", "clear"], [8, 3, 1, "", "copy"], [8, 3, 1, "", "elements"], [8, 3, 1, "", "extend"], [8, 3, 1, "", "fromkeys"], [8, 3, 1, "", "get"], [8, 4, 1, "", "instance"], [8, 3, 1, "", "is_party_list"], [8, 3, 1, "", "is_trivial"], [8, 3, 1, "", "items"], [8, 3, 1, "", "keys"], [8, 4, 1, "", "legal_max_cost"], [8, 4, 1, "", "legal_max_length"], [8, 4, 1, "", "legal_min_cost"], [8, 4, 1, "", "legal_min_length"], [8, 3, 1, "", "most_common"], [8, 3, 1, "", "multiplicity"], [8, 3, 1, "", "num_ballots"], [8, 3, 1, "", "pop"], [8, 3, 1, "", "popitem"], [8, 3, 1, "", "setdefault"], [8, 3, 1, "", "subtract"], [8, 3, 1, "", "total"], [8, 3, 1, "", "update"], [8, 3, 1, "", "validate_ballot"], [8, 3, 1, "", "values"]], "pabutools.election.profile.approvalprofile.ApprovalProfile": [[8, 3, 1, "", "append"], [8, 3, 1, "", "approval_score"], [8, 3, 1, "", "approved_projects"], [8, 3, 1, "", "as_multiprofile"], [8, 3, 1, "", "as_sat_profile"], [8, 4, 1, "", "ballot_type"], [8, 4, 1, "", "ballot_validation"], [8, 3, 1, "", "clear"], [8, 3, 1, "", "copy"], [8, 3, 1, "", "count"], [8, 3, 1, "", "extend"], [8, 3, 1, "", "index"], [8, 3, 1, "", "insert"], [8, 4, 1, "", "instance"], [8, 3, 1, "", "is_party_list"], [8, 3, 1, "", "is_trivial"], [8, 4, 1, "", "legal_max_cost"], [8, 4, 1, "", "legal_max_length"], [8, 4, 1, "", "legal_min_cost"], [8, 4, 1, "", "legal_min_length"], [8, 3, 1, "", "multiplicity"], [8, 3, 1, "", "num_ballots"], [8, 3, 1, "", "pop"], [8, 3, 1, "", "remove"], [8, 3, 1, "", "reverse"], [8, 3, 1, "", "sort"], [8, 3, 1, "", "validate_ballot"]], "pabutools.election.profile.cardinalprofile": [[8, 2, 1, "", "AbstractCardinalProfile"], [8, 2, 1, "", "CardinalMultiProfile"], [8, 2, 1, "", "CardinalProfile"]], "pabutools.election.profile.cardinalprofile.AbstractCardinalProfile": [[8, 4, 1, "", "legal_max_length"], [8, 4, 1, "", "legal_max_score"], [8, 4, 1, "", "legal_min_length"], [8, 4, 1, "", "legal_min_score"], [8, 3, 1, "", "total_score"]], "pabutools.election.profile.cardinalprofile.CardinalMultiProfile": [[8, 3, 1, "", "append"], [8, 3, 1, "", "as_sat_profile"], [8, 4, 1, "", "ballot_type"], [8, 4, 1, "", "ballot_validation"], [8, 3, 1, "", "clear"], [8, 3, 1, "", "copy"], [8, 3, 1, "", "elements"], [8, 3, 1, "", "extend"], [8, 3, 1, "", "fromkeys"], [8, 3, 1, "", "get"], [8, 4, 1, "", "instance"], [8, 3, 1, "", "items"], [8, 3, 1, "", "keys"], [8, 4, 1, "", "legal_max_length"], [8, 4, 1, "", "legal_max_score"], [8, 4, 1, "", "legal_min_length"], [8, 4, 1, "", "legal_min_score"], [8, 3, 1, "", "most_common"], [8, 3, 1, "", "multiplicity"], [8, 3, 1, "", "num_ballots"], [8, 3, 1, "", "pop"], [8, 3, 1, "", "popitem"], [8, 3, 1, "", "score"], [8, 3, 1, "", "setdefault"], [8, 3, 1, "", "subtract"], [8, 3, 1, "", "total"], [8, 3, 1, "", "total_score"], [8, 3, 1, "", "update"], [8, 3, 1, "", "validate_ballot"], [8, 3, 1, "", "values"]], "pabutools.election.profile.cardinalprofile.CardinalProfile": [[8, 3, 1, "", "append"], [8, 3, 1, "", "as_multiprofile"], [8, 3, 1, "", "as_sat_profile"], [8, 4, 1, "", "ballot_type"], [8, 4, 1, "", "ballot_validation"], [8, 3, 1, "", "clear"], [8, 3, 1, "", "complete"], [8, 3, 1, "", "copy"], [8, 3, 1, "", "count"], [8, 3, 1, "", "extend"], [8, 3, 1, "", "index"], [8, 3, 1, "", "insert"], [8, 4, 1, "", "instance"], [8, 4, 1, "", "legal_max_length"], [8, 4, 1, "", "legal_max_score"], [8, 4, 1, "", "legal_min_length"], [8, 4, 1, "", "legal_min_score"], [8, 3, 1, "", "multiplicity"], [8, 3, 1, "", "num_ballots"], [8, 3, 1, "", "pop"], [8, 3, 1, "", "remove"], [8, 3, 1, "", "reverse"], [8, 3, 1, "", "sort"], [8, 3, 1, "", "total_score"], [8, 3, 1, "", "validate_ballot"]], "pabutools.election.profile.cumulativeprofile": [[8, 2, 1, "", "AbstractCumulativeProfile"], [8, 2, 1, "", "CumulativeMultiProfile"], [8, 2, 1, "", "CumulativeProfile"]], "pabutools.election.profile.cumulativeprofile.AbstractCumulativeProfile": [[8, 4, 1, "", "legal_max_length"], [8, 4, 1, "", "legal_max_score"], [8, 4, 1, "", "legal_max_total_score"], [8, 4, 1, "", "legal_min_length"], [8, 4, 1, "", "legal_min_score"], [8, 4, 1, "", "legal_min_total_score"]], "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile": [[8, 3, 1, "", "append"], [8, 3, 1, "", "as_sat_profile"], [8, 4, 1, "", "ballot_type"], [8, 4, 1, "", "ballot_validation"], [8, 3, 1, "", "clear"], [8, 3, 1, "", "copy"], [8, 3, 1, "", "elements"], [8, 3, 1, "", "extend"], [8, 3, 1, "", "fromkeys"], [8, 3, 1, "", "get"], [8, 4, 1, "", "instance"], [8, 3, 1, "", "items"], [8, 3, 1, "", "keys"], [8, 4, 1, "", "legal_max_length"], [8, 4, 1, "", "legal_max_score"], [8, 4, 1, "", "legal_max_total_score"], [8, 4, 1, "", "legal_min_length"], [8, 4, 1, "", "legal_min_score"], [8, 4, 1, "", "legal_min_total_score"], [8, 3, 1, "", "most_common"], [8, 3, 1, "", "multiplicity"], [8, 3, 1, "", "num_ballots"], [8, 3, 1, "", "pop"], [8, 3, 1, "", "popitem"], [8, 3, 1, "", "score"], [8, 3, 1, "", "setdefault"], [8, 3, 1, "", "subtract"], [8, 3, 1, "", "total"], [8, 3, 1, "", "total_score"], [8, 3, 1, "", "update"], [8, 3, 1, "", "validate_ballot"], [8, 3, 1, "", "values"]], "pabutools.election.profile.cumulativeprofile.CumulativeProfile": [[8, 3, 1, "", "append"], [8, 3, 1, "", "as_multiprofile"], [8, 3, 1, "", "as_sat_profile"], [8, 4, 1, "", "ballot_type"], [8, 4, 1, "", "ballot_validation"], [8, 3, 1, "", "clear"], [8, 3, 1, "", "complete"], [8, 3, 1, "", "copy"], [8, 3, 1, "", "count"], [8, 3, 1, "", "extend"], [8, 3, 1, "", "index"], [8, 3, 1, "", "insert"], [8, 4, 1, "", "instance"], [8, 4, 1, "", "legal_max_length"], [8, 4, 1, "", "legal_max_score"], [8, 4, 1, "", "legal_max_total_score"], [8, 4, 1, "", "legal_min_length"], [8, 4, 1, "", "legal_min_score"], [8, 4, 1, "", "legal_min_total_score"], [8, 3, 1, "", "multiplicity"], [8, 3, 1, "", "num_ballots"], [8, 3, 1, "", "pop"], [8, 3, 1, "", "remove"], [8, 3, 1, "", "reverse"], [8, 3, 1, "", "sort"], [8, 3, 1, "", "total_score"], [8, 3, 1, "", "validate_ballot"]], "pabutools.election.profile.ordinalprofile": [[8, 2, 1, "", "AbstractOrdinalProfile"], [8, 2, 1, "", "OrdinalMultiProfile"], [8, 2, 1, "", "OrdinalProfile"]], "pabutools.election.profile.ordinalprofile.AbstractOrdinalProfile": [[8, 4, 1, "", "legal_max_length"], [8, 4, 1, "", "legal_min_length"]], "pabutools.election.profile.ordinalprofile.OrdinalMultiProfile": [[8, 3, 1, "", "append"], [8, 3, 1, "", "as_sat_profile"], [8, 4, 1, "", "ballot_type"], [8, 4, 1, "", "ballot_validation"], [8, 3, 1, "", "clear"], [8, 3, 1, "", "copy"], [8, 3, 1, "", "elements"], [8, 3, 1, "", "extend"], [8, 3, 1, "", "fromkeys"], [8, 3, 1, "", "get"], [8, 4, 1, "", "instance"], [8, 3, 1, "", "items"], [8, 3, 1, "", "keys"], [8, 4, 1, "", "legal_max_length"], [8, 4, 1, "", "legal_min_length"], [8, 3, 1, "", "most_common"], [8, 3, 1, "", "multiplicity"], [8, 3, 1, "", "num_ballots"], [8, 3, 1, "", "pop"], [8, 3, 1, "", "popitem"], [8, 3, 1, "", "setdefault"], [8, 3, 1, "", "subtract"], [8, 3, 1, "", "total"], [8, 3, 1, "", "update"], [8, 3, 1, "", "validate_ballot"], [8, 3, 1, "", "values"]], "pabutools.election.profile.ordinalprofile.OrdinalProfile": [[8, 3, 1, "", "append"], [8, 3, 1, "", "as_multiprofile"], [8, 3, 1, "", "as_sat_profile"], [8, 4, 1, "", "ballot_type"], [8, 4, 1, "", "ballot_validation"], [8, 3, 1, "", "clear"], [8, 3, 1, "", "copy"], [8, 3, 1, "", "count"], [8, 3, 1, "", "extend"], [8, 3, 1, "", "index"], [8, 3, 1, "", "insert"], [8, 4, 1, "", "instance"], [8, 4, 1, "", "legal_max_length"], [8, 4, 1, "", "legal_min_length"], [8, 3, 1, "", "multiplicity"], [8, 3, 1, "", "num_ballots"], [8, 3, 1, "", "pop"], [8, 3, 1, "", "remove"], [8, 3, 1, "", "reverse"], [8, 3, 1, "", "sort"], [8, 3, 1, "", "validate_ballot"]], "pabutools.election.profile.profile": [[8, 2, 1, "", "AbstractProfile"], [8, 2, 1, "", "MultiProfile"], [8, 2, 1, "", "Profile"]], "pabutools.election.profile.profile.AbstractProfile": [[8, 3, 1, "", "as_sat_profile"], [8, 4, 1, "", "ballot_type"], [8, 4, 1, "", "ballot_validation"], [8, 4, 1, "", "instance"], [8, 3, 1, "", "multiplicity"], [8, 3, 1, "", "num_ballots"], [8, 3, 1, "", "validate_ballot"]], "pabutools.election.profile.profile.MultiProfile": [[8, 3, 1, "", "append"], [8, 3, 1, "", "as_sat_profile"], [8, 4, 1, "", "ballot_type"], [8, 4, 1, "", "ballot_validation"], [8, 3, 1, "", "extend"], [8, 4, 1, "", "instance"], [8, 3, 1, "", "multiplicity"], [8, 3, 1, "", "num_ballots"]], "pabutools.election.profile.profile.Profile": [[8, 3, 1, "", "append"], [8, 3, 1, "", "as_multiprofile"], [8, 3, 1, "", "as_sat_profile"], [8, 4, 1, "", "ballot_type"], [8, 4, 1, "", "ballot_validation"], [8, 3, 1, "", "extend"], [8, 3, 1, "", "insert"], [8, 4, 1, "", "instance"], [8, 3, 1, "", "multiplicity"], [8, 3, 1, "", "num_ballots"]], "pabutools.election.satisfaction.additivesatisfaction": [[9, 2, 1, "", "AdditiveSatisfaction"], [9, 2, 1, "", "Additive_Cardinal_Sat"], [9, 2, 1, "", "Cardinality_Sat"], [9, 2, 1, "", "Cost_Sat"], [9, 2, 1, "", "Effort_Sat"], [9, 2, 1, "", "Relative_Cardinality_Sat"], [9, 2, 1, "", "Relative_Cost_Approx_Normaliser_Sat"], [9, 2, 1, "", "Relative_Cost_Sat"]], "pabutools.election.satisfaction.additivesatisfaction.AdditiveSatisfaction": [[9, 4, 1, "", "ballot"], [9, 4, 1, "", "func"], [9, 3, 1, "", "get_project_sat"], [9, 4, 1, "", "instance"], [9, 4, 1, "", "precomputed_values"], [9, 3, 1, "", "preprocessing"], [9, 4, 1, "", "profile"], [9, 3, 1, "", "sat"]], "pabutools.election.satisfaction.additivesatisfaction.Additive_Cardinal_Sat": [[9, 3, 1, "", "get_project_sat"], [9, 3, 1, "", "preprocessing"], [9, 3, 1, "", "sat"]], "pabutools.election.satisfaction.additivesatisfaction.Cardinality_Sat": [[9, 3, 1, "", "get_project_sat"], [9, 3, 1, "", "preprocessing"], [9, 3, 1, "", "sat"]], "pabutools.election.satisfaction.additivesatisfaction.Cost_Sat": [[9, 3, 1, "", "get_project_sat"], [9, 3, 1, "", "preprocessing"], [9, 3, 1, "", "sat"]], "pabutools.election.satisfaction.additivesatisfaction.Effort_Sat": [[9, 3, 1, "", "get_project_sat"], [9, 3, 1, "", "preprocessing"], [9, 3, 1, "", "sat"]], "pabutools.election.satisfaction.additivesatisfaction.Relative_Cardinality_Sat": [[9, 3, 1, "", "get_project_sat"], [9, 3, 1, "", "preprocessing"], [9, 3, 1, "", "sat"]], "pabutools.election.satisfaction.additivesatisfaction.Relative_Cost_Approx_Normaliser_Sat": [[9, 3, 1, "", "get_project_sat"], [9, 3, 1, "", "preprocessing"], [9, 3, 1, "", "sat"]], "pabutools.election.satisfaction.additivesatisfaction.Relative_Cost_Sat": [[9, 3, 1, "", "get_project_sat"], [9, 3, 1, "", "preprocessing"], [9, 3, 1, "", "sat"]], "pabutools.election.satisfaction.functionalsatisfaction": [[9, 2, 1, "", "CC_Sat"], [9, 2, 1, "", "Cost_Log_Sat"], [9, 2, 1, "", "Cost_Sqrt_Sat"], [9, 2, 1, "", "FunctionalSatisfaction"]], "pabutools.election.satisfaction.functionalsatisfaction.CC_Sat": [[9, 3, 1, "", "sat"]], "pabutools.election.satisfaction.functionalsatisfaction.Cost_Log_Sat": [[9, 3, 1, "", "sat"]], "pabutools.election.satisfaction.functionalsatisfaction.Cost_Sqrt_Sat": [[9, 3, 1, "", "sat"]], "pabutools.election.satisfaction.functionalsatisfaction.FunctionalSatisfaction": [[9, 4, 1, "", "ballot"], [9, 4, 1, "", "func"], [9, 4, 1, "", "instance"], [9, 4, 1, "", "profile"], [9, 3, 1, "", "sat"]], "pabutools.election.satisfaction.positionalsatisfaction": [[9, 2, 1, "", "Additive_Borda_Sat"], [9, 2, 1, "", "PositionalSatisfaction"]], "pabutools.election.satisfaction.positionalsatisfaction.Additive_Borda_Sat": [[9, 3, 1, "", "sat"]], "pabutools.election.satisfaction.positionalsatisfaction.PositionalSatisfaction": [[9, 4, 1, "", "aggregation_func"], [9, 4, 1, "", "ballot"], [9, 4, 1, "", "instance"], [9, 4, 1, "", "positional_func"], [9, 4, 1, "", "profile"], [9, 3, 1, "", "sat"]], "pabutools.election.satisfaction.satisfactionmeasure": [[9, 2, 1, "", "GroupSatisfactionMeasure"], [9, 2, 1, "", "SatisfactionMeasure"]], "pabutools.election.satisfaction.satisfactionmeasure.GroupSatisfactionMeasure": [[9, 3, 1, "", "multiplicity"], [9, 3, 1, "", "total_satisfaction"]], "pabutools.election.satisfaction.satisfactionmeasure.SatisfactionMeasure": [[9, 4, 1, "", "ballot"], [9, 4, 1, "", "instance"], [9, 4, 1, "", "profile"], [9, 3, 1, "", "sat"]], "pabutools.election.satisfaction.satisfactionprofile": [[9, 2, 1, "", "SatisfactionMultiProfile"], [9, 2, 1, "", "SatisfactionProfile"]], "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile": [[9, 3, 1, "", "append"], [9, 3, 1, "", "clear"], [9, 3, 1, "", "copy"], [9, 3, 1, "", "elements"], [9, 3, 1, "", "extend_from_multiprofile"], [9, 3, 1, "", "extend_from_profile"], [9, 3, 1, "", "fromkeys"], [9, 3, 1, "", "get"], [9, 4, 1, "", "instance"], [9, 3, 1, "", "items"], [9, 3, 1, "", "keys"], [9, 3, 1, "", "most_common"], [9, 3, 1, "", "multiplicity"], [9, 3, 1, "", "pop"], [9, 3, 1, "", "popitem"], [9, 4, 1, "", "sat_class"], [9, 3, 1, "", "setdefault"], [9, 3, 1, "", "subtract"], [9, 3, 1, "", "total"], [9, 3, 1, "", "total_satisfaction"], [9, 3, 1, "", "update"], [9, 3, 1, "", "values"]], "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile": [[9, 3, 1, "", "append"], [9, 3, 1, "", "clear"], [9, 3, 1, "", "copy"], [9, 3, 1, "", "count"], [9, 3, 1, "", "extend"], [9, 3, 1, "", "extend_from_profile"], [9, 3, 1, "", "index"], [9, 3, 1, "", "insert"], [9, 4, 1, "", "instance"], [9, 3, 1, "", "multiplicity"], [9, 3, 1, "", "pop"], [9, 3, 1, "", "remove"], [9, 3, 1, "", "reverse"], [9, 4, 1, "", "sat_class"], [9, 3, 1, "", "sort"], [9, 3, 1, "", "total_satisfaction"]], "pabutools.fractions": [[10, 5, 1, "", "FRACTION"], [10, 1, 1, "", "frac"], [10, 1, 1, "", "str_as_frac"]], "pabutools.rules.composition": [[12, 1, 1, "", "popularity_comparison"], [12, 1, 1, "", "social_welfare_comparison"]], "pabutools.rules.exhaustion": [[12, 1, 1, "", "completion_by_rule_combination"], [12, 1, 1, "", "exhaustion_by_budget_increase"]], "pabutools.rules.greedywelfare": [[12, 1, 1, "", "greedy_utilitarian_welfare"]], "pabutools.rules.maxwelfare": [[12, 1, 1, "", "max_additive_utilitarian_welfare"]], "pabutools.rules.mes": [[12, 1, 1, "", "method_of_equal_shares"]], "pabutools.rules.phragmen": [[12, 1, 1, "", "sequential_phragmen"]], "pabutools.tiebreaking": [[13, 6, 1, "", "TieBreakingException"], [13, 2, 1, "", "TieBreakingRule"], [13, 5, 1, "", "app_score_tie_breaking"], [13, 5, 1, "", "lexico_tie_breaking"], [13, 5, 1, "", "max_cost_tie_breaking"], [13, 5, 1, "", "min_cost_tie_breaking"], [13, 5, 1, "", "refuse_tie_breaking"]], "pabutools.tiebreaking.TieBreakingRule": [[13, 4, 1, "", "func"], [13, 3, 1, "", "order"], [13, 3, 1, "", "untie"]], "pabutools.utils": [[14, 1, 1, "", "gini_coefficient"], [14, 1, 1, "", "mean_generator"], [14, 1, 1, "", "powerset"]]}, "objtypes": {"0": "py:module", "1": "py:function", "2": "py:class", "3": "py:method", "4": "py:attribute", "5": "py:data", "6": "py:exception"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"], "2": ["py", "class", "Python class"], "3": ["py", "method", "Python method"], "4": ["py", "attribute", "Python attribute"], "5": ["py", "data", "Python data"], "6": ["py", "exception", "Python exception"]}, "titleterms": {"pabutool": 0, "pb": 0, "easi": 0, "abc": 0, "instal": 1, "quick": 2, "start": 2, "describ": 2, "an": 2, "elect": [2, 5], "project": 2, "instanc": [2, 6, 15], "ballot": [2, 4], "profil": [2, 8, 15], "comput": 2, "outcom": 2, "analysi": 3, "modul": [3, 4, 5, 6, 8, 9, 12], "prefer": [7, 15], "librari": [7, 15], "satisfact": [9, 15], "fraction": [10, 15], "refer": 11, "rule": [12, 15], "tie": [13, 15], "break": [13, 15], "util": 14, "complet": 15, "guid": 15, "approv": 15, "cardin": 15, "cumul": 15, "ordin": 15, "multiprofil": 15, "pabulib": 15, "preflib": 15, "measur": 15, "function": 15, "addit": 15, "posit": 15, "alreadi": 15, "defin": 15, "utilitarian": 15, "welfar": 15, "maximis": 15, "greedi": 15, "approxim": 15, "sequenti": 15, "phragm\u00e8n": 15, "": 15, "method": 15, "equal": 15, "share": 15, "exhaust": 15, "composit": 15}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.viewcode": 1, "sphinx": 57}, "alltitles": {"Pabutools: PB as easy as ABC": [[0, "pabutools-pb-as-easy-as-abc"]], "Installation": [[1, "installation"]], "Quick Start": [[2, "quick-start"]], "Describing an Election": [[2, "describing-an-election"]], "Projects and Instances": [[2, "projects-and-instances"]], "Ballots and Profiles": [[2, "ballots-and-profiles"]], "Computing the Outcome of an Election": [[2, "computing-the-outcome-of-an-election"]], "Ballot module": [[4, "module-pabutools.election.ballot"]], "Fractions": [[10, "module-pabutools.fractions"], [15, "fractions"]], "Reference": [[11, "reference"]], "Rules module": [[12, "module-pabutools.rules"]], "Utils": [[14, "module-pabutools.utils"]], "Profile module": [[8, "module-pabutools.election.profile"]], "Preference Libraries": [[15, "preference-libraries"], [7, "preference-libraries"]], "Tie-Breaking": [[15, "tie-breaking"], [13, "module-pabutools.tiebreaking"]], "Complete Guide": [[15, "complete-guide"]], "Instances": [[15, "instances"]], "Profiles": [[15, "profiles"]], "Approval Profiles": [[15, "approval-profiles"]], "Cardinal Profiles": [[15, "cardinal-profiles"]], "Cumulative Profiles": [[15, "cumulative-profiles"]], "Ordinal Profiles": [[15, "ordinal-profiles"]], "Multiprofile": [[15, "multiprofile"]], "PaBuLib": [[15, "id1"]], "PrefLib": [[15, "preflib"]], "Satisfaction Measures": [[15, "satisfaction-measures"]], "Functional Satisfaction Functions": [[15, "functional-satisfaction-functions"]], "Additive Satisfaction Functions": [[15, "additive-satisfaction-functions"]], "Positional Satisfaction Functions": [[15, "positional-satisfaction-functions"]], "Satisfaction Functions Already Defined": [[15, "satisfaction-functions-already-defined"]], "Rules": [[15, "rules"]], "Additive Utilitarian Welfare Maximiser": [[15, "additive-utilitarian-welfare-maximiser"]], "Greedy Approximation of the Welfare Maximiser": [[15, "greedy-approximation-of-the-welfare-maximiser"]], "Sequential Phragm\u00e8n\u2019s Rule": [[15, "sequential-phragmen-s-rule"]], "Method of Equal Shares": [[15, "method-of-equal-shares"]], "Exhaustion Methods": [[15, "exhaustion-methods"]], "Rule Composition": [[15, "rule-composition"]], "Analysis module": [[3, "module-pabutools.analysis"]], "Election module": [[5, "election-module"]], "Instance module": [[6, "module-pabutools.election.instance"]], "Satisfaction module": [[9, "module-pabutools.election.satisfaction"]]}, "indexentries": {"avg_approval_score() (in module pabutools.analysis.profileproperties)": [[3, "pabutools.analysis.profileproperties.avg_approval_score"]], "avg_ballot_cost() (in module pabutools.analysis.profileproperties)": [[3, "pabutools.analysis.profileproperties.avg_ballot_cost"]], "avg_ballot_length() (in module pabutools.analysis.profileproperties)": [[3, "pabutools.analysis.profileproperties.avg_ballot_length"]], "avg_project_cost() (in module pabutools.analysis.instanceproperties)": [[3, "pabutools.analysis.instanceproperties.avg_project_cost"]], "avg_satisfaction() (in module pabutools.analysis.votersatisfaction)": [[3, "pabutools.analysis.votersatisfaction.avg_satisfaction"]], "avg_total_score() (in module pabutools.analysis.profileproperties)": [[3, "pabutools.analysis.profileproperties.avg_total_score"]], "category_proportionality() (in module pabutools.analysis.category)": [[3, "pabutools.analysis.category.category_proportionality"]], "funding_scarcity() (in module pabutools.analysis.instanceproperties)": [[3, "pabutools.analysis.instanceproperties.funding_scarcity"]], "gini_coefficient_of_satisfaction() (in module pabutools.analysis.votersatisfaction)": [[3, "pabutools.analysis.votersatisfaction.gini_coefficient_of_satisfaction"]], "median_approval_score() (in module pabutools.analysis.profileproperties)": [[3, "pabutools.analysis.profileproperties.median_approval_score"]], "median_ballot_cost() (in module pabutools.analysis.profileproperties)": [[3, "pabutools.analysis.profileproperties.median_ballot_cost"]], "median_ballot_length() (in module pabutools.analysis.profileproperties)": [[3, "pabutools.analysis.profileproperties.median_ballot_length"]], "median_project_cost() (in module pabutools.analysis.instanceproperties)": [[3, "pabutools.analysis.instanceproperties.median_project_cost"]], "median_total_score() (in module pabutools.analysis.profileproperties)": [[3, "pabutools.analysis.profileproperties.median_total_score"]], "module": [[3, "module-pabutools.analysis"], [3, "module-pabutools.analysis.category"], [3, "module-pabutools.analysis.instanceproperties"], [3, "module-pabutools.analysis.profileproperties"], [3, "module-pabutools.analysis.votersatisfaction"], [5, "module-pabutools.election"], [6, "module-pabutools.election.instance"], [9, "module-pabutools.election.satisfaction"], [13, "module-pabutools.tiebreaking"]], "pabutools.analysis": [[3, "module-pabutools.analysis"]], "pabutools.analysis.category": [[3, "module-pabutools.analysis.category"]], "pabutools.analysis.instanceproperties": [[3, "module-pabutools.analysis.instanceproperties"]], "pabutools.analysis.profileproperties": [[3, "module-pabutools.analysis.profileproperties"]], "pabutools.analysis.votersatisfaction": [[3, "module-pabutools.analysis.votersatisfaction"]], "percent_non_empty_handed() (in module pabutools.analysis.votersatisfaction)": [[3, "pabutools.analysis.votersatisfaction.percent_non_empty_handed"]], "satisfaction_histogram() (in module pabutools.analysis.votersatisfaction)": [[3, "pabutools.analysis.votersatisfaction.satisfaction_histogram"]], "std_dev_project_cost() (in module pabutools.analysis.instanceproperties)": [[3, "pabutools.analysis.instanceproperties.std_dev_project_cost"]], "sum_project_cost() (in module pabutools.analysis.instanceproperties)": [[3, "pabutools.analysis.instanceproperties.sum_project_cost"]], "pabutools.election": [[5, "module-pabutools.election"]], "instance (class in pabutools.election.instance)": [[6, "pabutools.election.instance.Instance"]], "project (class in pabutools.election.instance)": [[6, "pabutools.election.instance.Project"]], "budget_allocations() (instance method)": [[6, "pabutools.election.instance.Instance.budget_allocations"]], "budget_limit (instance attribute)": [[6, "pabutools.election.instance.Instance.budget_limit"]], "categories (instance attribute)": [[6, "pabutools.election.instance.Instance.categories"]], "categories (project attribute)": [[6, "pabutools.election.instance.Project.categories"]], "copy() (instance method)": [[6, "pabutools.election.instance.Instance.copy"]], "cost (project attribute)": [[6, "pabutools.election.instance.Project.cost"]], "difference() (instance method)": [[6, "pabutools.election.instance.Instance.difference"]], "difference_update() (instance method)": [[6, "pabutools.election.instance.Instance.difference_update"]], "file_name (instance attribute)": [[6, "pabutools.election.instance.Instance.file_name"]], "file_path (instance attribute)": [[6, "pabutools.election.instance.Instance.file_path"]], "get_project() (instance method)": [[6, "pabutools.election.instance.Instance.get_project"]], "get_random_instance() (in module pabutools.election.instance)": [[6, "pabutools.election.instance.get_random_instance"]], "intersection() (instance method)": [[6, "pabutools.election.instance.Instance.intersection"]], "intersection_update() (instance method)": [[6, "pabutools.election.instance.Instance.intersection_update"]], "is_exhaustive() (instance method)": [[6, "pabutools.election.instance.Instance.is_exhaustive"]], "is_feasible() (instance method)": [[6, "pabutools.election.instance.Instance.is_feasible"]], "is_trivial() (instance method)": [[6, "pabutools.election.instance.Instance.is_trivial"]], "max_budget_allocation_cardinality() (in module pabutools.election.instance)": [[6, "pabutools.election.instance.max_budget_allocation_cardinality"]], "max_budget_allocation_cost() (in module pabutools.election.instance)": [[6, "pabutools.election.instance.max_budget_allocation_cost"]], "meta (instance attribute)": [[6, "pabutools.election.instance.Instance.meta"]], "name (project attribute)": [[6, "pabutools.election.instance.Project.name"]], "pabutools.election.instance": [[6, "module-pabutools.election.instance"]], "parsing_errors (instance attribute)": [[6, "pabutools.election.instance.Instance.parsing_errors"]], "project_meta (instance attribute)": [[6, "pabutools.election.instance.Instance.project_meta"]], "symmetric_difference() (instance method)": [[6, "pabutools.election.instance.Instance.symmetric_difference"]], "symmetric_difference_update() (instance method)": [[6, "pabutools.election.instance.Instance.symmetric_difference_update"]], "targets (instance attribute)": [[6, "pabutools.election.instance.Instance.targets"]], "targets (project attribute)": [[6, "pabutools.election.instance.Project.targets"]], "total_cost() (in module pabutools.election.instance)": [[6, "pabutools.election.instance.total_cost"]], "union() (instance method)": [[6, "pabutools.election.instance.Instance.union"]], "approval_to_preflib() (in module pabutools.election.preflib)": [[7, "pabutools.election.preflib.approval_to_preflib"]], "cardinal_to_preflib() (in module pabutools.election.preflib)": [[7, "pabutools.election.preflib.cardinal_to_preflib"]], "init_preflib_instance() (in module pabutools.election.preflib)": [[7, "pabutools.election.preflib.init_preflib_instance"]], "ordinal_to_preflib() (in module pabutools.election.preflib)": [[7, "pabutools.election.preflib.ordinal_to_preflib"]], "parse_pabulib() (in module pabutools.election.pabulib)": [[7, "pabutools.election.pabulib.parse_pabulib"]], "additivesatisfaction (class in pabutools.election.satisfaction.additivesatisfaction)": [[9, "pabutools.election.satisfaction.additivesatisfaction.AdditiveSatisfaction"]], "additive_borda_sat (class in pabutools.election.satisfaction.positionalsatisfaction)": [[9, "pabutools.election.satisfaction.positionalsatisfaction.Additive_Borda_Sat"]], "additive_cardinal_sat (class in pabutools.election.satisfaction.additivesatisfaction)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Additive_Cardinal_Sat"]], "cc_sat (class in pabutools.election.satisfaction.functionalsatisfaction)": [[9, "pabutools.election.satisfaction.functionalsatisfaction.CC_Sat"]], "cardinality_sat (class in pabutools.election.satisfaction.additivesatisfaction)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Cardinality_Sat"]], "cost_log_sat (class in pabutools.election.satisfaction.functionalsatisfaction)": [[9, "pabutools.election.satisfaction.functionalsatisfaction.Cost_Log_Sat"]], "cost_sat (class in pabutools.election.satisfaction.additivesatisfaction)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Cost_Sat"]], "cost_sqrt_sat (class in pabutools.election.satisfaction.functionalsatisfaction)": [[9, "pabutools.election.satisfaction.functionalsatisfaction.Cost_Sqrt_Sat"]], "effort_sat (class in pabutools.election.satisfaction.additivesatisfaction)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Effort_Sat"]], "functionalsatisfaction (class in pabutools.election.satisfaction.functionalsatisfaction)": [[9, "pabutools.election.satisfaction.functionalsatisfaction.FunctionalSatisfaction"]], "groupsatisfactionmeasure (class in pabutools.election.satisfaction.satisfactionmeasure)": [[9, "pabutools.election.satisfaction.satisfactionmeasure.GroupSatisfactionMeasure"]], "positionalsatisfaction (class in pabutools.election.satisfaction.positionalsatisfaction)": [[9, "pabutools.election.satisfaction.positionalsatisfaction.PositionalSatisfaction"]], "relative_cardinality_sat (class in pabutools.election.satisfaction.additivesatisfaction)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Relative_Cardinality_Sat"]], "relative_cost_approx_normaliser_sat (class in pabutools.election.satisfaction.additivesatisfaction)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Relative_Cost_Approx_Normaliser_Sat"]], "relative_cost_sat (class in pabutools.election.satisfaction.additivesatisfaction)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Relative_Cost_Sat"]], "satisfactionmeasure (class in pabutools.election.satisfaction.satisfactionmeasure)": [[9, "pabutools.election.satisfaction.satisfactionmeasure.SatisfactionMeasure"]], "satisfactionmultiprofile (class in pabutools.election.satisfaction.satisfactionprofile)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile"]], "satisfactionprofile (class in pabutools.election.satisfaction.satisfactionprofile)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile"]], "aggregation_func (positionalsatisfaction attribute)": [[9, "pabutools.election.satisfaction.positionalsatisfaction.PositionalSatisfaction.aggregation_func"]], "append() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.append"]], "append() (satisfactionprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.append"]], "ballot (additivesatisfaction attribute)": [[9, "pabutools.election.satisfaction.additivesatisfaction.AdditiveSatisfaction.ballot"]], "ballot (functionalsatisfaction attribute)": [[9, "pabutools.election.satisfaction.functionalsatisfaction.FunctionalSatisfaction.ballot"]], "ballot (positionalsatisfaction attribute)": [[9, "pabutools.election.satisfaction.positionalsatisfaction.PositionalSatisfaction.ballot"]], "ballot (satisfactionmeasure attribute)": [[9, "pabutools.election.satisfaction.satisfactionmeasure.SatisfactionMeasure.ballot"]], "clear() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.clear"]], "clear() (satisfactionprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.clear"]], "copy() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.copy"]], "copy() (satisfactionprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.copy"]], "count() (satisfactionprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.count"]], "elements() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.elements"]], "extend() (satisfactionprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.extend"]], "extend_from_multiprofile() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.extend_from_multiprofile"]], "extend_from_profile() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.extend_from_profile"]], "extend_from_profile() (satisfactionprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.extend_from_profile"]], "fromkeys() (satisfactionmultiprofile class method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.fromkeys"]], "func (additivesatisfaction attribute)": [[9, "pabutools.election.satisfaction.additivesatisfaction.AdditiveSatisfaction.func"]], "func (functionalsatisfaction attribute)": [[9, "pabutools.election.satisfaction.functionalsatisfaction.FunctionalSatisfaction.func"]], "get() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.get"]], "get_project_sat() (additivesatisfaction method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.AdditiveSatisfaction.get_project_sat"]], "get_project_sat() (additive_cardinal_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Additive_Cardinal_Sat.get_project_sat"]], "get_project_sat() (cardinality_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Cardinality_Sat.get_project_sat"]], "get_project_sat() (cost_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Cost_Sat.get_project_sat"]], "get_project_sat() (effort_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Effort_Sat.get_project_sat"]], "get_project_sat() (relative_cardinality_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Relative_Cardinality_Sat.get_project_sat"]], "get_project_sat() (relative_cost_approx_normaliser_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Relative_Cost_Approx_Normaliser_Sat.get_project_sat"]], "get_project_sat() (relative_cost_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Relative_Cost_Sat.get_project_sat"]], "index() (satisfactionprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.index"]], "insert() (satisfactionprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.insert"]], "instance (additivesatisfaction attribute)": [[9, "pabutools.election.satisfaction.additivesatisfaction.AdditiveSatisfaction.instance"]], "instance (functionalsatisfaction attribute)": [[9, "pabutools.election.satisfaction.functionalsatisfaction.FunctionalSatisfaction.instance"]], "instance (positionalsatisfaction attribute)": [[9, "pabutools.election.satisfaction.positionalsatisfaction.PositionalSatisfaction.instance"]], "instance (satisfactionmeasure attribute)": [[9, "pabutools.election.satisfaction.satisfactionmeasure.SatisfactionMeasure.instance"]], "instance (satisfactionmultiprofile attribute)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.instance"]], "instance (satisfactionprofile attribute)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.instance"]], "items() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.items"]], "keys() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.keys"]], "most_common() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.most_common"]], "multiplicity() (groupsatisfactionmeasure method)": [[9, "pabutools.election.satisfaction.satisfactionmeasure.GroupSatisfactionMeasure.multiplicity"]], "multiplicity() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.multiplicity"]], "multiplicity() (satisfactionprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.multiplicity"]], "pabutools.election.satisfaction": [[9, "module-pabutools.election.satisfaction"]], "pop() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.pop"]], "pop() (satisfactionprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.pop"]], "popitem() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.popitem"]], "positional_func (positionalsatisfaction attribute)": [[9, "pabutools.election.satisfaction.positionalsatisfaction.PositionalSatisfaction.positional_func"]], "precomputed_values (additivesatisfaction attribute)": [[9, "pabutools.election.satisfaction.additivesatisfaction.AdditiveSatisfaction.precomputed_values"]], "preprocessing() (additivesatisfaction method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.AdditiveSatisfaction.preprocessing"]], "preprocessing() (additive_cardinal_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Additive_Cardinal_Sat.preprocessing"]], "preprocessing() (cardinality_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Cardinality_Sat.preprocessing"]], "preprocessing() (cost_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Cost_Sat.preprocessing"]], "preprocessing() (effort_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Effort_Sat.preprocessing"]], "preprocessing() (relative_cardinality_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Relative_Cardinality_Sat.preprocessing"]], "preprocessing() (relative_cost_approx_normaliser_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Relative_Cost_Approx_Normaliser_Sat.preprocessing"]], "preprocessing() (relative_cost_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Relative_Cost_Sat.preprocessing"]], "profile (additivesatisfaction attribute)": [[9, "pabutools.election.satisfaction.additivesatisfaction.AdditiveSatisfaction.profile"]], "profile (functionalsatisfaction attribute)": [[9, "pabutools.election.satisfaction.functionalsatisfaction.FunctionalSatisfaction.profile"]], "profile (positionalsatisfaction attribute)": [[9, "pabutools.election.satisfaction.positionalsatisfaction.PositionalSatisfaction.profile"]], "profile (satisfactionmeasure attribute)": [[9, "pabutools.election.satisfaction.satisfactionmeasure.SatisfactionMeasure.profile"]], "remove() (satisfactionprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.remove"]], "reverse() (satisfactionprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.reverse"]], "sat() (additivesatisfaction method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.AdditiveSatisfaction.sat"]], "sat() (additive_borda_sat method)": [[9, "pabutools.election.satisfaction.positionalsatisfaction.Additive_Borda_Sat.sat"]], "sat() (additive_cardinal_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Additive_Cardinal_Sat.sat"]], "sat() (cc_sat method)": [[9, "pabutools.election.satisfaction.functionalsatisfaction.CC_Sat.sat"]], "sat() (cardinality_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Cardinality_Sat.sat"]], "sat() (cost_log_sat method)": [[9, "pabutools.election.satisfaction.functionalsatisfaction.Cost_Log_Sat.sat"]], "sat() (cost_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Cost_Sat.sat"]], "sat() (cost_sqrt_sat method)": [[9, "pabutools.election.satisfaction.functionalsatisfaction.Cost_Sqrt_Sat.sat"]], "sat() (effort_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Effort_Sat.sat"]], "sat() (functionalsatisfaction method)": [[9, "pabutools.election.satisfaction.functionalsatisfaction.FunctionalSatisfaction.sat"]], "sat() (positionalsatisfaction method)": [[9, "pabutools.election.satisfaction.positionalsatisfaction.PositionalSatisfaction.sat"]], "sat() (relative_cardinality_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Relative_Cardinality_Sat.sat"]], "sat() (relative_cost_approx_normaliser_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Relative_Cost_Approx_Normaliser_Sat.sat"]], "sat() (relative_cost_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Relative_Cost_Sat.sat"]], "sat() (satisfactionmeasure method)": [[9, "pabutools.election.satisfaction.satisfactionmeasure.SatisfactionMeasure.sat"]], "sat_class (satisfactionmultiprofile attribute)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.sat_class"]], "sat_class (satisfactionprofile attribute)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.sat_class"]], "setdefault() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.setdefault"]], "sort() (satisfactionprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.sort"]], "subtract() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.subtract"]], "total() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.total"]], "total_satisfaction() (groupsatisfactionmeasure method)": [[9, "pabutools.election.satisfaction.satisfactionmeasure.GroupSatisfactionMeasure.total_satisfaction"]], "total_satisfaction() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.total_satisfaction"]], "total_satisfaction() (satisfactionprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.total_satisfaction"]], "update() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.update"]], "values() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.values"]], "tiebreakingexception": [[13, "pabutools.tiebreaking.TieBreakingException"]], "tiebreakingrule (class in pabutools.tiebreaking)": [[13, "pabutools.tiebreaking.TieBreakingRule"]], "app_score_tie_breaking (in module pabutools.tiebreaking)": [[13, "pabutools.tiebreaking.app_score_tie_breaking"]], "func (tiebreakingrule attribute)": [[13, "pabutools.tiebreaking.TieBreakingRule.func"]], "lexico_tie_breaking (in module pabutools.tiebreaking)": [[13, "pabutools.tiebreaking.lexico_tie_breaking"]], "max_cost_tie_breaking (in module pabutools.tiebreaking)": [[13, "pabutools.tiebreaking.max_cost_tie_breaking"]], "min_cost_tie_breaking (in module pabutools.tiebreaking)": [[13, "pabutools.tiebreaking.min_cost_tie_breaking"]], "order() (tiebreakingrule method)": [[13, "pabutools.tiebreaking.TieBreakingRule.order"]], "pabutools.tiebreaking": [[13, "module-pabutools.tiebreaking"]], "refuse_tie_breaking (in module pabutools.tiebreaking)": [[13, "pabutools.tiebreaking.refuse_tie_breaking"]], "untie() (tiebreakingrule method)": [[13, "pabutools.tiebreaking.TieBreakingRule.untie"]]}}) \ No newline at end of file +Search.setIndex({"docnames": ["index", "installation", "quickstart", "reference/analysis/index", "reference/election/ballot", "reference/election/index", "reference/election/instance", "reference/election/libraries", "reference/election/profile", "reference/election/satisfaction", "reference/fractions", "reference/index", "reference/rules/index", "reference/tiebreaking", "reference/utils", "usage"], "filenames": ["index.rst", "installation.rst", "quickstart.rst", "reference/analysis/index.rst", "reference/election/ballot.rst", "reference/election/index.rst", "reference/election/instance.rst", "reference/election/libraries.rst", "reference/election/profile.rst", "reference/election/satisfaction.rst", "reference/fractions.rst", "reference/index.rst", "reference/rules/index.rst", "reference/tiebreaking.rst", "reference/utils.rst", "usage.rst"], "titles": ["Pabutools: PB as easy as ABC", "Installation", "Quick Start", "Analysis module", "Ballot module", "Election module", "Instance module", "Preference Libraries", "Profile module", "Satisfaction module", "Fractions", "Reference", "Rules module", "Tie-Breaking", "Utils", "Complete Guide"], "terms": {"For": [0, 2, 3, 4, 8, 12, 15], "pun": 0, "see": [0, 2, 4, 6, 8, 9, 12, 15], "awesom": 0, "The": [0, 2, 3, 4, 6, 7, 8, 9, 10, 12, 13, 14, 15], "ar": [0, 1, 2, 3, 4, 6, 8, 9, 10, 12, 13, 15], "complet": [0, 4, 8, 12], "set": [0, 2, 3, 4, 6, 8, 9, 12, 13, 15], "tool": [0, 3, 15], "work": [0, 12], "participatori": [0, 2, 3, 6, 7, 12, 15], "budget": [0, 2, 3, 6, 7, 8, 9, 12, 15], "instanc": [0, 3, 4, 5, 7, 8, 9, 11, 12, 13], "i": [0, 2, 3, 4, 6, 8, 9, 10, 12, 13, 14, 15], "democrat": 0, "us": [0, 2, 3, 4, 6, 7, 8, 9, 10, 12, 15], "alloc": [0, 3, 6, 9, 12, 15], "given": [0, 3, 4, 6, 8, 9, 12, 14, 15], "amount": [0, 3, 4, 6], "monei": [0, 3, 6, 12], "collect": [0, 2, 3, 4, 6, 8, 9, 14, 15], "project": [0, 3, 4, 5, 6, 7, 8, 9, 12, 13, 15], "base": [0, 2, 4, 6, 8, 9, 13, 15], "group": [0, 6, 9, 12], "individu": [0, 9, 15], "prefer": [0, 4, 5, 11, 12], "over": [0, 3, 4, 6, 8, 9, 12, 15], "It": [0, 2, 3, 4, 6, 9, 10, 12, 15], "ha": [0, 4, 6, 8, 9, 12, 15], "been": [0, 2, 4, 6, 8, 9, 12, 15], "invent": 0, "brazil": 0, "late": 0, "80": 0, "": [0, 2, 8, 9, 10, 12], "now": [0, 2, 12], "wide": [0, 15], "implement": [0, 4, 8, 9, 12, 13, 15], "wikipedia": 0, "page": [0, 2, 15], "more": [0, 2, 3, 4, 6, 8, 9, 10, 15], "detail": [0, 7, 8, 9, 12, 15], "In": [0, 4, 6, 8, 9, 15], "thi": [0, 2, 3, 4, 6, 8, 9, 12, 15], "librari": [0, 5, 11], "we": [0, 2, 3, 4, 8, 9, 12, 15], "provid": [0, 2, 8, 9, 10, 12, 13, 15], "handl": [0, 2, 6, 10, 15], "differ": [0, 3, 4, 6, 8, 9, 15], "kind": [0, 3, 6], "togeth": [0, 3, 6, 8, 9], "vote": [0, 2, 6, 15], "rule": [0, 2, 8, 11, 13], "determin": [0, 15], "outcom": [0, 3, 12, 15], "elect": [0, 3, 4, 6, 7, 8, 11, 12, 15], "some": [0, 4, 8, 12, 15], "analyt": 0, "particular": [0, 15], "full": [0, 15], "support": [0, 3, 8, 9, 12, 13, 15], "taken": [0, 8, 15], "from": [0, 1, 2, 3, 4, 6, 8, 9, 10, 12, 13, 15], "pabulib": [0, 7], "refer": [0, 15], "when": [0, 6, 13, 15], "come": 0, "data": [0, 3, 15], "sinc": [1, 2, 4, 9, 15], "pabutool": [1, 2, 7, 8, 12, 13, 15], "host": [1, 15], "pypi": 1, "should": [1, 4, 6, 8, 9, 12, 15], "easi": 1, "pip3": 1, "you": [1, 2, 15], "can": [1, 2, 3, 4, 6, 8, 9, 10, 12, 13, 15], "also": [1, 3, 4, 6, 8, 9, 12, 15], "directli": [1, 12, 15], "download": 1, "sourc": [1, 3, 4, 6, 7, 8, 9, 10, 12, 13, 14], "our": [1, 15], "github": 1, "repositori": 1, "seem": 1, "easier": 1, "have": [2, 4, 6, 8, 9, 12, 15], "instal": 2, "packag": [2, 15], "On": 2, "guid": 2, "through": [2, 4, 9, 15], "simpl": [2, 4], "exampl": [2, 8, 9, 15], "let": 2, "begin": 2, "need": [2, 8, 9, 12, 13], "encod": 2, "least": [2, 3, 4, 8, 9, 15], "limit": [2, 3, 6, 8, 12, 15], "voter": [2, 3, 4, 6, 8, 9, 12, 15], "fundament": [2, 15], "element": [2, 4, 6, 8, 9, 14, 15], "e": [2, 4, 6, 8, 9, 13, 15], "entiti": [2, 4, 6], "upon": [2, 6], "defin": [2, 4, 6, 7, 8, 9, 10, 12], "them": [2, 8, 9, 13, 15], "class": [2, 4, 6, 7, 8, 9, 12, 13, 15], "import": [2, 4, 8, 9, 15], "p1": [2, 15], "1": [2, 3, 8, 9, 12, 15], "constructor": [2, 8, 15], "take": [2, 4, 9, 13, 15], "name": [2, 4, 6, 7, 9, 13, 15], "cost": [2, 3, 6, 8, 9, 12, 13, 15], "p2": [2, 15], "p3": [2, 15], "3": [2, 8, 9, 15], "next": [2, 15], "which": [2, 3, 4, 8, 9, 10, 12, 13, 15], "along": [2, 15], "addit": [2, 4, 6, 8, 9, 12], "inform": [2, 4, 6, 15], "about": [2, 6, 12, 15], "store": [2, 4, 6, 8, 9, 15], "all": [2, 3, 4, 6, 7, 8, 9, 10, 12, 13, 14, 15], "regard": 2, "except": [2, 4, 6, 8, 13], "what": [2, 15], "concern": [2, 4], "instanti": [2, 10, 15], "deriv": [2, 4, 8], "python": [2, 4, 6, 8, 9, 15], "one": [2, 3, 4, 6, 7, 8, 9, 12, 15], "There": 2, "mani": [2, 4, 8, 9], "option": [2, 3, 4, 6, 8, 9, 12, 13, 15], "paramet": [2, 3, 4, 6, 7, 8, 9, 10, 12, 13, 14, 15], "add": [2, 8, 9, 15], "method": [2, 4, 8, 9, 12], "popul": [2, 15], "updat": [2, 4, 6, 8, 9], "budget_limit": [2, 6, 15], "importantli": [2, 6, 9, 15], "ani": [2, 3, 9, 15], "comparison": [2, 3, 12, 15], "between": [2, 3, 6, 13, 15], "two": [2, 3, 4, 6, 8, 9, 10, 15], "g": 2, "equal": [2, 8, 9, 12], "ad": [2, 6, 8, 15], "p": [2, 15], "anoth": [2, 4, 6, 8, 9, 15], "result": [2, 15], "singl": [2, 13, 15], "essenti": [2, 4], "compon": [2, 15], "A": [2, 3, 4, 6, 7, 8, 9, 10, 12, 13, 14, 15], "gather": [2, 15], "assum": [2, 12, 14], "submit": [2, 4, 6, 15], "approv": [2, 3, 4, 7, 8, 9, 12, 13], "thei": [2, 4, 8, 9, 12, 15], "approvalballot": [2, 4, 5, 8, 15], "follow": [2, 4, 8, 9, 12, 15], "b1": [2, 15], "initi": [2, 6, 8, 9, 12, 15], "b2": [2, 15], "b3": [2, 15], "inherit": [2, 4, 8, 9, 15], "approvalprofil": [2, 3, 5, 7, 8, 15], "append": [2, 4, 8, 9, 15], "list": [2, 3, 8, 9, 12, 13, 15], "readi": [2, 15], "win": 2, "purpos": [2, 4, 8, 15], "modul": [2, 10, 11, 15], "want": 2, "standard": [2, 3, 4, 15], "greedi": [2, 12], "commonli": 2, "citi": 2, "around": 2, "world": 2, "cost_sat": [2, 5, 9, 15], "greedy_utilitarian_welfar": [2, 11, 12, 15], "sat_class": [2, 3, 8, 9, 12, 15], "approxim": [2, 9, 12], "utilitarian": [2, 12], "welfar": [2, 12], "satisfact": [2, 3, 5, 8, 11, 12], "measur": [2, 3, 8, 9, 12], "discuss": [2, 15], "yet": [2, 4], "keep": 2, "mind": 2, "wai": [2, 9, 12, 15], "assess": 2, "qualiti": 2, "total": [2, 3, 6, 8, 9, 12, 15], "select": [2, 3, 4, 6, 9, 12, 13, 15], "appear": [2, 3, 8, 9], "check": [2, 8], "out": [2, 8, 9], "other": [2, 4, 6, 8, 15], "phragm\u00e9n": [2, 12], "sequenti": [2, 12], "share": [2, 12], "sequential_phragmen": [2, 11, 12, 15], "method_of_equal_shar": [2, 11, 12, 15], "outcome1": 2, "outcome2": 2, "contain": [3, 4, 6, 7, 8, 9, 14, 15], "analys": 3, "avg_project_cost": [3, 11], "number": [3, 4, 6, 8, 9, 10, 12, 13, 14, 15], "return": [3, 4, 6, 7, 8, 9, 10, 12, 13, 14, 15], "averag": [3, 15], "type": [3, 4, 6, 7, 8, 9, 10, 12, 13, 14, 15], "funding_scarc": [3, 11], "ratio": 3, "divid": [3, 9, 12, 15], "call": [3, 4, 8], "fund": 3, "scarciti": 3, "median_project_cost": [3, 11], "median": 3, "std_dev_project_cost": [3, 11], "deviat": 3, "sum_project_cost": [3, 11], "avg_approval_scor": [3, 11], "profil": [3, 5, 6, 7, 9, 11, 12, 13], "abstractapprovalprofil": [3, 5, 7, 8, 12], "score": [3, 4, 8, 9, 13, 15], "avg_ballot_cost": [3, 11], "abstractprofil": [3, 5, 8, 9, 12], "ballot": [3, 5, 6, 7, 8, 9, 11, 12, 15], "avg_ballot_length": [3, 11], "length": [3, 8, 9, 15], "avg_total_scor": [3, 11], "abstractcardinalprofil": [3, 5, 7, 8], "assign": [3, 4, 6, 8, 9, 15], "median_approval_scor": [3, 11], "median_ballot_cost": [3, 11], "median_ballot_length": [3, 11], "int": [3, 4, 6, 8, 9, 12, 14, 15], "median_total_scor": [3, 11], "avg_satisfact": [3, 11], "budget_alloc": [3, 6, 15], "iter": [3, 4, 6, 8, 9, 12, 13, 14, 15], "satisfactionmeasur": [3, 5, 8, 9, 12, 15], "comput": [3, 8, 9, 10, 12, 14, 15], "do": [3, 9, 12, 15], "gini_coefficient_of_satisfact": [3, 11], "invert": 3, "bool": [3, 6, 8, 12], "fals": [3, 6, 8, 9, 12, 15], "gini": [3, 14], "coeffici": [3, 14], "true": [3, 6, 8, 12, 15], "minu": [3, 8, 9], "default": [3, 4, 6, 8, 9, 10, 12, 13, 15], "percent_non_empty_hand": [3, 11], "percentag": 3, "mostli": 3, "make": [3, 12, 15], "sens": 3, "though": [3, 6], "oper": [3, 9], "non": [3, 4, 8, 12, 15], "empti": [3, 8, 9, 12], "hand": 3, "satisfaction_histogram": [3, 11], "max_satisfact": 3, "num_bin": 3, "20": 3, "necessari": [3, 7, 8], "plot": [3, 15], "histogram": 3, "each": [3, 4, 8, 9, 12, 15], "bin": 3, "whose": [3, 8], "correspond": [3, 4, 6, 7, 8, 9, 12, 15], "normalis": [3, 9], "valu": [3, 4, 6, 8, 9, 13, 14, 15], "per": [3, 8, 9, 12, 15], "category_proportion": [3, 11], "categori": [3, 4, 6, 8], "exist": 3, "specif": [3, 8, 9, 12, 15], "an": [3, 4, 6, 8, 9, 10, 12, 13, 14, 15], "error": [3, 6, 10, 13, 15], "rais": [3, 4, 6, 8, 9, 10, 13, 15], "specifi": [3, 8, 9], "dedic": 3, "power": 3, "2": [3, 8, 9, 15], "global": 3, "consid": [3, 4, 8, 9], "exponenti": 3, "proportion": 3, "describ": [4, 7, 8, 10, 15], "format": [4, 8, 15], "form": [4, 6, 8], "just": 4, "indic": [4, 6, 8, 12, 15], "complex": 4, "cardin": [4, 7, 8, 9], "introduc": [4, 8, 9, 10, 12, 15], "abstract": [4, 8, 9, 15], "abstractballot": [4, 5, 8, 9], "gener": [4, 6, 8, 9, 12, 14, 15], "first": [4, 8, 9, 12, 13, 14, 15], "These": [4, 6, 8, 15], "cardinalballot": [4, 5, 8, 15], "cumulativeballot": [4, 5, 8, 15], "ordinalballot": [4, 5, 8, 15], "second": [4, 8, 14, 15], "so": [4, 8, 9, 15], "frozen": [4, 8, 15], "behav": [4, 15], "exactli": [4, 6, 9], "regular": 4, "mutabl": [4, 8], "thu": [4, 8, 9, 15], "hashabl": [4, 8], "u": 4, "allow": [4, 8, 9, 15], "kei": [4, 6, 8, 9, 13, 15], "dictionari": [4, 6, 8, 9, 12, 15], "multiprofil": [4, 5, 8, 9], "frozenapprovalballot": [4, 5, 8, 15], "frozencardinalballot": [4, 5, 8, 15], "frozencumulativeballot": [4, 5, 8, 15], "frozenordinalballot": [4, 5, 8, 15], "abstractapprovalballot": [4, 5, 9], "abstractcardinalballot": [4, 5, 9], "abstractcumulativeballot": [4, 5], "abstractordinalballot": [4, 5, 9], "str": [4, 6, 7, 9, 10, 15], "meta": [4, 6, 15], "dict": [4, 6, 7, 8, 9, 12, 15], "none": [4, 6, 7, 8, 9, 12, 13, 15], "abc": [4, 8, 9], "repres": [4, 6, 8, 9, 10, 15], "hint": 4, "identifi": [4, 6], "typic": [4, 6, 8, 12, 15], "string": [4, 6, 10, 15], "could": [4, 6, 12], "gender": 4, "locat": 4, "etc": [4, 15], "frozenballot": [4, 5, 8, 15], "its": [4, 8, 9, 14, 15], "init": [4, 6, 8, 9], "subclass": [4, 6, 8], "initialis": [4, 7, 8, 9], "case": [4, 6, 8, 9, 15], "object": [4, 6, 8, 9, 13], "pass": [4, 6, 8, 9, 12, 15], "attribut": [4, 6, 8, 9, 15], "copi": [4, 6, 8, 9], "keyword": [4, 6, 8, 12], "argument": [4, 6, 8, 9, 12, 14, 15], "arg": [4, 6, 8, 9, 10], "shallow": [4, 6, 8, 9], "new": [4, 6, 8, 9], "difference_upd": [4, 6], "remov": [4, 6, 8, 9, 15], "intersect": [4, 6], "both": [4, 6, 8, 9, 15], "intersection_upd": [4, 6], "itself": [4, 6, 8, 9], "symmetric_differ": [4, 6], "symmetr": [4, 6], "symmetric_difference_upd": [4, 6], "union": [4, 6], "either": [4, 6, 8, 9, 10], "get_random_approval_ballot": [4, 5], "randomappballot": 4, "random": [4, 6, 8], "probabl": [4, 8], "0": [4, 6, 8, 9, 12, 15], "5": [4, 8, 9, 15], "randomli": [4, 6, 8], "tupl": [4, 7, 8, 9, 14], "express": 4, "simpli": [4, 8, 9, 13, 15], "map": [4, 7, 9, 15], "default_scor": [4, 8], "d": [4, 8, 9], "overrid": 4, "set_item": 4, "ensur": [4, 8, 9, 15], "cumul": [4, 8], "distribut": [4, 15], "point": [4, 15], "special": [4, 8, 13], "ordin": [4, 7, 8, 9], "order": [4, 8, 9, 13, 15], "accord": [4, 8, 9, 12, 13], "technic": 4, "reason": 4, "convent": 4, "present": [4, 8, 9, 15], "most": [4, 8, 9, 12, 15], "If": [4, 6, 8, 9, 10, 12, 14, 15], "alreadi": [4, 9], "posit": [4, 9], "doe": [4, 6, 8, 9, 15], "chang": [4, 15], "at_index": 4, "index": [4, 8, 9, 15], "valueerror": [4, 8, 9], "invalid": 4, "loop": 4, "until": [4, 12, 15], "find": [4, 6, 15], "requir": [4, 15], "found": [4, 6, 8, 9], "get_random_inst": [5, 6], "total_cost": [5, 6], "approvalmultiprofil": [3, 5, 8, 15], "get_random_approval_profil": [5, 8], "get_all_approval_profil": [5, 8], "cardinalprofil": [5, 7, 8, 15], "cardinalmultiprofil": [5, 8, 15], "abstractcumulativeprofil": [5, 8], "cumulativeprofil": [5, 8, 15], "cumulativemultiprofil": [5, 8, 15], "abstractordinalprofil": [5, 7, 8], "ordinalprofil": [5, 7, 8, 15], "ordinalmultiprofil": [5, 8, 15], "groupsatisfactionmeasur": [5, 8, 9, 12], "satisfactionmultiprofil": [5, 9, 15], "satisfactionprofil": [5, 9, 15], "functionalsatisfact": [5, 9, 15], "cc_sat": [5, 9, 15], "cost_sqrt_sat": [5, 9, 15], "cost_log_sat": [5, 9, 15], "additivesatisfact": [5, 9, 15], "cardinality_sat": [5, 9, 15], "relative_cardinality_sat": [5, 9, 15], "relative_cost_sat": [5, 9, 15], "relative_cost_approx_normaliser_sat": [5, 9, 15], "effort_sat": [5, 9, 15], "additive_cardinal_sat": [5, 9, 15], "positionalsatisfact": [5, 9, 15], "additive_borda_sat": [5, 9, 15], "parse_pabulib": [5, 7, 15], "init_preflib_inst": [5, 7], "approval_to_preflib": [5, 7, 15], "cardinal_to_preflib": [5, 7, 15], "ordinal_to_preflib": [5, 7, 15], "basic": 6, "here": [6, 8, 9, 15], "target": 6, "file_path": [6, 7], "file_nam": [6, 7], "parsing_error": 6, "project_meta": [6, 15], "part": [6, 9], "how": [6, 12, 15], "note": [6, 8, 9, 12, 15], "constitut": 6, "maximum": [6, 8, 9, 12, 15], "feasibl": [6, 15], "urban": 6, "greeneri": 6, "public": [6, 7], "transport": 6, "citizen": 6, "abov": [6, 9, 15], "60": 6, "year": 6, "old": 6, "resid": 6, "district": 6, "pars": [6, 7, 15], "file": [6, 7, 15], "path": [6, 7], "boolean": [6, 8, 12, 15], "were": [6, 15], "encount": 6, "relev": 6, "get_project": 6, "project_nam": 6, "otherwis": [6, 8, 9, 15], "keyerror": [6, 8, 9], "is_exhaust": [6, 15], "test": [6, 8, 15], "exhaust": [6, 12], "said": 6, "without": 6, "violat": [6, 12], "is_feas": [6, 15], "mean": [6, 8, 14], "exce": [6, 8], "less": 6, "than": [6, 10, 15], "is_trivi": [6, 8], "trivial": [6, 8], "exceed": [6, 9, 12], "uniqu": [6, 8, 9], "enforc": 6, "member": [6, 15], "num_project": 6, "min_cost": 6, "max_cost": 6, "integ": [6, 15], "uniformli": 6, "sampl": 6, "uniform": 6, "minimum": [6, 8, 15], "round": [6, 12], "up": [6, 8, 9, 12, 15], "closest": 6, "sum": [6, 8, 9, 12, 15], "correct": 7, "depend": [7, 15], "metadata": [7, 8, 15], "preflib_inst": [7, 15], "preflibinst": 7, "modification_typ": 7, "relates_to": 7, "related_fil": 7, "titl": 7, "descript": 7, "publication_d": 7, "modification_d": 7, "alternative_nam": 7, "preflib": 7, "preflibtool": 7, "modif": 7, "document": 7, "relat": [7, 8, 15], "date": 7, "last": [7, 8, 9], "altern": 7, "origin": [7, 15], "categoricalinst": 7, "convert": [7, 8, 9, 10, 15], "py": [7, 8], "ordinalinst": 7, "structur": 8, "veri": 8, "similar": [8, 15], "Then": [8, 15], "usual": 8, "those": 8, "onli": [8, 9, 12, 13, 15], "multipl": [8, 9, 14, 15], "appli": [8, 9, 12, 13, 15], "ballot_valid": [8, 15], "ballot_typ": [8, 15], "meant": [8, 9], "whether": 8, "valid": [8, 15], "befor": [8, 9, 15], "being": 8, "against": 8, "as_sat_profil": [8, 15], "interchang": [8, 15], "inquir": 8, "num_ballot": 8, "validate_ballot": [8, 15], "throw": 8, "typeerror": [8, 15], "activ": [8, 15], "item": [8, 9], "end": [8, 9], "as_multiprofil": [8, 15], "extend": [8, 9], "insert": [8, 9], "regardless": [8, 9], "input": [8, 9, 13, 15], "even": [8, 9], "save": [8, 9], "counter": [8, 9, 15], "multiset": [8, 15], "force_freez": 8, "beforehand": 8, "legal_min_length": [8, 15], "legal_max_length": [8, 15], "legal_min_cost": [8, 15], "legal_max_cost": [8, 15], "approval_scor": [8, 15], "who": [8, 9], "approved_project": 8, "is_party_list": [8, 15], "parti": [8, 15], "disjoint": 8, "clear": [8, 9, 15], "count": [8, 9], "occurr": [8, 9], "start": [8, 9, 12, 15], "stop": [8, 9, 12], "9223372036854775807": [8, 9], "pop": [8, 9], "indexerror": [8, 9], "rang": [8, 9, 15], "revers": [8, 9], "IN": [8, 9], "place": [8, 9], "sort": [8, 9, 13], "ascend": [8, 9], "modifi": [8, 9], "stabl": [8, 9], "maintain": [8, 9], "function": [8, 9, 10, 12, 13, 14], "onc": [8, 9, 15], "descend": [8, 9], "flag": [8, 9], "repeat": [8, 9], "time": [8, 9, 12], "c": [8, 9], "abcabc": [8, 9], "b": [8, 9, 15], "knuth": [8, 9], "prime": [8, 9], "factor": [8, 9], "1836": [8, 9], "17": [8, 9], "math": [8, 9], "prime_factor": [8, 9], "prod": [8, 9], "zero": [8, 9], "neg": [8, 9], "ignor": [8, 9], "classmethod": [8, 9], "fromkei": [8, 9], "v": [8, 9], "creat": [8, 9, 15], "get": [8, 9, 15], "els": [8, 9, 15], "like": [8, 9], "view": [8, 9], "most_common": [8, 9], "n": [8, 9], "common": [8, 9], "abracadabra": [8, 9], "r": [8, 9], "k": [8, 9], "popitem": [8, 9], "pair": [8, 9], "lifo": [8, 9], "setdefault": [8, 9], "subtract": [8, 9], "kwd": [8, 9], "instead": [8, 9, 15], "replac": [8, 9], "reduc": [8, 9], "below": [8, 9, 15], "output": [8, 9], "witch": [8, 9], "watch": [8, 9], "h": [8, 9], "w": [8, 9], "four": [8, 9], "4": [8, 9, 15], "num_ag": 8, "respect": [6, 8, 15], "agent": 8, "possibl": [8, 12], "subset": [6, 8, 9, 14, 15], "legal_min_scor": [8, 15], "legal_max_scor": [8, 15], "total_scor": 8, "receiv": [8, 12], "legal_min_total_scor": [8, 15], "legal_max_total_scor": [8, 15], "across": 8, "forzenordinalballot": 8, "larg": 9, "thing": 9, "As": [9, 12, 15], "three": 9, "chamberlin": [9, 15], "courant": [9, 15], "squar": [9, 15], "root": [9, 15], "log": [9, 15], "rel": 9, "approx": 9, "effort": 9, "borda": [9, 15], "alwai": 9, "link": 9, "hase": 9, "compar": 9, "sole": 9, "sat": [9, 15], "intern": 9, "total_satisfact": 9, "extract": 9, "well": [9, 15], "potenti": [9, 15], "extend_from_multiprofil": 9, "extend_from_profil": 9, "func": [9, 13], "callabl": [9, 12, 13], "via": [9, 15], "actual": [9, 15], "under": 9, "consider": 9, "To": [9, 15], "speed": [9, 15], "precomput": 9, "fraction": [8, 9, 11], "precomputed_valu": [9, 15], "preprocess": 9, "get_project_sat": 9, "after": 9, "avoid": 9, "re": 9, "largest": [9, 12, 15], "previou": [9, 15], "denomin": 9, "expens": [9, 15], "exact": 9, "version": 9, "long": [9, 15], "includ": [9, 15], "positional_func": 9, "aggregation_func": 9, "That": 9, "aggreg": [9, 15], "plu": 9, "frac": [10, 11, 15], "constant": [10, 15], "One": 10, "str_as_frac": [10, 11, 15], "gmpy2": [10, 15], "float": [10, 15], "max_additive_utilitarian_welfar": [11, 12, 15], "completion_by_rule_combin": [11, 12, 15], "exhaustion_by_budget_increas": [11, 12, 15], "popularity_comparison": [11, 12, 15], "social_welfare_comparison": [11, 12, 15], "analysi": [11, 15], "tie": [11, 12], "break": [11, 12], "tiebreakingexcept": [11, 13], "tiebreakingrul": [11, 12, 13, 15], "app_score_tie_break": [11, 13, 15], "lexico_tie_break": [11, 13, 15], "max_cost_tie_break": [11, 13, 15], "min_cost_tie_break": [11, 13, 15], "refuse_tie_break": [11, 13], "util": [11, 15], "gini_coeffici": [11, 14], "mean_gener": [11, 14], "powerset": [11, 14], "known": [12, 15], "maximis": 12, "mai": [12, 15], "much": 12, "notabl": [12, 15], "combin": [12, 15], "increas": [12, 15], "sat_profil": [12, 15], "is_sat_addit": [12, 15], "tie_break": [12, 15], "resolut": [12, 15], "initial_budget_alloc": [12, 15], "scheme": 12, "lead": [12, 15], "highest": [12, 13], "would": [12, 15], "constraint": [12, 15], "skip": 12, "social": [12, 15], "inheret": 12, "satisf": 12, "disregard": 12, "former": 12, "latter": 12, "deduct": 12, "tiebreak": [12, 13, 15], "lexicograph": [12, 13], "obtain": 12, "irresolut": [12, 15], "where": [12, 13, 15], "ti": [12, 13, 15], "maxim": [12, 15], "satisfactin": 12, "bugdet": 12, "linear": [12, 15], "program": [12, 15], "solver": [12, 15], "control": [12, 15], "broken": [12, 13, 15], "initial_load": 12, "virtual": 12, "currenc": 12, "continu": 12, "soon": 12, "asa": 12, "enough": 12, "bui": 12, "bought": 12, "load": 12, "By": [12, 15], "me": [12, 15], "websit": [12, 15], "equalshar": [12, 15], "net": [12, 15], "asssum": 12, "rule_sequ": 12, "rule_param": [12, 15], "run": [12, 15], "sequenc": [12, 14, 15], "reach": 12, "budget_step": [12, 15], "retriev": 12, "step": 12, "sever": [12, 15], "yield": [12, 15], "occur": 13, "among": [13, 15], "lambda": 13, "x": 13, "unti": [13, 15], "wher": 13, "favour": 13, "lowest": 13, "vector": 14, "offer": 15, "comprehens": 15, "explan": 15, "simpler": 15, "tutori": 15, "quick": 15, "pleas": 15, "encapsul": 15, "central": 15, "augment": 15, "accept": 15, "invok": 15, "print": 15, "serv": 15, "primarili": 15, "act": 15, "similarli": 15, "associ": 15, "consist": 15, "deactiv": 15, "10": 15, "8": 15, "membership": 15, "ask": 15, "becom": 15, "p0": 15, "p4": 15, "rank": 15, "unic": 15, "faster": 15, "counterpart": 15, "immut": 15, "represent": 15, "easili": 15, "app_ballot": 15, "freez": 15, "frozen_ballot": 15, "turn": 15, "gain": 15, "show": 15, "7": 15, "runtim": 15, "multiprofile_runtim": 15, "profile_runtim": 15, "max": 15, "insight": 15, "scale": 15, "conform": 15, "appropri": 15, "path_to_the_fil": 15, "extens": 15, "hous": 15, "subject": 15, "must": 15, "impos": 15, "categor": 15, "app_profil": 15, "card_profil": 15, "ord_profil": 15, "variou": 15, "concept": 15, "proxi": 15, "deduc": 15, "rather": 15, "flexibl": 15, "custom": 15, "ones": 15, "Such": 15, "addition": 15, "facilit": 15, "manag": 15, "workflow": 15, "involv": 15, "mysatisfact": 15, "def": 15, "self": 15, "100": 15, "len": 15, "simplifi": 15, "process": 15, "conveni": 15, "demonstr": 15, "illustr": 15, "cc_sat_func": 15, "__init__": 15, "super": 15, "Its": 15, "cardinality_sat_func": 15, "borda_sat_func": 15, "size": 15, "resembl": 15, "normal": 15, "celebr": 15, "aim": 15, "automat": 15, "Or": 15, "irresolute_outcom": 15, "mip": 15, "exclud": [9, 15], "previous": 15, "becaus": 15, "moreov": 15, "adapt": 15, "primari": 15, "context": 15, "sai": 15, "highli": 15, "recommend": 15, "decid": 15, "reli": 15, "render": 15, "achiev": 15, "budget_allocation_mes_iter": 15, "hope": 15, "suitabl": 15, "24": [], "someth": 15, "compos": 15, "wa": 15, "wieliczka": 15, "\u015bwiec": 15, "mes_ful": 15, "popular": 15, "mainli": 15, "seen": 15, "customiz": 15, "Not": 15, "undesir": 15, "behavior": 15, "fraction_from_int": 15, "6": 15, "fraction_from_str": 15, "algorithm": 15, "21": 3, "max_budget_allocation_cardin": [5, 6], "max_budget_allocation_cost": [5, 6], "chosen": 6, "param": 8, "budget_allocation_mes_complet": 15, "inner_sat_class": 9, "rare": 9, "deepcopi": 9, "remove_satisfi": 9, "sat_bound": 9, "satisfi": 9, "met": 9, "bound": 9, "noth": 9, "care": 9, "pre": 15, "fix": 15, "done": 15}, "objects": {"pabutools": [[3, 0, 0, "-", "analysis"], [5, 0, 0, "-", "election"], [10, 0, 0, "-", "fractions"], [12, 0, 0, "-", "rules"], [13, 0, 0, "-", "tiebreaking"], [14, 0, 0, "-", "utils"]], "pabutools.analysis": [[3, 0, 0, "-", "category"], [3, 0, 0, "-", "instanceproperties"], [3, 0, 0, "-", "profileproperties"], [3, 0, 0, "-", "votersatisfaction"]], "pabutools.analysis.category": [[3, 1, 1, "", "category_proportionality"]], "pabutools.analysis.instanceproperties": [[3, 1, 1, "", "avg_project_cost"], [3, 1, 1, "", "funding_scarcity"], [3, 1, 1, "", "median_project_cost"], [3, 1, 1, "", "std_dev_project_cost"], [3, 1, 1, "", "sum_project_cost"]], "pabutools.analysis.profileproperties": [[3, 1, 1, "", "avg_approval_score"], [3, 1, 1, "", "avg_ballot_cost"], [3, 1, 1, "", "avg_ballot_length"], [3, 1, 1, "", "avg_total_score"], [3, 1, 1, "", "median_approval_score"], [3, 1, 1, "", "median_ballot_cost"], [3, 1, 1, "", "median_ballot_length"], [3, 1, 1, "", "median_total_score"]], "pabutools.analysis.votersatisfaction": [[3, 1, 1, "", "avg_satisfaction"], [3, 1, 1, "", "gini_coefficient_of_satisfaction"], [3, 1, 1, "", "percent_non_empty_handed"], [3, 1, 1, "", "satisfaction_histogram"]], "pabutools.election": [[4, 0, 0, "-", "ballot"], [6, 0, 0, "-", "instance"], [8, 0, 0, "-", "profile"], [9, 0, 0, "-", "satisfaction"]], "pabutools.election.ballot.approvalballot": [[4, 2, 1, "", "AbstractApprovalBallot"], [4, 2, 1, "", "ApprovalBallot"], [4, 2, 1, "", "FrozenApprovalBallot"], [4, 1, 1, "", "get_random_approval_ballot"]], "pabutools.election.ballot.approvalballot.ApprovalBallot": [[4, 3, 1, "", "copy"], [4, 3, 1, "", "difference"], [4, 3, 1, "", "difference_update"], [4, 3, 1, "", "frozen"], [4, 3, 1, "", "intersection"], [4, 3, 1, "", "intersection_update"], [4, 4, 1, "", "meta"], [4, 4, 1, "", "name"], [4, 3, 1, "", "symmetric_difference"], [4, 3, 1, "", "symmetric_difference_update"], [4, 3, 1, "", "union"]], "pabutools.election.ballot.approvalballot.FrozenApprovalBallot": [[4, 4, 1, "", "meta"], [4, 4, 1, "", "name"]], "pabutools.election.ballot.ballot": [[4, 2, 1, "", "AbstractBallot"], [4, 2, 1, "", "Ballot"], [4, 2, 1, "", "FrozenBallot"]], "pabutools.election.ballot.ballot.AbstractBallot": [[4, 4, 1, "", "meta"], [4, 4, 1, "", "name"]], "pabutools.election.ballot.ballot.Ballot": [[4, 3, 1, "", "frozen"], [4, 4, 1, "", "meta"], [4, 4, 1, "", "name"]], "pabutools.election.ballot.ballot.FrozenBallot": [[4, 4, 1, "", "meta"], [4, 4, 1, "", "name"]], "pabutools.election.ballot.cardinalballot": [[4, 2, 1, "", "AbstractCardinalBallot"], [4, 2, 1, "", "CardinalBallot"], [4, 2, 1, "", "FrozenCardinalBallot"]], "pabutools.election.ballot.cardinalballot.CardinalBallot": [[4, 3, 1, "", "complete"], [4, 3, 1, "", "copy"], [4, 3, 1, "", "frozen"], [4, 4, 1, "", "meta"], [4, 4, 1, "", "name"]], "pabutools.election.ballot.cardinalballot.FrozenCardinalBallot": [[4, 4, 1, "", "meta"], [4, 4, 1, "", "name"]], "pabutools.election.ballot.cumulativeballot": [[4, 2, 1, "", "AbstractCumulativeBallot"], [4, 2, 1, "", "CumulativeBallot"], [4, 2, 1, "", "FrozenCumulativeBallot"]], "pabutools.election.ballot.cumulativeballot.CumulativeBallot": [[4, 3, 1, "", "copy"], [4, 3, 1, "", "frozen"], [4, 4, 1, "", "meta"], [4, 4, 1, "", "name"]], "pabutools.election.ballot.cumulativeballot.FrozenCumulativeBallot": [[4, 4, 1, "", "meta"], [4, 4, 1, "", "name"]], "pabutools.election.ballot.ordinalballot": [[4, 2, 1, "", "AbstractOrdinalBallot"], [4, 2, 1, "", "FrozenOrdinalBallot"], [4, 2, 1, "", "OrdinalBallot"]], "pabutools.election.ballot.ordinalballot.FrozenOrdinalBallot": [[4, 4, 1, "", "meta"], [4, 4, 1, "", "name"]], "pabutools.election.ballot.ordinalballot.OrdinalBallot": [[4, 3, 1, "", "append"], [4, 3, 1, "", "at_index"], [4, 3, 1, "", "copy"], [4, 3, 1, "", "frozen"], [4, 3, 1, "", "index"], [4, 4, 1, "", "meta"], [4, 4, 1, "", "name"]], "pabutools.election.instance": [[6, 2, 1, "", "Instance"], [6, 2, 1, "", "Project"], [6, 1, 1, "", "get_random_instance"], [6, 1, 1, "", "max_budget_allocation_cardinality"], [6, 1, 1, "", "max_budget_allocation_cost"], [6, 1, 1, "", "total_cost"]], "pabutools.election.instance.Instance": [[6, 3, 1, "", "budget_allocations"], [6, 4, 1, "", "budget_limit"], [6, 4, 1, "", "categories"], [6, 3, 1, "", "copy"], [6, 3, 1, "", "difference"], [6, 3, 1, "", "difference_update"], [6, 4, 1, "", "file_name"], [6, 4, 1, "", "file_path"], [6, 3, 1, "", "get_project"], [6, 3, 1, "", "intersection"], [6, 3, 1, "", "intersection_update"], [6, 3, 1, "", "is_exhaustive"], [6, 3, 1, "", "is_feasible"], [6, 3, 1, "", "is_trivial"], [6, 4, 1, "", "meta"], [6, 4, 1, "", "parsing_errors"], [6, 4, 1, "", "project_meta"], [6, 3, 1, "", "symmetric_difference"], [6, 3, 1, "", "symmetric_difference_update"], [6, 4, 1, "", "targets"], [6, 3, 1, "", "union"]], "pabutools.election.instance.Project": [[6, 4, 1, "", "categories"], [6, 4, 1, "", "cost"], [6, 4, 1, "", "name"], [6, 4, 1, "", "targets"]], "pabutools.election.pabulib": [[7, 1, 1, "", "parse_pabulib"]], "pabutools.election.preflib": [[7, 1, 1, "", "approval_to_preflib"], [7, 1, 1, "", "cardinal_to_preflib"], [7, 1, 1, "", "init_preflib_instance"], [7, 1, 1, "", "ordinal_to_preflib"]], "pabutools.election.profile.approvalprofile": [[8, 2, 1, "", "AbstractApprovalProfile"], [8, 2, 1, "", "ApprovalMultiProfile"], [8, 2, 1, "", "ApprovalProfile"], [8, 1, 1, "", "get_all_approval_profiles"], [8, 1, 1, "", "get_random_approval_profile"]], "pabutools.election.profile.approvalprofile.AbstractApprovalProfile": [[8, 3, 1, "", "approval_score"], [8, 3, 1, "", "approved_projects"], [8, 3, 1, "", "is_party_list"], [8, 3, 1, "", "is_trivial"], [8, 4, 1, "", "legal_max_cost"], [8, 4, 1, "", "legal_max_length"], [8, 4, 1, "", "legal_min_cost"], [8, 4, 1, "", "legal_min_length"]], "pabutools.election.profile.approvalprofile.ApprovalMultiProfile": [[8, 3, 1, "", "append"], [8, 3, 1, "", "approval_score"], [8, 3, 1, "", "approved_projects"], [8, 3, 1, "", "as_sat_profile"], [8, 4, 1, "", "ballot_type"], [8, 4, 1, "", "ballot_validation"], [8, 3, 1, "", "clear"], [8, 3, 1, "", "copy"], [8, 3, 1, "", "elements"], [8, 3, 1, "", "extend"], [8, 3, 1, "", "fromkeys"], [8, 3, 1, "", "get"], [8, 4, 1, "", "instance"], [8, 3, 1, "", "is_party_list"], [8, 3, 1, "", "is_trivial"], [8, 3, 1, "", "items"], [8, 3, 1, "", "keys"], [8, 4, 1, "", "legal_max_cost"], [8, 4, 1, "", "legal_max_length"], [8, 4, 1, "", "legal_min_cost"], [8, 4, 1, "", "legal_min_length"], [8, 3, 1, "", "most_common"], [8, 3, 1, "", "multiplicity"], [8, 3, 1, "", "num_ballots"], [8, 3, 1, "", "pop"], [8, 3, 1, "", "popitem"], [8, 3, 1, "", "setdefault"], [8, 3, 1, "", "subtract"], [8, 3, 1, "", "total"], [8, 3, 1, "", "update"], [8, 3, 1, "", "validate_ballot"], [8, 3, 1, "", "values"]], "pabutools.election.profile.approvalprofile.ApprovalProfile": [[8, 3, 1, "", "append"], [8, 3, 1, "", "approval_score"], [8, 3, 1, "", "approved_projects"], [8, 3, 1, "", "as_multiprofile"], [8, 3, 1, "", "as_sat_profile"], [8, 4, 1, "", "ballot_type"], [8, 4, 1, "", "ballot_validation"], [8, 3, 1, "", "clear"], [8, 3, 1, "", "copy"], [8, 3, 1, "", "count"], [8, 3, 1, "", "extend"], [8, 3, 1, "", "index"], [8, 3, 1, "", "insert"], [8, 4, 1, "", "instance"], [8, 3, 1, "", "is_party_list"], [8, 3, 1, "", "is_trivial"], [8, 4, 1, "", "legal_max_cost"], [8, 4, 1, "", "legal_max_length"], [8, 4, 1, "", "legal_min_cost"], [8, 4, 1, "", "legal_min_length"], [8, 3, 1, "", "multiplicity"], [8, 3, 1, "", "num_ballots"], [8, 3, 1, "", "pop"], [8, 3, 1, "", "remove"], [8, 3, 1, "", "reverse"], [8, 3, 1, "", "sort"], [8, 3, 1, "", "validate_ballot"]], "pabutools.election.profile.cardinalprofile": [[8, 2, 1, "", "AbstractCardinalProfile"], [8, 2, 1, "", "CardinalMultiProfile"], [8, 2, 1, "", "CardinalProfile"]], "pabutools.election.profile.cardinalprofile.AbstractCardinalProfile": [[8, 4, 1, "", "legal_max_length"], [8, 4, 1, "", "legal_max_score"], [8, 4, 1, "", "legal_min_length"], [8, 4, 1, "", "legal_min_score"], [8, 3, 1, "", "total_score"]], "pabutools.election.profile.cardinalprofile.CardinalMultiProfile": [[8, 3, 1, "", "append"], [8, 3, 1, "", "as_sat_profile"], [8, 4, 1, "", "ballot_type"], [8, 4, 1, "", "ballot_validation"], [8, 3, 1, "", "clear"], [8, 3, 1, "", "copy"], [8, 3, 1, "", "elements"], [8, 3, 1, "", "extend"], [8, 3, 1, "", "fromkeys"], [8, 3, 1, "", "get"], [8, 4, 1, "", "instance"], [8, 3, 1, "", "items"], [8, 3, 1, "", "keys"], [8, 4, 1, "", "legal_max_length"], [8, 4, 1, "", "legal_max_score"], [8, 4, 1, "", "legal_min_length"], [8, 4, 1, "", "legal_min_score"], [8, 3, 1, "", "most_common"], [8, 3, 1, "", "multiplicity"], [8, 3, 1, "", "num_ballots"], [8, 3, 1, "", "pop"], [8, 3, 1, "", "popitem"], [8, 3, 1, "", "score"], [8, 3, 1, "", "setdefault"], [8, 3, 1, "", "subtract"], [8, 3, 1, "", "total"], [8, 3, 1, "", "total_score"], [8, 3, 1, "", "update"], [8, 3, 1, "", "validate_ballot"], [8, 3, 1, "", "values"]], "pabutools.election.profile.cardinalprofile.CardinalProfile": [[8, 3, 1, "", "append"], [8, 3, 1, "", "as_multiprofile"], [8, 3, 1, "", "as_sat_profile"], [8, 4, 1, "", "ballot_type"], [8, 4, 1, "", "ballot_validation"], [8, 3, 1, "", "clear"], [8, 3, 1, "", "complete"], [8, 3, 1, "", "copy"], [8, 3, 1, "", "count"], [8, 3, 1, "", "extend"], [8, 3, 1, "", "index"], [8, 3, 1, "", "insert"], [8, 4, 1, "", "instance"], [8, 4, 1, "", "legal_max_length"], [8, 4, 1, "", "legal_max_score"], [8, 4, 1, "", "legal_min_length"], [8, 4, 1, "", "legal_min_score"], [8, 3, 1, "", "multiplicity"], [8, 3, 1, "", "num_ballots"], [8, 3, 1, "", "pop"], [8, 3, 1, "", "remove"], [8, 3, 1, "", "reverse"], [8, 3, 1, "", "sort"], [8, 3, 1, "", "total_score"], [8, 3, 1, "", "validate_ballot"]], "pabutools.election.profile.cumulativeprofile": [[8, 2, 1, "", "AbstractCumulativeProfile"], [8, 2, 1, "", "CumulativeMultiProfile"], [8, 2, 1, "", "CumulativeProfile"]], "pabutools.election.profile.cumulativeprofile.AbstractCumulativeProfile": [[8, 4, 1, "", "legal_max_length"], [8, 4, 1, "", "legal_max_score"], [8, 4, 1, "", "legal_max_total_score"], [8, 4, 1, "", "legal_min_length"], [8, 4, 1, "", "legal_min_score"], [8, 4, 1, "", "legal_min_total_score"]], "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile": [[8, 3, 1, "", "append"], [8, 3, 1, "", "as_sat_profile"], [8, 4, 1, "", "ballot_type"], [8, 4, 1, "", "ballot_validation"], [8, 3, 1, "", "clear"], [8, 3, 1, "", "copy"], [8, 3, 1, "", "elements"], [8, 3, 1, "", "extend"], [8, 3, 1, "", "fromkeys"], [8, 3, 1, "", "get"], [8, 4, 1, "", "instance"], [8, 3, 1, "", "items"], [8, 3, 1, "", "keys"], [8, 4, 1, "", "legal_max_length"], [8, 4, 1, "", "legal_max_score"], [8, 4, 1, "", "legal_max_total_score"], [8, 4, 1, "", "legal_min_length"], [8, 4, 1, "", "legal_min_score"], [8, 4, 1, "", "legal_min_total_score"], [8, 3, 1, "", "most_common"], [8, 3, 1, "", "multiplicity"], [8, 3, 1, "", "num_ballots"], [8, 3, 1, "", "pop"], [8, 3, 1, "", "popitem"], [8, 3, 1, "", "score"], [8, 3, 1, "", "setdefault"], [8, 3, 1, "", "subtract"], [8, 3, 1, "", "total"], [8, 3, 1, "", "total_score"], [8, 3, 1, "", "update"], [8, 3, 1, "", "validate_ballot"], [8, 3, 1, "", "values"]], "pabutools.election.profile.cumulativeprofile.CumulativeProfile": [[8, 3, 1, "", "append"], [8, 3, 1, "", "as_multiprofile"], [8, 3, 1, "", "as_sat_profile"], [8, 4, 1, "", "ballot_type"], [8, 4, 1, "", "ballot_validation"], [8, 3, 1, "", "clear"], [8, 3, 1, "", "complete"], [8, 3, 1, "", "copy"], [8, 3, 1, "", "count"], [8, 3, 1, "", "extend"], [8, 3, 1, "", "index"], [8, 3, 1, "", "insert"], [8, 4, 1, "", "instance"], [8, 4, 1, "", "legal_max_length"], [8, 4, 1, "", "legal_max_score"], [8, 4, 1, "", "legal_max_total_score"], [8, 4, 1, "", "legal_min_length"], [8, 4, 1, "", "legal_min_score"], [8, 4, 1, "", "legal_min_total_score"], [8, 3, 1, "", "multiplicity"], [8, 3, 1, "", "num_ballots"], [8, 3, 1, "", "pop"], [8, 3, 1, "", "remove"], [8, 3, 1, "", "reverse"], [8, 3, 1, "", "sort"], [8, 3, 1, "", "total_score"], [8, 3, 1, "", "validate_ballot"]], "pabutools.election.profile.ordinalprofile": [[8, 2, 1, "", "AbstractOrdinalProfile"], [8, 2, 1, "", "OrdinalMultiProfile"], [8, 2, 1, "", "OrdinalProfile"]], "pabutools.election.profile.ordinalprofile.AbstractOrdinalProfile": [[8, 4, 1, "", "legal_max_length"], [8, 4, 1, "", "legal_min_length"]], "pabutools.election.profile.ordinalprofile.OrdinalMultiProfile": [[8, 3, 1, "", "append"], [8, 3, 1, "", "as_sat_profile"], [8, 4, 1, "", "ballot_type"], [8, 4, 1, "", "ballot_validation"], [8, 3, 1, "", "clear"], [8, 3, 1, "", "copy"], [8, 3, 1, "", "elements"], [8, 3, 1, "", "extend"], [8, 3, 1, "", "fromkeys"], [8, 3, 1, "", "get"], [8, 4, 1, "", "instance"], [8, 3, 1, "", "items"], [8, 3, 1, "", "keys"], [8, 4, 1, "", "legal_max_length"], [8, 4, 1, "", "legal_min_length"], [8, 3, 1, "", "most_common"], [8, 3, 1, "", "multiplicity"], [8, 3, 1, "", "num_ballots"], [8, 3, 1, "", "pop"], [8, 3, 1, "", "popitem"], [8, 3, 1, "", "setdefault"], [8, 3, 1, "", "subtract"], [8, 3, 1, "", "total"], [8, 3, 1, "", "update"], [8, 3, 1, "", "validate_ballot"], [8, 3, 1, "", "values"]], "pabutools.election.profile.ordinalprofile.OrdinalProfile": [[8, 3, 1, "", "append"], [8, 3, 1, "", "as_multiprofile"], [8, 3, 1, "", "as_sat_profile"], [8, 4, 1, "", "ballot_type"], [8, 4, 1, "", "ballot_validation"], [8, 3, 1, "", "clear"], [8, 3, 1, "", "copy"], [8, 3, 1, "", "count"], [8, 3, 1, "", "extend"], [8, 3, 1, "", "index"], [8, 3, 1, "", "insert"], [8, 4, 1, "", "instance"], [8, 4, 1, "", "legal_max_length"], [8, 4, 1, "", "legal_min_length"], [8, 3, 1, "", "multiplicity"], [8, 3, 1, "", "num_ballots"], [8, 3, 1, "", "pop"], [8, 3, 1, "", "remove"], [8, 3, 1, "", "reverse"], [8, 3, 1, "", "sort"], [8, 3, 1, "", "validate_ballot"]], "pabutools.election.profile.profile": [[8, 2, 1, "", "AbstractProfile"], [8, 2, 1, "", "MultiProfile"], [8, 2, 1, "", "Profile"]], "pabutools.election.profile.profile.AbstractProfile": [[8, 3, 1, "", "as_sat_profile"], [8, 4, 1, "", "ballot_type"], [8, 4, 1, "", "ballot_validation"], [8, 4, 1, "", "instance"], [8, 3, 1, "", "multiplicity"], [8, 3, 1, "", "num_ballots"], [8, 3, 1, "", "validate_ballot"]], "pabutools.election.profile.profile.MultiProfile": [[8, 3, 1, "", "append"], [8, 3, 1, "", "as_sat_profile"], [8, 4, 1, "", "ballot_type"], [8, 4, 1, "", "ballot_validation"], [8, 3, 1, "", "extend"], [8, 4, 1, "", "instance"], [8, 3, 1, "", "multiplicity"], [8, 3, 1, "", "num_ballots"]], "pabutools.election.profile.profile.Profile": [[8, 3, 1, "", "append"], [8, 3, 1, "", "as_multiprofile"], [8, 3, 1, "", "as_sat_profile"], [8, 4, 1, "", "ballot_type"], [8, 4, 1, "", "ballot_validation"], [8, 3, 1, "", "extend"], [8, 3, 1, "", "insert"], [8, 4, 1, "", "instance"], [8, 3, 1, "", "multiplicity"], [8, 3, 1, "", "num_ballots"]], "pabutools.election.satisfaction.additivesatisfaction": [[9, 2, 1, "", "AdditiveSatisfaction"], [9, 2, 1, "", "Additive_Cardinal_Sat"], [9, 2, 1, "", "Cardinality_Sat"], [9, 2, 1, "", "Cost_Sat"], [9, 2, 1, "", "Effort_Sat"], [9, 2, 1, "", "Relative_Cardinality_Sat"], [9, 2, 1, "", "Relative_Cost_Approx_Normaliser_Sat"], [9, 2, 1, "", "Relative_Cost_Sat"]], "pabutools.election.satisfaction.additivesatisfaction.AdditiveSatisfaction": [[9, 4, 1, "", "ballot"], [9, 4, 1, "", "func"], [9, 3, 1, "", "get_project_sat"], [9, 4, 1, "", "instance"], [9, 4, 1, "", "precomputed_values"], [9, 3, 1, "", "preprocessing"], [9, 4, 1, "", "profile"], [9, 3, 1, "", "sat"]], "pabutools.election.satisfaction.additivesatisfaction.Additive_Cardinal_Sat": [[9, 3, 1, "", "get_project_sat"], [9, 3, 1, "", "preprocessing"], [9, 3, 1, "", "sat"]], "pabutools.election.satisfaction.additivesatisfaction.Cardinality_Sat": [[9, 3, 1, "", "get_project_sat"], [9, 3, 1, "", "preprocessing"], [9, 3, 1, "", "sat"]], "pabutools.election.satisfaction.additivesatisfaction.Cost_Sat": [[9, 3, 1, "", "get_project_sat"], [9, 3, 1, "", "preprocessing"], [9, 3, 1, "", "sat"]], "pabutools.election.satisfaction.additivesatisfaction.Effort_Sat": [[9, 3, 1, "", "get_project_sat"], [9, 3, 1, "", "preprocessing"], [9, 3, 1, "", "sat"]], "pabutools.election.satisfaction.additivesatisfaction.Relative_Cardinality_Sat": [[9, 3, 1, "", "get_project_sat"], [9, 3, 1, "", "preprocessing"], [9, 3, 1, "", "sat"]], "pabutools.election.satisfaction.additivesatisfaction.Relative_Cost_Approx_Normaliser_Sat": [[9, 3, 1, "", "get_project_sat"], [9, 3, 1, "", "preprocessing"], [9, 3, 1, "", "sat"]], "pabutools.election.satisfaction.additivesatisfaction.Relative_Cost_Sat": [[9, 3, 1, "", "get_project_sat"], [9, 3, 1, "", "preprocessing"], [9, 3, 1, "", "sat"]], "pabutools.election.satisfaction.functionalsatisfaction": [[9, 2, 1, "", "CC_Sat"], [9, 2, 1, "", "Cost_Log_Sat"], [9, 2, 1, "", "Cost_Sqrt_Sat"], [9, 2, 1, "", "FunctionalSatisfaction"]], "pabutools.election.satisfaction.functionalsatisfaction.CC_Sat": [[9, 3, 1, "", "sat"]], "pabutools.election.satisfaction.functionalsatisfaction.Cost_Log_Sat": [[9, 3, 1, "", "sat"]], "pabutools.election.satisfaction.functionalsatisfaction.Cost_Sqrt_Sat": [[9, 3, 1, "", "sat"]], "pabutools.election.satisfaction.functionalsatisfaction.FunctionalSatisfaction": [[9, 4, 1, "", "ballot"], [9, 4, 1, "", "func"], [9, 4, 1, "", "instance"], [9, 4, 1, "", "profile"], [9, 3, 1, "", "sat"]], "pabutools.election.satisfaction.positionalsatisfaction": [[9, 2, 1, "", "Additive_Borda_Sat"], [9, 2, 1, "", "PositionalSatisfaction"]], "pabutools.election.satisfaction.positionalsatisfaction.Additive_Borda_Sat": [[9, 3, 1, "", "sat"]], "pabutools.election.satisfaction.positionalsatisfaction.PositionalSatisfaction": [[9, 4, 1, "", "aggregation_func"], [9, 4, 1, "", "ballot"], [9, 4, 1, "", "instance"], [9, 4, 1, "", "positional_func"], [9, 4, 1, "", "profile"], [9, 3, 1, "", "sat"]], "pabutools.election.satisfaction.satisfactionmeasure": [[9, 2, 1, "", "GroupSatisfactionMeasure"], [9, 2, 1, "", "SatisfactionMeasure"]], "pabutools.election.satisfaction.satisfactionmeasure.GroupSatisfactionMeasure": [[9, 3, 1, "", "multiplicity"], [9, 3, 1, "", "remove_satisfied"], [9, 3, 1, "", "total_satisfaction"]], "pabutools.election.satisfaction.satisfactionmeasure.SatisfactionMeasure": [[9, 4, 1, "", "ballot"], [9, 4, 1, "", "instance"], [9, 4, 1, "", "profile"], [9, 3, 1, "", "sat"]], "pabutools.election.satisfaction.satisfactionprofile": [[9, 2, 1, "", "SatisfactionMultiProfile"], [9, 2, 1, "", "SatisfactionProfile"]], "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile": [[9, 3, 1, "", "append"], [9, 3, 1, "", "clear"], [9, 3, 1, "", "copy"], [9, 3, 1, "", "elements"], [9, 3, 1, "", "extend_from_multiprofile"], [9, 3, 1, "", "extend_from_profile"], [9, 3, 1, "", "fromkeys"], [9, 3, 1, "", "get"], [9, 4, 1, "", "instance"], [9, 3, 1, "", "items"], [9, 3, 1, "", "keys"], [9, 3, 1, "", "most_common"], [9, 3, 1, "", "multiplicity"], [9, 3, 1, "", "pop"], [9, 3, 1, "", "popitem"], [9, 3, 1, "", "remove_satisfied"], [9, 4, 1, "", "sat_class"], [9, 3, 1, "", "setdefault"], [9, 3, 1, "", "subtract"], [9, 3, 1, "", "total"], [9, 3, 1, "", "total_satisfaction"], [9, 3, 1, "", "update"], [9, 3, 1, "", "values"]], "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile": [[9, 3, 1, "", "append"], [9, 3, 1, "", "clear"], [9, 3, 1, "", "copy"], [9, 3, 1, "", "count"], [9, 3, 1, "", "extend"], [9, 3, 1, "", "extend_from_profile"], [9, 3, 1, "", "index"], [9, 3, 1, "", "insert"], [9, 4, 1, "", "instance"], [9, 3, 1, "", "multiplicity"], [9, 3, 1, "", "pop"], [9, 3, 1, "", "remove"], [9, 3, 1, "", "remove_satisfied"], [9, 3, 1, "", "reverse"], [9, 4, 1, "", "sat_class"], [9, 3, 1, "", "sort"], [9, 3, 1, "", "total_satisfaction"]], "pabutools.fractions": [[10, 5, 1, "", "FRACTION"], [10, 1, 1, "", "frac"], [10, 1, 1, "", "str_as_frac"]], "pabutools.rules.composition": [[12, 1, 1, "", "popularity_comparison"], [12, 1, 1, "", "social_welfare_comparison"]], "pabutools.rules.exhaustion": [[12, 1, 1, "", "completion_by_rule_combination"], [12, 1, 1, "", "exhaustion_by_budget_increase"]], "pabutools.rules.greedywelfare": [[12, 1, 1, "", "greedy_utilitarian_welfare"]], "pabutools.rules.maxwelfare": [[12, 1, 1, "", "max_additive_utilitarian_welfare"]], "pabutools.rules.mes": [[12, 1, 1, "", "method_of_equal_shares"]], "pabutools.rules.phragmen": [[12, 1, 1, "", "sequential_phragmen"]], "pabutools.tiebreaking": [[13, 6, 1, "", "TieBreakingException"], [13, 2, 1, "", "TieBreakingRule"], [13, 5, 1, "", "app_score_tie_breaking"], [13, 5, 1, "", "lexico_tie_breaking"], [13, 5, 1, "", "max_cost_tie_breaking"], [13, 5, 1, "", "min_cost_tie_breaking"], [13, 5, 1, "", "refuse_tie_breaking"]], "pabutools.tiebreaking.TieBreakingRule": [[13, 4, 1, "", "func"], [13, 3, 1, "", "order"], [13, 3, 1, "", "untie"]], "pabutools.utils": [[14, 1, 1, "", "gini_coefficient"], [14, 1, 1, "", "mean_generator"], [14, 1, 1, "", "powerset"]]}, "objtypes": {"0": "py:module", "1": "py:function", "2": "py:class", "3": "py:method", "4": "py:attribute", "5": "py:data", "6": "py:exception"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"], "2": ["py", "class", "Python class"], "3": ["py", "method", "Python method"], "4": ["py", "attribute", "Python attribute"], "5": ["py", "data", "Python data"], "6": ["py", "exception", "Python exception"]}, "titleterms": {"pabutool": 0, "pb": 0, "easi": 0, "abc": 0, "instal": 1, "quick": 2, "start": 2, "describ": 2, "an": 2, "elect": [2, 5], "project": 2, "instanc": [2, 6, 15], "ballot": [2, 4], "profil": [2, 8, 15], "comput": 2, "outcom": 2, "analysi": 3, "modul": [3, 4, 5, 6, 8, 9, 12], "prefer": [7, 15], "librari": [7, 15], "satisfact": [9, 15], "fraction": [10, 15], "refer": 11, "rule": [12, 15], "tie": [13, 15], "break": [13, 15], "util": 14, "complet": 15, "guid": 15, "approv": 15, "cardin": 15, "cumul": 15, "ordin": 15, "multiprofil": 15, "pabulib": 15, "preflib": 15, "measur": 15, "function": 15, "addit": 15, "posit": 15, "alreadi": 15, "defin": 15, "utilitarian": 15, "welfar": 15, "maximis": 15, "greedi": 15, "approxim": 15, "sequenti": 15, "phragm\u00e8n": 15, "": 15, "method": 15, "equal": 15, "share": 15, "exhaust": 15, "composit": 15}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.viewcode": 1, "sphinx": 57}, "alltitles": {"Pabutools: PB as easy as ABC": [[0, "pabutools-pb-as-easy-as-abc"]], "Installation": [[1, "installation"]], "Quick Start": [[2, "quick-start"]], "Describing an Election": [[2, "describing-an-election"]], "Projects and Instances": [[2, "projects-and-instances"]], "Ballots and Profiles": [[2, "ballots-and-profiles"]], "Computing the Outcome of an Election": [[2, "computing-the-outcome-of-an-election"]], "Ballot module": [[4, "module-pabutools.election.ballot"]], "Fractions": [[10, "module-pabutools.fractions"], [15, "fractions"]], "Reference": [[11, "reference"]], "Utils": [[14, "module-pabutools.utils"]], "Instance module": [[6, "module-pabutools.election.instance"]], "Preference Libraries": [[7, "preference-libraries"], [15, "preference-libraries"]], "Tie-Breaking": [[13, "module-pabutools.tiebreaking"], [15, "tie-breaking"]], "Analysis module": [[3, "module-pabutools.analysis"]], "Election module": [[5, "election-module"]], "Profile module": [[8, "module-pabutools.election.profile"]], "Satisfaction module": [[9, "module-pabutools.election.satisfaction"]], "Rules module": [[12, "module-pabutools.rules"]], "Complete Guide": [[15, "complete-guide"]], "Instances": [[15, "instances"]], "Profiles": [[15, "profiles"]], "Approval Profiles": [[15, "approval-profiles"]], "Cardinal Profiles": [[15, "cardinal-profiles"]], "Cumulative Profiles": [[15, "cumulative-profiles"]], "Ordinal Profiles": [[15, "ordinal-profiles"]], "Multiprofile": [[15, "multiprofile"]], "PaBuLib": [[15, "id1"]], "PrefLib": [[15, "preflib"]], "Satisfaction Measures": [[15, "satisfaction-measures"]], "Functional Satisfaction Functions": [[15, "functional-satisfaction-functions"]], "Additive Satisfaction Functions": [[15, "additive-satisfaction-functions"]], "Positional Satisfaction Functions": [[15, "positional-satisfaction-functions"]], "Satisfaction Functions Already Defined": [[15, "satisfaction-functions-already-defined"]], "Rules": [[15, "rules"]], "Additive Utilitarian Welfare Maximiser": [[15, "additive-utilitarian-welfare-maximiser"]], "Greedy Approximation of the Welfare Maximiser": [[15, "greedy-approximation-of-the-welfare-maximiser"]], "Sequential Phragm\u00e8n\u2019s Rule": [[15, "sequential-phragmen-s-rule"]], "Method of Equal Shares": [[15, "method-of-equal-shares"]], "Exhaustion Methods": [[15, "exhaustion-methods"]], "Rule Composition": [[15, "rule-composition"]]}, "indexentries": {"avg_approval_score() (in module pabutools.analysis.profileproperties)": [[3, "pabutools.analysis.profileproperties.avg_approval_score"]], "avg_ballot_cost() (in module pabutools.analysis.profileproperties)": [[3, "pabutools.analysis.profileproperties.avg_ballot_cost"]], "avg_ballot_length() (in module pabutools.analysis.profileproperties)": [[3, "pabutools.analysis.profileproperties.avg_ballot_length"]], "avg_project_cost() (in module pabutools.analysis.instanceproperties)": [[3, "pabutools.analysis.instanceproperties.avg_project_cost"]], "avg_satisfaction() (in module pabutools.analysis.votersatisfaction)": [[3, "pabutools.analysis.votersatisfaction.avg_satisfaction"]], "avg_total_score() (in module pabutools.analysis.profileproperties)": [[3, "pabutools.analysis.profileproperties.avg_total_score"]], "category_proportionality() (in module pabutools.analysis.category)": [[3, "pabutools.analysis.category.category_proportionality"]], "funding_scarcity() (in module pabutools.analysis.instanceproperties)": [[3, "pabutools.analysis.instanceproperties.funding_scarcity"]], "gini_coefficient_of_satisfaction() (in module pabutools.analysis.votersatisfaction)": [[3, "pabutools.analysis.votersatisfaction.gini_coefficient_of_satisfaction"]], "median_approval_score() (in module pabutools.analysis.profileproperties)": [[3, "pabutools.analysis.profileproperties.median_approval_score"]], "median_ballot_cost() (in module pabutools.analysis.profileproperties)": [[3, "pabutools.analysis.profileproperties.median_ballot_cost"]], "median_ballot_length() (in module pabutools.analysis.profileproperties)": [[3, "pabutools.analysis.profileproperties.median_ballot_length"]], "median_project_cost() (in module pabutools.analysis.instanceproperties)": [[3, "pabutools.analysis.instanceproperties.median_project_cost"]], "median_total_score() (in module pabutools.analysis.profileproperties)": [[3, "pabutools.analysis.profileproperties.median_total_score"]], "module": [[3, "module-pabutools.analysis"], [3, "module-pabutools.analysis.category"], [3, "module-pabutools.analysis.instanceproperties"], [3, "module-pabutools.analysis.profileproperties"], [3, "module-pabutools.analysis.votersatisfaction"], [5, "module-pabutools.election"], [8, "module-pabutools.election.profile"], [9, "module-pabutools.election.satisfaction"], [12, "module-pabutools.rules"]], "pabutools.analysis": [[3, "module-pabutools.analysis"]], "pabutools.analysis.category": [[3, "module-pabutools.analysis.category"]], "pabutools.analysis.instanceproperties": [[3, "module-pabutools.analysis.instanceproperties"]], "pabutools.analysis.profileproperties": [[3, "module-pabutools.analysis.profileproperties"]], "pabutools.analysis.votersatisfaction": [[3, "module-pabutools.analysis.votersatisfaction"]], "percent_non_empty_handed() (in module pabutools.analysis.votersatisfaction)": [[3, "pabutools.analysis.votersatisfaction.percent_non_empty_handed"]], "satisfaction_histogram() (in module pabutools.analysis.votersatisfaction)": [[3, "pabutools.analysis.votersatisfaction.satisfaction_histogram"]], "std_dev_project_cost() (in module pabutools.analysis.instanceproperties)": [[3, "pabutools.analysis.instanceproperties.std_dev_project_cost"]], "sum_project_cost() (in module pabutools.analysis.instanceproperties)": [[3, "pabutools.analysis.instanceproperties.sum_project_cost"]], "pabutools.election": [[5, "module-pabutools.election"]], "abstractapprovalprofile (class in pabutools.election.profile.approvalprofile)": [[8, "pabutools.election.profile.approvalprofile.AbstractApprovalProfile"]], "abstractcardinalprofile (class in pabutools.election.profile.cardinalprofile)": [[8, "pabutools.election.profile.cardinalprofile.AbstractCardinalProfile"]], "abstractcumulativeprofile (class in pabutools.election.profile.cumulativeprofile)": [[8, "pabutools.election.profile.cumulativeprofile.AbstractCumulativeProfile"]], "abstractordinalprofile (class in pabutools.election.profile.ordinalprofile)": [[8, "pabutools.election.profile.ordinalprofile.AbstractOrdinalProfile"]], "abstractprofile (class in pabutools.election.profile.profile)": [[8, "pabutools.election.profile.profile.AbstractProfile"]], "approvalmultiprofile (class in pabutools.election.profile.approvalprofile)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile"]], "approvalprofile (class in pabutools.election.profile.approvalprofile)": [[8, "pabutools.election.profile.approvalprofile.ApprovalProfile"]], "cardinalmultiprofile (class in pabutools.election.profile.cardinalprofile)": [[8, "pabutools.election.profile.cardinalprofile.CardinalMultiProfile"]], "cardinalprofile (class in pabutools.election.profile.cardinalprofile)": [[8, "pabutools.election.profile.cardinalprofile.CardinalProfile"]], "cumulativemultiprofile (class in pabutools.election.profile.cumulativeprofile)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile"]], "cumulativeprofile (class in pabutools.election.profile.cumulativeprofile)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeProfile"]], "multiprofile (class in pabutools.election.profile.profile)": [[8, "pabutools.election.profile.profile.MultiProfile"]], "ordinalmultiprofile (class in pabutools.election.profile.ordinalprofile)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalMultiProfile"]], "ordinalprofile (class in pabutools.election.profile.ordinalprofile)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalProfile"]], "profile (class in pabutools.election.profile.profile)": [[8, "pabutools.election.profile.profile.Profile"]], "append() (approvalmultiprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.append"]], "append() (approvalprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalProfile.append"]], "append() (cardinalmultiprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalMultiProfile.append"]], "append() (cardinalprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalProfile.append"]], "append() (cumulativemultiprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.append"]], "append() (cumulativeprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeProfile.append"]], "append() (multiprofile method)": [[8, "pabutools.election.profile.profile.MultiProfile.append"]], "append() (ordinalmultiprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalMultiProfile.append"]], "append() (ordinalprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalProfile.append"]], "append() (profile method)": [[8, "pabutools.election.profile.profile.Profile.append"]], "approval_score() (abstractapprovalprofile method)": [[8, "pabutools.election.profile.approvalprofile.AbstractApprovalProfile.approval_score"]], "approval_score() (approvalmultiprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.approval_score"]], "approval_score() (approvalprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalProfile.approval_score"]], "approved_projects() (abstractapprovalprofile method)": [[8, "pabutools.election.profile.approvalprofile.AbstractApprovalProfile.approved_projects"]], "approved_projects() (approvalmultiprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.approved_projects"]], "approved_projects() (approvalprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalProfile.approved_projects"]], "as_multiprofile() (approvalprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalProfile.as_multiprofile"]], "as_multiprofile() (cardinalprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalProfile.as_multiprofile"]], "as_multiprofile() (cumulativeprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeProfile.as_multiprofile"]], "as_multiprofile() (ordinalprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalProfile.as_multiprofile"]], "as_multiprofile() (profile method)": [[8, "pabutools.election.profile.profile.Profile.as_multiprofile"]], "as_sat_profile() (abstractprofile method)": [[8, "pabutools.election.profile.profile.AbstractProfile.as_sat_profile"]], "as_sat_profile() (approvalmultiprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.as_sat_profile"]], "as_sat_profile() (approvalprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalProfile.as_sat_profile"]], "as_sat_profile() (cardinalmultiprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalMultiProfile.as_sat_profile"]], "as_sat_profile() (cardinalprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalProfile.as_sat_profile"]], "as_sat_profile() (cumulativemultiprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.as_sat_profile"]], "as_sat_profile() (cumulativeprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeProfile.as_sat_profile"]], "as_sat_profile() (multiprofile method)": [[8, "pabutools.election.profile.profile.MultiProfile.as_sat_profile"]], "as_sat_profile() (ordinalmultiprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalMultiProfile.as_sat_profile"]], "as_sat_profile() (ordinalprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalProfile.as_sat_profile"]], "as_sat_profile() (profile method)": [[8, "pabutools.election.profile.profile.Profile.as_sat_profile"]], "ballot_type (abstractprofile attribute)": [[8, "pabutools.election.profile.profile.AbstractProfile.ballot_type"]], "ballot_type (approvalmultiprofile attribute)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.ballot_type"]], "ballot_type (approvalprofile attribute)": [[8, "pabutools.election.profile.approvalprofile.ApprovalProfile.ballot_type"]], "ballot_type (cardinalmultiprofile attribute)": [[8, "pabutools.election.profile.cardinalprofile.CardinalMultiProfile.ballot_type"]], "ballot_type (cardinalprofile attribute)": [[8, "pabutools.election.profile.cardinalprofile.CardinalProfile.ballot_type"]], "ballot_type (cumulativemultiprofile attribute)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.ballot_type"]], "ballot_type (cumulativeprofile attribute)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeProfile.ballot_type"]], "ballot_type (multiprofile attribute)": [[8, "pabutools.election.profile.profile.MultiProfile.ballot_type"]], "ballot_type (ordinalmultiprofile attribute)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalMultiProfile.ballot_type"]], "ballot_type (ordinalprofile attribute)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalProfile.ballot_type"]], "ballot_type (profile attribute)": [[8, "pabutools.election.profile.profile.Profile.ballot_type"]], "ballot_validation (abstractprofile attribute)": [[8, "pabutools.election.profile.profile.AbstractProfile.ballot_validation"]], "ballot_validation (approvalmultiprofile attribute)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.ballot_validation"]], "ballot_validation (approvalprofile attribute)": [[8, "pabutools.election.profile.approvalprofile.ApprovalProfile.ballot_validation"]], "ballot_validation (cardinalmultiprofile attribute)": [[8, "pabutools.election.profile.cardinalprofile.CardinalMultiProfile.ballot_validation"]], "ballot_validation (cardinalprofile attribute)": [[8, "pabutools.election.profile.cardinalprofile.CardinalProfile.ballot_validation"]], "ballot_validation (cumulativemultiprofile attribute)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.ballot_validation"]], "ballot_validation (cumulativeprofile attribute)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeProfile.ballot_validation"]], "ballot_validation (multiprofile attribute)": [[8, "pabutools.election.profile.profile.MultiProfile.ballot_validation"]], "ballot_validation (ordinalmultiprofile attribute)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalMultiProfile.ballot_validation"]], "ballot_validation (ordinalprofile attribute)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalProfile.ballot_validation"]], "ballot_validation (profile attribute)": [[8, "pabutools.election.profile.profile.Profile.ballot_validation"]], "clear() (approvalmultiprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.clear"]], "clear() (approvalprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalProfile.clear"]], "clear() (cardinalmultiprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalMultiProfile.clear"]], "clear() (cardinalprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalProfile.clear"]], "clear() (cumulativemultiprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.clear"]], "clear() (cumulativeprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeProfile.clear"]], "clear() (ordinalmultiprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalMultiProfile.clear"]], "clear() (ordinalprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalProfile.clear"]], "complete() (cardinalprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalProfile.complete"]], "complete() (cumulativeprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeProfile.complete"]], "copy() (approvalmultiprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.copy"]], "copy() (approvalprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalProfile.copy"]], "copy() (cardinalmultiprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalMultiProfile.copy"]], "copy() (cardinalprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalProfile.copy"]], "copy() (cumulativemultiprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.copy"]], "copy() (cumulativeprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeProfile.copy"]], "copy() (ordinalmultiprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalMultiProfile.copy"]], "copy() (ordinalprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalProfile.copy"]], "count() (approvalprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalProfile.count"]], "count() (cardinalprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalProfile.count"]], "count() (cumulativeprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeProfile.count"]], "count() (ordinalprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalProfile.count"]], "elements() (approvalmultiprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.elements"]], "elements() (cardinalmultiprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalMultiProfile.elements"]], "elements() (cumulativemultiprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.elements"]], "elements() (ordinalmultiprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalMultiProfile.elements"]], "extend() (approvalmultiprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.extend"]], "extend() (approvalprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalProfile.extend"]], "extend() (cardinalmultiprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalMultiProfile.extend"]], "extend() (cardinalprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalProfile.extend"]], "extend() (cumulativemultiprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.extend"]], "extend() (cumulativeprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeProfile.extend"]], "extend() (multiprofile method)": [[8, "pabutools.election.profile.profile.MultiProfile.extend"]], "extend() (ordinalmultiprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalMultiProfile.extend"]], "extend() (ordinalprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalProfile.extend"]], "extend() (profile method)": [[8, "pabutools.election.profile.profile.Profile.extend"]], "fromkeys() (approvalmultiprofile class method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.fromkeys"]], "fromkeys() (cardinalmultiprofile class method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalMultiProfile.fromkeys"]], "fromkeys() (cumulativemultiprofile class method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.fromkeys"]], "fromkeys() (ordinalmultiprofile class method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalMultiProfile.fromkeys"]], "get() (approvalmultiprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.get"]], "get() (cardinalmultiprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalMultiProfile.get"]], "get() (cumulativemultiprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.get"]], "get() (ordinalmultiprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalMultiProfile.get"]], "get_all_approval_profiles() (in module pabutools.election.profile.approvalprofile)": [[8, "pabutools.election.profile.approvalprofile.get_all_approval_profiles"]], "get_random_approval_profile() (in module pabutools.election.profile.approvalprofile)": [[8, "pabutools.election.profile.approvalprofile.get_random_approval_profile"]], "index() (approvalprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalProfile.index"]], "index() (cardinalprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalProfile.index"]], "index() (cumulativeprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeProfile.index"]], "index() (ordinalprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalProfile.index"]], "insert() (approvalprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalProfile.insert"]], "insert() (cardinalprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalProfile.insert"]], "insert() (cumulativeprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeProfile.insert"]], "insert() (ordinalprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalProfile.insert"]], "insert() (profile method)": [[8, "pabutools.election.profile.profile.Profile.insert"]], "instance (abstractprofile attribute)": [[8, "pabutools.election.profile.profile.AbstractProfile.instance"]], "instance (approvalmultiprofile attribute)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.instance"]], "instance (approvalprofile attribute)": [[8, "pabutools.election.profile.approvalprofile.ApprovalProfile.instance"]], "instance (cardinalmultiprofile attribute)": [[8, "pabutools.election.profile.cardinalprofile.CardinalMultiProfile.instance"]], "instance (cardinalprofile attribute)": [[8, "pabutools.election.profile.cardinalprofile.CardinalProfile.instance"]], "instance (cumulativemultiprofile attribute)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.instance"]], "instance (cumulativeprofile attribute)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeProfile.instance"]], "instance (multiprofile attribute)": [[8, "pabutools.election.profile.profile.MultiProfile.instance"]], "instance (ordinalmultiprofile attribute)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalMultiProfile.instance"]], "instance (ordinalprofile attribute)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalProfile.instance"]], "instance (profile attribute)": [[8, "pabutools.election.profile.profile.Profile.instance"]], "is_party_list() (abstractapprovalprofile method)": [[8, "pabutools.election.profile.approvalprofile.AbstractApprovalProfile.is_party_list"]], "is_party_list() (approvalmultiprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.is_party_list"]], "is_party_list() (approvalprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalProfile.is_party_list"]], "is_trivial() (abstractapprovalprofile method)": [[8, "pabutools.election.profile.approvalprofile.AbstractApprovalProfile.is_trivial"]], "is_trivial() (approvalmultiprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.is_trivial"]], "is_trivial() (approvalprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalProfile.is_trivial"]], "items() (approvalmultiprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.items"]], "items() (cardinalmultiprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalMultiProfile.items"]], "items() (cumulativemultiprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.items"]], "items() (ordinalmultiprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalMultiProfile.items"]], "keys() (approvalmultiprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.keys"]], "keys() (cardinalmultiprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalMultiProfile.keys"]], "keys() (cumulativemultiprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.keys"]], "keys() (ordinalmultiprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalMultiProfile.keys"]], "legal_max_cost (abstractapprovalprofile attribute)": [[8, "pabutools.election.profile.approvalprofile.AbstractApprovalProfile.legal_max_cost"]], "legal_max_cost (approvalmultiprofile attribute)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.legal_max_cost"]], "legal_max_cost (approvalprofile attribute)": [[8, "pabutools.election.profile.approvalprofile.ApprovalProfile.legal_max_cost"]], "legal_max_length (abstractapprovalprofile attribute)": [[8, "pabutools.election.profile.approvalprofile.AbstractApprovalProfile.legal_max_length"]], "legal_max_length (abstractcardinalprofile attribute)": [[8, "pabutools.election.profile.cardinalprofile.AbstractCardinalProfile.legal_max_length"]], "legal_max_length (abstractcumulativeprofile attribute)": [[8, "pabutools.election.profile.cumulativeprofile.AbstractCumulativeProfile.legal_max_length"]], "legal_max_length (abstractordinalprofile attribute)": [[8, "pabutools.election.profile.ordinalprofile.AbstractOrdinalProfile.legal_max_length"]], "legal_max_length (approvalmultiprofile attribute)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.legal_max_length"]], "legal_max_length (approvalprofile attribute)": [[8, "pabutools.election.profile.approvalprofile.ApprovalProfile.legal_max_length"]], "legal_max_length (cardinalmultiprofile attribute)": [[8, "pabutools.election.profile.cardinalprofile.CardinalMultiProfile.legal_max_length"]], "legal_max_length (cardinalprofile attribute)": [[8, "pabutools.election.profile.cardinalprofile.CardinalProfile.legal_max_length"]], "legal_max_length (cumulativemultiprofile attribute)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.legal_max_length"]], "legal_max_length (cumulativeprofile attribute)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeProfile.legal_max_length"]], "legal_max_length (ordinalmultiprofile attribute)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalMultiProfile.legal_max_length"]], "legal_max_length (ordinalprofile attribute)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalProfile.legal_max_length"]], "legal_max_score (abstractcardinalprofile attribute)": [[8, "pabutools.election.profile.cardinalprofile.AbstractCardinalProfile.legal_max_score"]], "legal_max_score (abstractcumulativeprofile attribute)": [[8, "pabutools.election.profile.cumulativeprofile.AbstractCumulativeProfile.legal_max_score"]], "legal_max_score (cardinalmultiprofile attribute)": [[8, "pabutools.election.profile.cardinalprofile.CardinalMultiProfile.legal_max_score"]], "legal_max_score (cardinalprofile attribute)": [[8, "pabutools.election.profile.cardinalprofile.CardinalProfile.legal_max_score"]], "legal_max_score (cumulativemultiprofile attribute)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.legal_max_score"]], "legal_max_score (cumulativeprofile attribute)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeProfile.legal_max_score"]], "legal_max_total_score (abstractcumulativeprofile attribute)": [[8, "pabutools.election.profile.cumulativeprofile.AbstractCumulativeProfile.legal_max_total_score"]], "legal_max_total_score (cumulativemultiprofile attribute)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.legal_max_total_score"]], "legal_max_total_score (cumulativeprofile attribute)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeProfile.legal_max_total_score"]], "legal_min_cost (abstractapprovalprofile attribute)": [[8, "pabutools.election.profile.approvalprofile.AbstractApprovalProfile.legal_min_cost"]], "legal_min_cost (approvalmultiprofile attribute)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.legal_min_cost"]], "legal_min_cost (approvalprofile attribute)": [[8, "pabutools.election.profile.approvalprofile.ApprovalProfile.legal_min_cost"]], "legal_min_length (abstractapprovalprofile attribute)": [[8, "pabutools.election.profile.approvalprofile.AbstractApprovalProfile.legal_min_length"]], "legal_min_length (abstractcardinalprofile attribute)": [[8, "pabutools.election.profile.cardinalprofile.AbstractCardinalProfile.legal_min_length"]], "legal_min_length (abstractcumulativeprofile attribute)": [[8, "pabutools.election.profile.cumulativeprofile.AbstractCumulativeProfile.legal_min_length"]], "legal_min_length (abstractordinalprofile attribute)": [[8, "pabutools.election.profile.ordinalprofile.AbstractOrdinalProfile.legal_min_length"]], "legal_min_length (approvalmultiprofile attribute)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.legal_min_length"]], "legal_min_length (approvalprofile attribute)": [[8, "pabutools.election.profile.approvalprofile.ApprovalProfile.legal_min_length"]], "legal_min_length (cardinalmultiprofile attribute)": [[8, "pabutools.election.profile.cardinalprofile.CardinalMultiProfile.legal_min_length"]], "legal_min_length (cardinalprofile attribute)": [[8, "pabutools.election.profile.cardinalprofile.CardinalProfile.legal_min_length"]], "legal_min_length (cumulativemultiprofile attribute)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.legal_min_length"]], "legal_min_length (cumulativeprofile attribute)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeProfile.legal_min_length"]], "legal_min_length (ordinalmultiprofile attribute)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalMultiProfile.legal_min_length"]], "legal_min_length (ordinalprofile attribute)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalProfile.legal_min_length"]], "legal_min_score (abstractcardinalprofile attribute)": [[8, "pabutools.election.profile.cardinalprofile.AbstractCardinalProfile.legal_min_score"]], "legal_min_score (abstractcumulativeprofile attribute)": [[8, "pabutools.election.profile.cumulativeprofile.AbstractCumulativeProfile.legal_min_score"]], "legal_min_score (cardinalmultiprofile attribute)": [[8, "pabutools.election.profile.cardinalprofile.CardinalMultiProfile.legal_min_score"]], "legal_min_score (cardinalprofile attribute)": [[8, "pabutools.election.profile.cardinalprofile.CardinalProfile.legal_min_score"]], "legal_min_score (cumulativemultiprofile attribute)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.legal_min_score"]], "legal_min_score (cumulativeprofile attribute)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeProfile.legal_min_score"]], "legal_min_total_score (abstractcumulativeprofile attribute)": [[8, "pabutools.election.profile.cumulativeprofile.AbstractCumulativeProfile.legal_min_total_score"]], "legal_min_total_score (cumulativemultiprofile attribute)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.legal_min_total_score"]], "legal_min_total_score (cumulativeprofile attribute)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeProfile.legal_min_total_score"]], "most_common() (approvalmultiprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.most_common"]], "most_common() (cardinalmultiprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalMultiProfile.most_common"]], "most_common() (cumulativemultiprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.most_common"]], "most_common() (ordinalmultiprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalMultiProfile.most_common"]], "multiplicity() (abstractprofile method)": [[8, "pabutools.election.profile.profile.AbstractProfile.multiplicity"]], "multiplicity() (approvalmultiprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.multiplicity"]], "multiplicity() (approvalprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalProfile.multiplicity"]], "multiplicity() (cardinalmultiprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalMultiProfile.multiplicity"]], "multiplicity() (cardinalprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalProfile.multiplicity"]], "multiplicity() (cumulativemultiprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.multiplicity"]], "multiplicity() (cumulativeprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeProfile.multiplicity"]], "multiplicity() (multiprofile method)": [[8, "pabutools.election.profile.profile.MultiProfile.multiplicity"]], "multiplicity() (ordinalmultiprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalMultiProfile.multiplicity"]], "multiplicity() (ordinalprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalProfile.multiplicity"]], "multiplicity() (profile method)": [[8, "pabutools.election.profile.profile.Profile.multiplicity"]], "num_ballots() (abstractprofile method)": [[8, "pabutools.election.profile.profile.AbstractProfile.num_ballots"]], "num_ballots() (approvalmultiprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.num_ballots"]], "num_ballots() (approvalprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalProfile.num_ballots"]], "num_ballots() (cardinalmultiprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalMultiProfile.num_ballots"]], "num_ballots() (cardinalprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalProfile.num_ballots"]], "num_ballots() (cumulativemultiprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.num_ballots"]], "num_ballots() (cumulativeprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeProfile.num_ballots"]], "num_ballots() (multiprofile method)": [[8, "pabutools.election.profile.profile.MultiProfile.num_ballots"]], "num_ballots() (ordinalmultiprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalMultiProfile.num_ballots"]], "num_ballots() (ordinalprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalProfile.num_ballots"]], "num_ballots() (profile method)": [[8, "pabutools.election.profile.profile.Profile.num_ballots"]], "pabutools.election.profile": [[8, "module-pabutools.election.profile"]], "pop() (approvalmultiprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.pop"]], "pop() (approvalprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalProfile.pop"]], "pop() (cardinalmultiprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalMultiProfile.pop"]], "pop() (cardinalprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalProfile.pop"]], "pop() (cumulativemultiprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.pop"]], "pop() (cumulativeprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeProfile.pop"]], "pop() (ordinalmultiprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalMultiProfile.pop"]], "pop() (ordinalprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalProfile.pop"]], "popitem() (approvalmultiprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.popitem"]], "popitem() (cardinalmultiprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalMultiProfile.popitem"]], "popitem() (cumulativemultiprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.popitem"]], "popitem() (ordinalmultiprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalMultiProfile.popitem"]], "remove() (approvalprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalProfile.remove"]], "remove() (cardinalprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalProfile.remove"]], "remove() (cumulativeprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeProfile.remove"]], "remove() (ordinalprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalProfile.remove"]], "reverse() (approvalprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalProfile.reverse"]], "reverse() (cardinalprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalProfile.reverse"]], "reverse() (cumulativeprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeProfile.reverse"]], "reverse() (ordinalprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalProfile.reverse"]], "score() (cardinalmultiprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalMultiProfile.score"]], "score() (cumulativemultiprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.score"]], "setdefault() (approvalmultiprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.setdefault"]], "setdefault() (cardinalmultiprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalMultiProfile.setdefault"]], "setdefault() (cumulativemultiprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.setdefault"]], "setdefault() (ordinalmultiprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalMultiProfile.setdefault"]], "sort() (approvalprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalProfile.sort"]], "sort() (cardinalprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalProfile.sort"]], "sort() (cumulativeprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeProfile.sort"]], "sort() (ordinalprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalProfile.sort"]], "subtract() (approvalmultiprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.subtract"]], "subtract() (cardinalmultiprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalMultiProfile.subtract"]], "subtract() (cumulativemultiprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.subtract"]], "subtract() (ordinalmultiprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalMultiProfile.subtract"]], "total() (approvalmultiprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.total"]], "total() (cardinalmultiprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalMultiProfile.total"]], "total() (cumulativemultiprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.total"]], "total() (ordinalmultiprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalMultiProfile.total"]], "total_score() (abstractcardinalprofile method)": [[8, "pabutools.election.profile.cardinalprofile.AbstractCardinalProfile.total_score"]], "total_score() (cardinalmultiprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalMultiProfile.total_score"]], "total_score() (cardinalprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalProfile.total_score"]], "total_score() (cumulativemultiprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.total_score"]], "total_score() (cumulativeprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeProfile.total_score"]], "update() (approvalmultiprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.update"]], "update() (cardinalmultiprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalMultiProfile.update"]], "update() (cumulativemultiprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.update"]], "update() (ordinalmultiprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalMultiProfile.update"]], "validate_ballot() (abstractprofile method)": [[8, "pabutools.election.profile.profile.AbstractProfile.validate_ballot"]], "validate_ballot() (approvalmultiprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.validate_ballot"]], "validate_ballot() (approvalprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalProfile.validate_ballot"]], "validate_ballot() (cardinalmultiprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalMultiProfile.validate_ballot"]], "validate_ballot() (cardinalprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalProfile.validate_ballot"]], "validate_ballot() (cumulativemultiprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.validate_ballot"]], "validate_ballot() (cumulativeprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeProfile.validate_ballot"]], "validate_ballot() (ordinalmultiprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalMultiProfile.validate_ballot"]], "validate_ballot() (ordinalprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalProfile.validate_ballot"]], "values() (approvalmultiprofile method)": [[8, "pabutools.election.profile.approvalprofile.ApprovalMultiProfile.values"]], "values() (cardinalmultiprofile method)": [[8, "pabutools.election.profile.cardinalprofile.CardinalMultiProfile.values"]], "values() (cumulativemultiprofile method)": [[8, "pabutools.election.profile.cumulativeprofile.CumulativeMultiProfile.values"]], "values() (ordinalmultiprofile method)": [[8, "pabutools.election.profile.ordinalprofile.OrdinalMultiProfile.values"]], "additivesatisfaction (class in pabutools.election.satisfaction.additivesatisfaction)": [[9, "pabutools.election.satisfaction.additivesatisfaction.AdditiveSatisfaction"]], "additive_borda_sat (class in pabutools.election.satisfaction.positionalsatisfaction)": [[9, "pabutools.election.satisfaction.positionalsatisfaction.Additive_Borda_Sat"]], "additive_cardinal_sat (class in pabutools.election.satisfaction.additivesatisfaction)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Additive_Cardinal_Sat"]], "cc_sat (class in pabutools.election.satisfaction.functionalsatisfaction)": [[9, "pabutools.election.satisfaction.functionalsatisfaction.CC_Sat"]], "cardinality_sat (class in pabutools.election.satisfaction.additivesatisfaction)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Cardinality_Sat"]], "cost_log_sat (class in pabutools.election.satisfaction.functionalsatisfaction)": [[9, "pabutools.election.satisfaction.functionalsatisfaction.Cost_Log_Sat"]], "cost_sat (class in pabutools.election.satisfaction.additivesatisfaction)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Cost_Sat"]], "cost_sqrt_sat (class in pabutools.election.satisfaction.functionalsatisfaction)": [[9, "pabutools.election.satisfaction.functionalsatisfaction.Cost_Sqrt_Sat"]], "effort_sat (class in pabutools.election.satisfaction.additivesatisfaction)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Effort_Sat"]], "functionalsatisfaction (class in pabutools.election.satisfaction.functionalsatisfaction)": [[9, "pabutools.election.satisfaction.functionalsatisfaction.FunctionalSatisfaction"]], "groupsatisfactionmeasure (class in pabutools.election.satisfaction.satisfactionmeasure)": [[9, "pabutools.election.satisfaction.satisfactionmeasure.GroupSatisfactionMeasure"]], "positionalsatisfaction (class in pabutools.election.satisfaction.positionalsatisfaction)": [[9, "pabutools.election.satisfaction.positionalsatisfaction.PositionalSatisfaction"]], "relative_cardinality_sat (class in pabutools.election.satisfaction.additivesatisfaction)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Relative_Cardinality_Sat"]], "relative_cost_approx_normaliser_sat (class in pabutools.election.satisfaction.additivesatisfaction)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Relative_Cost_Approx_Normaliser_Sat"]], "relative_cost_sat (class in pabutools.election.satisfaction.additivesatisfaction)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Relative_Cost_Sat"]], "satisfactionmeasure (class in pabutools.election.satisfaction.satisfactionmeasure)": [[9, "pabutools.election.satisfaction.satisfactionmeasure.SatisfactionMeasure"]], "satisfactionmultiprofile (class in pabutools.election.satisfaction.satisfactionprofile)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile"]], "satisfactionprofile (class in pabutools.election.satisfaction.satisfactionprofile)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile"]], "aggregation_func (positionalsatisfaction attribute)": [[9, "pabutools.election.satisfaction.positionalsatisfaction.PositionalSatisfaction.aggregation_func"]], "append() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.append"]], "append() (satisfactionprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.append"]], "ballot (additivesatisfaction attribute)": [[9, "pabutools.election.satisfaction.additivesatisfaction.AdditiveSatisfaction.ballot"]], "ballot (functionalsatisfaction attribute)": [[9, "pabutools.election.satisfaction.functionalsatisfaction.FunctionalSatisfaction.ballot"]], "ballot (positionalsatisfaction attribute)": [[9, "pabutools.election.satisfaction.positionalsatisfaction.PositionalSatisfaction.ballot"]], "ballot (satisfactionmeasure attribute)": [[9, "pabutools.election.satisfaction.satisfactionmeasure.SatisfactionMeasure.ballot"]], "clear() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.clear"]], "clear() (satisfactionprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.clear"]], "copy() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.copy"]], "copy() (satisfactionprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.copy"]], "count() (satisfactionprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.count"]], "elements() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.elements"]], "extend() (satisfactionprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.extend"]], "extend_from_multiprofile() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.extend_from_multiprofile"]], "extend_from_profile() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.extend_from_profile"]], "extend_from_profile() (satisfactionprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.extend_from_profile"]], "fromkeys() (satisfactionmultiprofile class method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.fromkeys"]], "func (additivesatisfaction attribute)": [[9, "pabutools.election.satisfaction.additivesatisfaction.AdditiveSatisfaction.func"]], "func (functionalsatisfaction attribute)": [[9, "pabutools.election.satisfaction.functionalsatisfaction.FunctionalSatisfaction.func"]], "get() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.get"]], "get_project_sat() (additivesatisfaction method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.AdditiveSatisfaction.get_project_sat"]], "get_project_sat() (additive_cardinal_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Additive_Cardinal_Sat.get_project_sat"]], "get_project_sat() (cardinality_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Cardinality_Sat.get_project_sat"]], "get_project_sat() (cost_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Cost_Sat.get_project_sat"]], "get_project_sat() (effort_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Effort_Sat.get_project_sat"]], "get_project_sat() (relative_cardinality_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Relative_Cardinality_Sat.get_project_sat"]], "get_project_sat() (relative_cost_approx_normaliser_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Relative_Cost_Approx_Normaliser_Sat.get_project_sat"]], "get_project_sat() (relative_cost_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Relative_Cost_Sat.get_project_sat"]], "index() (satisfactionprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.index"]], "insert() (satisfactionprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.insert"]], "instance (additivesatisfaction attribute)": [[9, "pabutools.election.satisfaction.additivesatisfaction.AdditiveSatisfaction.instance"]], "instance (functionalsatisfaction attribute)": [[9, "pabutools.election.satisfaction.functionalsatisfaction.FunctionalSatisfaction.instance"]], "instance (positionalsatisfaction attribute)": [[9, "pabutools.election.satisfaction.positionalsatisfaction.PositionalSatisfaction.instance"]], "instance (satisfactionmeasure attribute)": [[9, "pabutools.election.satisfaction.satisfactionmeasure.SatisfactionMeasure.instance"]], "instance (satisfactionmultiprofile attribute)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.instance"]], "instance (satisfactionprofile attribute)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.instance"]], "items() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.items"]], "keys() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.keys"]], "most_common() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.most_common"]], "multiplicity() (groupsatisfactionmeasure method)": [[9, "pabutools.election.satisfaction.satisfactionmeasure.GroupSatisfactionMeasure.multiplicity"]], "multiplicity() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.multiplicity"]], "multiplicity() (satisfactionprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.multiplicity"]], "pabutools.election.satisfaction": [[9, "module-pabutools.election.satisfaction"]], "pop() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.pop"]], "pop() (satisfactionprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.pop"]], "popitem() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.popitem"]], "positional_func (positionalsatisfaction attribute)": [[9, "pabutools.election.satisfaction.positionalsatisfaction.PositionalSatisfaction.positional_func"]], "precomputed_values (additivesatisfaction attribute)": [[9, "pabutools.election.satisfaction.additivesatisfaction.AdditiveSatisfaction.precomputed_values"]], "preprocessing() (additivesatisfaction method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.AdditiveSatisfaction.preprocessing"]], "preprocessing() (additive_cardinal_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Additive_Cardinal_Sat.preprocessing"]], "preprocessing() (cardinality_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Cardinality_Sat.preprocessing"]], "preprocessing() (cost_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Cost_Sat.preprocessing"]], "preprocessing() (effort_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Effort_Sat.preprocessing"]], "preprocessing() (relative_cardinality_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Relative_Cardinality_Sat.preprocessing"]], "preprocessing() (relative_cost_approx_normaliser_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Relative_Cost_Approx_Normaliser_Sat.preprocessing"]], "preprocessing() (relative_cost_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Relative_Cost_Sat.preprocessing"]], "profile (additivesatisfaction attribute)": [[9, "pabutools.election.satisfaction.additivesatisfaction.AdditiveSatisfaction.profile"]], "profile (functionalsatisfaction attribute)": [[9, "pabutools.election.satisfaction.functionalsatisfaction.FunctionalSatisfaction.profile"]], "profile (positionalsatisfaction attribute)": [[9, "pabutools.election.satisfaction.positionalsatisfaction.PositionalSatisfaction.profile"]], "profile (satisfactionmeasure attribute)": [[9, "pabutools.election.satisfaction.satisfactionmeasure.SatisfactionMeasure.profile"]], "remove() (satisfactionprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.remove"]], "remove_satisfied() (groupsatisfactionmeasure method)": [[9, "pabutools.election.satisfaction.satisfactionmeasure.GroupSatisfactionMeasure.remove_satisfied"]], "remove_satisfied() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.remove_satisfied"]], "remove_satisfied() (satisfactionprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.remove_satisfied"]], "reverse() (satisfactionprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.reverse"]], "sat() (additivesatisfaction method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.AdditiveSatisfaction.sat"]], "sat() (additive_borda_sat method)": [[9, "pabutools.election.satisfaction.positionalsatisfaction.Additive_Borda_Sat.sat"]], "sat() (additive_cardinal_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Additive_Cardinal_Sat.sat"]], "sat() (cc_sat method)": [[9, "pabutools.election.satisfaction.functionalsatisfaction.CC_Sat.sat"]], "sat() (cardinality_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Cardinality_Sat.sat"]], "sat() (cost_log_sat method)": [[9, "pabutools.election.satisfaction.functionalsatisfaction.Cost_Log_Sat.sat"]], "sat() (cost_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Cost_Sat.sat"]], "sat() (cost_sqrt_sat method)": [[9, "pabutools.election.satisfaction.functionalsatisfaction.Cost_Sqrt_Sat.sat"]], "sat() (effort_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Effort_Sat.sat"]], "sat() (functionalsatisfaction method)": [[9, "pabutools.election.satisfaction.functionalsatisfaction.FunctionalSatisfaction.sat"]], "sat() (positionalsatisfaction method)": [[9, "pabutools.election.satisfaction.positionalsatisfaction.PositionalSatisfaction.sat"]], "sat() (relative_cardinality_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Relative_Cardinality_Sat.sat"]], "sat() (relative_cost_approx_normaliser_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Relative_Cost_Approx_Normaliser_Sat.sat"]], "sat() (relative_cost_sat method)": [[9, "pabutools.election.satisfaction.additivesatisfaction.Relative_Cost_Sat.sat"]], "sat() (satisfactionmeasure method)": [[9, "pabutools.election.satisfaction.satisfactionmeasure.SatisfactionMeasure.sat"]], "sat_class (satisfactionmultiprofile attribute)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.sat_class"]], "sat_class (satisfactionprofile attribute)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.sat_class"]], "setdefault() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.setdefault"]], "sort() (satisfactionprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.sort"]], "subtract() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.subtract"]], "total() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.total"]], "total_satisfaction() (groupsatisfactionmeasure method)": [[9, "pabutools.election.satisfaction.satisfactionmeasure.GroupSatisfactionMeasure.total_satisfaction"]], "total_satisfaction() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.total_satisfaction"]], "total_satisfaction() (satisfactionprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionProfile.total_satisfaction"]], "update() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.update"]], "values() (satisfactionmultiprofile method)": [[9, "pabutools.election.satisfaction.satisfactionprofile.SatisfactionMultiProfile.values"]], "completion_by_rule_combination() (in module pabutools.rules.exhaustion)": [[12, "pabutools.rules.exhaustion.completion_by_rule_combination"]], "exhaustion_by_budget_increase() (in module pabutools.rules.exhaustion)": [[12, "pabutools.rules.exhaustion.exhaustion_by_budget_increase"]], "greedy_utilitarian_welfare() (in module pabutools.rules.greedywelfare)": [[12, "pabutools.rules.greedywelfare.greedy_utilitarian_welfare"]], "max_additive_utilitarian_welfare() (in module pabutools.rules.maxwelfare)": [[12, "pabutools.rules.maxwelfare.max_additive_utilitarian_welfare"]], "method_of_equal_shares() (in module pabutools.rules.mes)": [[12, "pabutools.rules.mes.method_of_equal_shares"]], "pabutools.rules": [[12, "module-pabutools.rules"]], "popularity_comparison() (in module pabutools.rules.composition)": [[12, "pabutools.rules.composition.popularity_comparison"]], "sequential_phragmen() (in module pabutools.rules.phragmen)": [[12, "pabutools.rules.phragmen.sequential_phragmen"]], "social_welfare_comparison() (in module pabutools.rules.composition)": [[12, "pabutools.rules.composition.social_welfare_comparison"]]}}) \ No newline at end of file diff --git a/docs/usage.html b/docs/usage.html index c0a1ba3d..010a175f 100644 --- a/docs/usage.html +++ b/docs/usage.html @@ -708,11 +708,13 @@

      Additive Satisfaction FunctionsAdditiveSatisfaction implements such functions. Its constructor takes a function as a parameter that maps -instance, profile, ballot, and project to a score. As an example, we demonstrate +instance, profile, ballot, project, and pre-computed values to a score. The pre-computed +argument is used to pass fixed parameters to the function that can be used +for expensive computations not to be done more than once. As an example, we demonstrate how to define the cardinality satisfaction function.

      from pabutools.election import AdditiveSatisfaction
       
      -def cardinality_sat_func(instance, profile, ballot, project):
      +def cardinality_sat_func(instance, profile, ballot, project, precomputed_values):
           return int(project in ballot)
       
       class Cardinality_Sat(AdditiveSatisfaction):
      diff --git a/pabutools/election/satisfaction/satisfactionprofile.py b/pabutools/election/satisfaction/satisfactionprofile.py
      index 6b17c4c2..6bfeb0ae 100644
      --- a/pabutools/election/satisfaction/satisfactionprofile.py
      +++ b/pabutools/election/satisfaction/satisfactionprofile.py
      @@ -118,9 +118,13 @@ def multiplicity(self, sat: SatisfactionMeasure) -> int:
               """
               return 1
       
      -    def remove_satisfied(self, sat_bound: dict[str, Number],
      -                         projects: Iterable[Project]) -> SatisfactionProfile:
      -        res = SatisfactionProfile((s for s in self if s.sat(projects) < sat_bound[s.ballot.name]), instance=self.instance)
      +    def remove_satisfied(
      +        self, sat_bound: dict[str, Number], projects: Iterable[Project]
      +    ) -> SatisfactionProfile:
      +        res = SatisfactionProfile(
      +            (s for s in self if s.sat(projects) < sat_bound[s.ballot.name]),
      +            instance=self.instance,
      +        )
               res.sat_class = self.sat_class
               return res
       
      @@ -304,9 +308,17 @@ def extend_from_multiprofile(
           def multiplicity(self, sat: SatisfactionMeasure) -> int:
               return self[sat]
       
      -    def remove_satisfied(self, sat_bound: dict[AbstractBallot, Number],
      -                         projects: Iterable[Project]) -> SatisfactionMultiProfile:
      -        res = SatisfactionMultiProfile({s: m for s, m in self.items() if s.sat(projects) < sat_bound[s.ballot.name]}, instance=self.instance)
      +    def remove_satisfied(
      +        self, sat_bound: dict[AbstractBallot, Number], projects: Iterable[Project]
      +    ) -> SatisfactionMultiProfile:
      +        res = SatisfactionMultiProfile(
      +            {
      +                s: m
      +                for s, m in self.items()
      +                if s.sat(projects) < sat_bound[s.ballot.name]
      +            },
      +            instance=self.instance,
      +        )
               res.sat_class = self.sat_class
               return res