Hungarian method optimization updates from master branches