Skip to content

Commit

Permalink
Fixed merged_stages_datetime_df (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
StannisMod authored Nov 15, 2023
1 parent 8a8ab28 commit cbf55f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sampo/schemas/schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ def _deserialize(cls, dict_representation: T) -> 'Schedule':
dict_representation['works'] = [ScheduledWork._deserialize(sw) for sw in dict_representation['works']]
return Schedule.from_scheduled_works(**dict_representation)

# @lru_cache
@lru_cache
def merged_stages_datetime_df(self, offset: Union[datetime, str]) -> DataFrame:
"""
Merges split stages of same works after lag optimization and returns schedule DataFrame shifted to start.
:param offset: Start of schedule, to add as an offset.
:return: Shifted schedule DataFrame with merged tasks.
"""
result = self.offset_schedule(offset)
result = fix_split_tasks(self.offset_schedule(offset))
return result

def offset_schedule(self, offset: Union[datetime, str]) -> DataFrame:
Expand Down

0 comments on commit cbf55f1

Please sign in to comment.