diff --git a/SAS/TMSS/src/tmss/tmssapp/models/specification.py b/SAS/TMSS/src/tmss/tmssapp/models/specification.py index 7d98fdc123cf9dc29fc93055904ccb5f6e637ace..6b21c1512c76f804399afed4ae448be2678a4297 100644 --- a/SAS/TMSS/src/tmss/tmssapp/models/specification.py +++ b/SAS/TMSS/src/tmss/tmssapp/models/specification.py @@ -662,7 +662,9 @@ class TaskBlueprint(NamedCommon): @property def relative_start_time(self) -> datetime.timedelta: - '''return the earliest relative start time of all subtasks of this task + '''The relative start time is relative to the start time of the 'start' of the parent scheduling unit. + It's based on the scheduling_relation's from the scheduling_unit's specification, + and hence it determines the order in which the tasks within the unit should be executed. ''' scheduling_relations = list(self.first_scheduling_relation.all()) + list(self.second_scheduling_relation.all()) for scheduling_relation in scheduling_relations: @@ -679,11 +681,12 @@ class TaskBlueprint(NamedCommon): # todo: max of several relations if previous_related_task_blueprint.relative_stop_time: return previous_related_task_blueprint.relative_stop_time + datetime.timedelta(seconds=time_offset) - return datetime.timedelta(seconds=666660) + return datetime.timedelta(seconds=0) @property def relative_stop_time(self) -> datetime.timedelta: - '''return the latest relative stop time of all subtasks of this task + '''The relative_stop_time is the relative_start_time+duration. + See relative_start_time for an explanation of it's intended usage. ''' # todo: when it was added, check if subtask.specifications_template.type.value == TaskType.Choices.OBSERVATION.value: try: