Added dynamic adjustement of source_max_weight