Skip to content

Commit

Permalink
made flex intervals more flexible
Browse files Browse the repository at this point in the history
  • Loading branch information
MalteUniOldenburg committed Mar 26, 2024
1 parent c175a32 commit 71952cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mango_library/negotiation/winzent/winzent_base_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ async def start_negotiation(self, start_dates, values):
:param values: power value to negotiate about
"""
values = [math.ceil(value) for value in values]
print(values)
self._solution_found = False
requirement = xboole.Requirement(
xboole.Forecast((start_dates, values)), ttl=self._current_ttl)
Expand Down Expand Up @@ -317,7 +318,7 @@ def get_flexibility_for_interval(self, time_span, msg_type=6):
if t_start in self.flex:
flexibility = self.flex[t_start]
else:
flexibility = [0, 0]
flexibility = [0 for _ in time_span]
if msg_type == xboole.MessageType.OfferNotification:
# in this case, the upper part of the flexibility interval
# is considered
Expand Down

0 comments on commit 71952cc

Please sign in to comment.