I have been implementing the Hungarian algorithm, and have run into a problem. I know how to transform the cost matrix to the point where the number of lines needed to cover all 0's is equal to N. I just to not know how to assign the agent to the job, if their are multiple 0s in each row/column.
I just skimmed this as I couldn't tell you off hand how to code it. This looks like he has the code at the bottom for one version of the Hungarian. If this doesn't help you, I can't any further, my understanding is more mathematical and not algorithmic. Either way, good luck and maybe someone else can chime in if this doesn't help.