Fitness function. Working on the fitness function algorithm.
First = establish first and last weekend day (could be done outside since the number is allways the same for the same period). Count number of Fridays. Count Thursdays since they are so good.
Second = pass through each Doctor vs the Schedule specimen and count up his basic, friday, thursday and weekend shifts.
Third = if hard constraints are ok, then calculate details. Otherwise ignore them? Might save time, might lead to longer specimen search since the shifts are not easily interchangeable without modifying EVERYTHING else.
Four = count total Thursdays, Fridays, Sundays, Saturdays and compare them to some reference interval (possibly stored as total count for each doctor) and punish excessive numbers of same-type-of-day shifts. Benefit if the days are spread among all almost symetrically. Problem arises with custom number of shifts, where it is impossible to put into context or relative count without same fixed maximum.