Skip to content

Commit

Permalink
minor modifications for the sake of testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Abodi-Massarwa committed Aug 6, 2024
1 parent 842d3a8 commit 82fd585
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ def per_category_round_robin(alloc: AllocationBuilder, item_categories: dict[str
logger.info(f'Envy graph before RR -> {envy_graph.nodes}, edges -> in {envy_graph.edges}')
helper_categorization_friendly_picking_sequence(alloc, current_order, item_categories[category], agent_category_capacities, category)
helper_update_envy_graph(alloc.bundles, valuation_func, envy_graph, item_categories, agent_category_capacities,callback)
callback(helper_generate_directed_graph_base64(envy_graph))#TODO remove
logger.info(f'Envy graph after RR -> {envy_graph.nodes}, edges -> in {envy_graph.edges}')
if not nx.is_directed_acyclic_graph(envy_graph):
logger.info("Cycle removal started ")
Expand Down Expand Up @@ -765,8 +764,8 @@ def helper_update_envy_graph(curr_bundles: dict, valuation_func: callable, envy_
#print(f"{agent1} envies {agent2}") # works great .
# we need to add edge from the envier to the envyee
envy_graph.add_edge(agent1, agent2)
if callback:
callback(helper_generate_directed_graph_base64(envy_graph))
#if callback:
callback(helper_generate_directed_graph_base64(envy_graph))
logger.info(f"envy_graph.edges after update -> {envy_graph.edges}")

# def visualize_graph(envy_graph):
Expand Down

0 comments on commit 82fd585

Please sign in to comment.