give HBW and HBE trips to workers / students. If there are no fitting persons, randomly assign.
give HBS and HBO randomly to all persons.
give NHBW trips to persons that have a HBW trip if possible, randomly select any person otherwise.
give NHBO trips to persons that either have HBE/HBS/HBE trips, randomly select any person otherwise.
give HBW and HBE trips to workers / students. If there are no fitting persons, randomly assign. give HBS and HBO randomly to all persons. give NHBW trips to persons that have a HBW trip if possible, randomly select any person otherwise. give NHBO trips to persons that either have HBE/HBS/HBE trips, randomly select any person otherwise.