Skip to content
Snippets Groups Projects
Commit 0bc2d66e authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

TMSS-717: quick fix: for estimating the earliest_possible_start_time, we need...

TMSS-717: quick fix: for estimating the earliest_possible_start_time, we need the full duration of the scheduling unit, not just the longest one.
parent 2aa0fe79
No related branches found
No related tags found
1 merge request!447TMSS-717: merge commissioning fixes back to master
...@@ -329,7 +329,8 @@ def get_longest_observation_task_name_from_requirements_doc(scheduling_unit: mod ...@@ -329,7 +329,8 @@ def get_longest_observation_task_name_from_requirements_doc(scheduling_unit: mod
def get_earliest_possible_start_time(scheduling_unit: models.SchedulingUnitBlueprint, lower_bound: datetime) -> datetime: def get_earliest_possible_start_time(scheduling_unit: models.SchedulingUnitBlueprint, lower_bound: datetime) -> datetime:
constraints = scheduling_unit.draft.scheduling_constraints_doc constraints = scheduling_unit.draft.scheduling_constraints_doc
main_observation_task_name = get_target_observation_task_name_from_requirements_doc(scheduling_unit) # TODO: for estimating the earliest_possible_start_time, we need the full duration of the scheduling unit, not just the longest one.
main_observation_task_name = get_longest_observation_task_name_from_requirements_doc(scheduling_unit)
duration = timedelta(seconds=scheduling_unit.requirements_doc['tasks'][main_observation_task_name]['specifications_doc']['duration']) duration = timedelta(seconds=scheduling_unit.requirements_doc['tasks'][main_observation_task_name]['specifications_doc']['duration'])
try: try:
if 'at' in constraints['time']: if 'at' in constraints['time']:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment