Skip to content

Commit 5f05acb

Browse files
authored
Removed main from cstv.py
1 parent 95fc11d commit 5f05acb

1 file changed

Lines changed: 0 additions & 21 deletions

File tree

‎pabutools/rules/cstv.py‎

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -673,24 +673,3 @@ def cstv_budgeting_combination(projects: Instance, donors: Profile, combination:
673673
else:
674674
raise KeyError(f"Invalid combination algorithm: {combination}. Please insert an existing combination algorithm.")
675675

676-
677-
678-
def regular_example():
679-
instance = Instance(init=[Project("Project A", 30), Project("Project B", 40), Project("Project C", 30), Project("Project D", 25)])
680-
donors = Profile([
681-
CumulativeBallot({"Project A": 5, "Project B": 10, "Project C": 5, "Project D": 5}),
682-
CumulativeBallot({"Project A": 10, "Project B": 10, "Project C": 0, "Project D": 5}),
683-
CumulativeBallot({"Project A": 0, "Project B": 15, "Project C": 5, "Project D": 5}),
684-
CumulativeBallot({"Project A": 0, "Project B": 0, "Project C": 20, "Project D": 5}),
685-
CumulativeBallot({"Project A": 15, "Project B": 5, "Project C": 0, "Project D": 5})
686-
])
687-
selected_projects = cstv_budgeting_combination(instance, donors, "ewtc")
688-
print("Regular example:")
689-
if selected_projects:
690-
logger.info("Selected projects: %s",selected_projects)
691-
692-
if __name__ == "__main__":
693-
logging.basicConfig(level=logging.DEBUG)
694-
import doctest
695-
# doctest.testmod()
696-
regular_example()

0 commit comments

Comments
 (0)