parameters: (self, activity, activity_block_moved_list,
                                activity_block_list)
return_statement: return [new_start,new_stop]
docstring: Recompose Activity from moved blocks.
      Warning : in case of calendar view, object bounds are not recomposed : only
                bounds of each activity are calculated, not object bounds !
  
      takes a list with modified blocks and another one with original blocks,
      returning new startactivity_block_moved_list & stop for the activity
      BEWARE : in case an activity bound was cut off to fit planning size, the
      value will not be updated (as the block was not on the real activity bound)
docstring_summary: Recompose Activity from moved blocks.
      Warning : in case of calendar view, object bounds are not recomposed : only
                bounds of each activity are calculated, not object bounds !
docstring_tokens: Recompose Activity from moved blocks . Warning : in case of calendar view object bounds are not recomposed : only bounds of each activity are calculated not object bounds !
function: def getActivityBounds(self, activity, activity_block_moved_list,
                                activity_block_list):
      """
      Recompose Activity from moved blocks.
      Warning : in case of calendar view, object bounds are not recomposed : only
                bounds of each activity are calculated, not object bounds !
  
      takes a list with modified blocks and another one with original blocks,
      returning new startactivity_block_moved_list & stop for the activity
      BEWARE : in case an activity bound was cut off to fit planning size, the
      value will not be updated (as the block was not on the real activity bound)
      """
      # getting list moved block names
      block_moved_name_list = [x['block_moved']['name'] for x in activity_block_moved_list]
  
      new_start = None
      new_stop = None
      for activity_block in activity_block_list:
        if activity_block.name in block_moved_name_list:
          # the block composing the activity has been moved, not taking care of
          # the original one, but only the final position (block_moved)
          for temp_block_moved in activity_block_moved_list:
            # recovering corresponding moved block
            if temp_block_moved['block_moved']['name'] == activity_block.name:
              # moved block has been found
              temp_start = temp_block_moved['block_moved']['lane_axis_start']
              temp_stop  = temp_block_moved['block_moved']['lane_axis_stop']
              break
        else:
          # the block has not been moved
          temp_start = activity_block.position_lane.absolute_begin
          temp_stop  = activity_block.position_lane.absolute_end
        # once the start & stop values are recovered, need to test them to check
        # if it is needed to update
        if None not in [new_start, new_stop]:
          if temp_start < new_start:
            new_start = temp_start
          if temp_stop > new_stop:
            new_stop = temp_stop
        else:
          # new_start is not defined because it is the first block found
          new_start = temp_start
          new_stop = temp_stop
  
      # new start & stop values are known
      # checking weither activity has been cut-off to fit the planning bounds
      #if activity.lane_axis_begin != activity.lane_axis_start:
      #  new_start = activity.lane_axis_begin
      #if activity.lane_axis_end != activity.lane_axis_stop:
      #  new_stop  = activity.lane_axis_end
  
      return [new_start,new_stop]
function_tokens: def getActivityBounds ( self , activity , activity_block_moved_list , activity_block_list ) : # getting list moved block names block_moved_name_list = [ x [ 'block_moved' ] [ 'name' ] for x in activity_block_moved_list ] new_start = None new_stop = None for activity_block in activity_block_list : if activity_block . name in block_moved_name_list : # the block composing the activity has been moved, not taking care of # the original one, but only the final position (block_moved) for temp_block_moved in activity_block_moved_list : # recovering corresponding moved block if temp_block_moved [ 'block_moved' ] [ 'name' ] == activity_block . name : # moved block has been found temp_start = temp_block_moved [ 'block_moved' ] [ 'lane_axis_start' ] temp_stop = temp_block_moved [ 'block_moved' ] [ 'lane_axis_stop' ] break else : # the block has not been moved temp_start = activity_block . position_lane . absolute_begin temp_stop = activity_block . position_lane . absolute_end # once the start & stop values are recovered, need to test them to check # if it is needed to update if None not in [ new_start , new_stop ] : if temp_start < new_start : new_start = temp_start if temp_stop > new_stop : new_stop = temp_stop else : # new_start is not defined because it is the first block found new_start = temp_start new_stop = temp_stop # new start & stop values are known # checking weither activity has been cut-off to fit the planning bounds #if activity.lane_axis_begin != activity.lane_axis_start: #  new_start = activity.lane_axis_begin #if activity.lane_axis_end != activity.lane_axis_stop: #  new_stop  = activity.lane_axis_end return [ new_start , new_stop ]