Adding option for SAP to max flow algorithm