@Oleksandr R. & @Michael Hale, Thank you, I'm still new to Mathematica. I looked through the code of priority queue in the Mathematica journal page. It just satisfies my needs. But I came across a little problem when calling the package. First is the warning MakeQueue::shdw: "Symbol \!(\"MakeQueue\") appeared in multiple contexts" . When I called the package again, the warning disappeared, but the functions in the package didn't work.
I changed the predicate from Greater to (Min[#1[[2]]]<Min[#2[[2]]])& ,which may cause the problem. But when I replaced the predicate to less with less=(Min[#1[[2]]]<Min[#2[[2]]])&, the problem disappeared. And all works: That's weird!
Because I want the lower value to have higher priority.