def _generateValueDict(self, simulation_movement, quantity_ratio=1, start_date_delta=0, stop_date_delta=0, resource_list=[], variation_category_list=[], variation_property_dict={}, **value_delta_dict): """ Generate values to save on simulation movement. """ value_dict = CopyToTarget._generateValueDict( self, simulation_movement, quantity_ratio=quantity_ratio, start_date_delta=start_date_delta, stop_date_delta=stop_date_delta, resource_list=resource_list, variation_category_list=variation_category_list, variation_property_dict=variation_property_dict, **value_delta_dict) # Modify resource etc. if resource_list: value_dict['resource_list'] = resource_list if variation_category_list: value_dict['variation_category_list'] = variation_category_list if variation_property_dict: value_dict['variation_property_dict'] = variation_property_dict return value_dict
def _generateValueDeltaDict(self, simulation_movement): """ Get interesting value """ value_dict = CopyToTarget._generateValueDict(self, simulation_movement) value_dict.update({ 'aggregate_list': simulation_movement.getDeliveryValue().getAggregateList(), }) return value_dict
def _getParentParameters(self, simulation_movement, **value_delta_dict): """ Get parent movement, and its value delta dict. """ applied_rule = simulation_movement.getParentValue() rule = applied_rule.getSpecialiseValue() if rule.getPortalType() != "Transformation Sourcing Rule": value_delta_dict.pop('aggregate_list', None) return CopyToTarget._getParentParameters(self, simulation_movement, **value_delta_dict)
def _generateValueDict(self, simulation_movement, aggregate_list = None, **value_delta_dict): """ Generate values to save on movement. """ value_dict = CopyToTarget._generateValueDict(self, simulation_movement, **value_delta_dict) # Modify aggregate_list if aggregate_list is not None: value_dict['aggregate_list'] = aggregate_list return value_dict
def _generateValueDeltaDict(self, simulation_movement): """ Get interesting values XXX: better description is possible. But is it needed ? """ value_delta_dict = CopyToTarget._generateValueDeltaDict( self, simulation_movement) value_delta_dict.update({ 'resource_list': simulation_movement.getDeliveryValue().getResourceList(), 'variation_category_list': simulation_movement.getDeliveryValue().getVariationCategoryList(), 'variation_property_dict': simulation_movement.getDeliveryValue().getVariationPropertyDict(), }) return value_delta_dict
def _generateValueDeltaDict(self, simulation_movement): """ Get interesting values XXX: better description is possible. But is it needed ? """ value_delta_dict = CopyToTarget._generateValueDeltaDict( self, simulation_movement) value_delta_dict.update( { 'resource_list' : simulation_movement.getDeliveryValue().getResourceList(), 'variation_category_list': simulation_movement.getDeliveryValue().getVariationCategoryList(), 'variation_property_dict': simulation_movement.getDeliveryValue().getVariationPropertyDict(), }) return value_delta_dict