def get_user_min_max(cart_group_map)
sup_min = 0
sup_max = nil
cart_current_min = 0
cart_current_max = nil
cart_group_map.each do |group_name, component_instance_list|
ginst = self.group_instance_map[group_name]
sup_min += ginst.supported_min
cart_current_min += ginst.min
if sup_max.nil? or ginst.supported_max==-1
sup_max = ginst.supported_max
else
sup_max += ginst.supported_max unless sup_max==-1
end
if cart_current_max.nil? or ginst.max==-1
cart_current_max = ginst.max
else
cart_current_max += ginst.max unless cart_current_max==-1
end
end
return cart_current_min, cart_current_max, sup_min, sup_max
end