I am writing a Project Scheduling Optimization library, a special kind of a Job Shop scheduling problem. To keep it simple, so far my algorithm will only work with workers being the only resource for the project, and there are only 2 types of constraints so far:
1) Every worker has a constraint on what projects he can work on. Only some workers are skilled to work on the same project (for example: W1, W3, W7 worker can work on project P2; W2, W3, W5 can work on project P3; etc), but same worker can be skilled to work on multiple projects, and is allowed to work on multiple projects at different times (for example: W1 works on P1 5 days in a row, then he switches to P2 for 4 days, then he comes back to P1, etc)
2) Every worker has a constraint on how many hours he can work each day -- this should represent a worker's efficiency
To start with, I created a simple timetable consisting of only 4 projects and 4 workers.
PROJECTS:
- P1; starting: May, the 1st; deadline: 30 days; work hours needed: 300
- P2; starting: July, the 1st; deadline: 60 days; work hours needed: 150
- P3; starting: May, the 15th; deadline: 45 days; work hours needed: 50
- P4; starting: April, the 20th; deadline: 20 days; work hours needed: 150
WORKERS:
- W1; efficiency: 10h/day; available for projects: P1, P2, P3, P4
- W2; efficiency: 5h/day; available for projects: P1, P3
- W3; efficiency: 8h/day; available for projects: P1, P4
- W4; efficiency: 6h/day; available for projects: P2, P4
With a problem being setup like this, how should a chromosome for the Genetic Algorithm look like, in other words - how to convert this data into a GA chromosome that a GA will know how to work with (calculate the numerical fitness upon it)?
An example in Java
would be perfect.