The link-orientation problem on weighted networks