Weighted graphs

I often work with graphs with SWI-Prolog but not always weighted graphs. While I understand your question, it is so wide open it is hard to give more than a general answer.

These are the options I would try.

  1. Search the SWI-Prolog packs for graphs.
  2. Search the GitHub repositories of users with established code for SWI-Prolog. They are listed as a subsection in the Wiki topic Useful Prolog References.
  3. Look for such code in Prolog books.
  4. Search all of the GitHub repositories that have some Prolog code. (query)

HTH