It is not a good idea to have the panel/screen flats done at dawn/dusk, and in any case the dome/roof needs to be closed. This is not provided in the current logic. Somehow Scheduler needs to be aware of ACP being setup for Panel Flats. Should dawn and duck flats remain a concept with options? Could we assume there are no light leaks and do at dawn/dusk but with the roof closed. That might be the ticket. Or maybe right after the sun rises above the "sun down angle" in the morning? Dusk could mean "start at sundown" and run till complete? Or maybe no dusk at all.
Review the timing of dome/roof open/close and the options selected.