Reverse assignment: calibrating link cost functions and updating demand from traffic counts and time measurements