As I recall with the disk seek algorithm, one key was the longer a particular read request waited, the higher priority it got, since everyone needed timely service. Usually head move time was the biggest delay so another consideration would be like sharing a taxi (or elevator?) that you can drop another passenger off or pick them up if they happened to be close to the path already in progress.
Did the upper floors also have a selection button or simply UP and DOWN? Was the assumption the downward passengers are all going to the lobby, or was there a mezzanine and basement parking typical destination too?
I worked as a security guard in college, and noted that in a high-rise building of about 12 floors with two or 3 elevators, the default in quiet times was the system would locate the elevators on the ground floor except for one positioned about 2/3 the way up (say 7 or 8 of 12). Elementary scheduling.
If I were programming this “fuzzy” I’d do something like imagine the destination you punched in as a fuzzy mark and assign it to an elevator that’s near and (will be?) free. Sort of - your destination is the peak of a bell curve around X nearby floors. Next customer - if their destination falls within that curve, add to that elevator which has not yet arrived/departed. If not close, assign another elevator. SO if the elevators are busy, you will build a list of people - let’s say - who are going to top 5 floors, or floors 13-18, or 1-7 or 4-10. How full and how long to wait for next elevator, also considerations. The spread of the bell curve is determined by elevator speed.
Obvious rules - no back and forth - nobody wants to ride up to 14 then back down to 12, you always stop along the way. Avoid stuffing the elevators, since the computer cannot know that you entered the floor because your party of 6 just came back from lunch, or Bob is pushing a luggage cart. Plus, too many destinations in the same elevator makes the trip really slow for the last person.
With modern high-speed elevators, it can take almost as much time to go 1 or 2 floors due to slowing down, than to do 5 or 6 floors - so the key is maybe schedule the people whose floors are close together in the same elevator or allow for 2 clusters. AI algorithms can also map out traffic patterns and adjust accordingly (many arrivals in the morning, departures at 5PM, which destinations hold and seem to take forever to load/unload, etc.)
But ultimately, the logic would probably work on assigning a dynamic weight system to each trip - 2 dimensions, floor number(s) and priority. Closest match of elevator and person is assigned. That then changes the elevator’s weights, which affects which elevator the next customer gets.