diff --git a/mango_library/negotiation/winzent/xboole/governor.py b/mango_library/negotiation/winzent/xboole/governor.py index 4778673..adb87ea 100644 --- a/mango_library/negotiation/winzent/xboole/governor.py +++ b/mango_library/negotiation/winzent/xboole/governor.py @@ -100,7 +100,9 @@ def power_balance_strategy(self, strategy): self._power_balance_strategy = strategy def try_balance(self): + print("try_balance running") assert self._power_balance is not None assert self._power_balance_strategy is not None + print("assertions done") return self._power_balance_strategy.solve( self._power_balance, xboole.InitiatingParty.Local) diff --git a/mango_library/negotiation/winzent/xboole/xboole_ethical_solver_strategy.py b/mango_library/negotiation/winzent/xboole/xboole_ethical_solver_strategy.py index 768ba45..8216e5a 100644 --- a/mango_library/negotiation/winzent/xboole/xboole_ethical_solver_strategy.py +++ b/mango_library/negotiation/winzent/xboole/xboole_ethical_solver_strategy.py @@ -208,9 +208,11 @@ def solve(self, power_balance, initiator): :param power_balance: The replies for the negotiation. :param initiator: The initiator for the boolean solver """ + print("solve inside ethical solver running") # in this case, the agent did not receive any offers and the only requirement in the power balance is # his own. Consequently, no solution can be created. if len(power_balance.ledger[self.start_time]) < 2: + print("no offers received. Aborting solution process") return {}, None, None self.initial_requirement = PowerBalanceSolverStrategy.find_initial_requirement(power_balance, initiator) # if all the available offers cannot satisfy the need for this timeslot, @@ -220,6 +222,7 @@ def solve(self, power_balance, initiator): most_ethical_requirements.ledger[self.start_time].remove(self.initial_requirement) most_ethical_requirements.ledger[self.start_time].sort(key=get_ethics_score_from_req, reverse=True) time_span = self.initial_requirement.time_span + print("checking if all offers are of same time span") if not are_all_offers_in_same_time_span(most_ethical_requirements): most_ethical_requirements.ledger[self.start_time].append(self.initial_requirement) return self.ethical_solution_algorithm(most_ethical_requirements, initiator)