How dkomni/genetic-algorithm-scheduling works
This Java command-line application searches for a feasible, low-penalty 30-employee, 14-day shift schedule. The principal workflow is parameter input, feasible population generation, repeated selection and variation, penalty evaluation, and termination with a printed schedule. The graph separates hard-constraint validation from soft-constraint scoring; both are implemented in Fitness.java. The README documents additional operators and tuning options, while the sampled source confirms the active rank selection, uniform crossover, and random mutation path.
Main entry points: GA_main.java GA entry point · Population.java Population · Individual.java Schedule individual · Fitness.java Hard validation
Components 10
Run and evolution
- GA entry point
GA_main.java - Rank selection
GA_main.java - Uniform crossover
GA_main.java - Random mutation
GA_main.java - Printed schedule
GA_main.java
Schedule model
- Population
Population.java - Schedule individual
Individual.java
Constraint evaluation
- Hard validation
Fitness.java - Penalty scoring
Fitness.java
Other components
- Operator
Connections 12
- Operator → GA entry point: provides parameters
- GA entry point → Population: creates and initializes
- Population → Schedule individual: creates schedules
- Population → Hard validation: checks feasibility
- GA entry point → Penalty scoring: scores individuals
- GA entry point → Rank selection: selects parents
- Rank selection → Population: reads candidates
- GA entry point → Uniform crossover: combines parents
- GA entry point → Random mutation: mutates offspring
- Random mutation → Schedule individual: regenerates gene
- GA entry point → Population: builds next generation
- GA entry point → Printed schedule: prints best schedule