Java, Python, and OR-Tools implementations of a fixed-window multi-machine job scheduling problem.
This repository is the polished successor to the older school project repo. The original coursework version still belongs in the learning bucket, while this version is meant to be the public technical showcase.
We are given:
NmachinesMjobs- a fixed start and end time for each job
Each job must be assigned to at most one machine, and overlapping jobs cannot be assigned to the same machine.
This project is meant to show the same operations research problem through multiple implementation styles:
- Java baseline solver
- Python baseline solver
- OR-Tools optimizer-backed solver
The goal is not only to solve the problem, but to package the solution in a way that other people can download, run, inspect, and compare.
The first public version will support a simple objective:
- maximize the number of scheduled jobs
Later versions can add:
- weighted jobs
- machine capabilities
- setup costs
- tardiness penalties
- load balancing
multi-machine-interval-scheduling/
input/
output/
docs/
java/
python/
ortools-python/
ortools-java/
Core Java source lives in:
java/src/mmis/Main.javajava/src/mmis/GreedyScheduler.javajava/src/mmis/Job.javajava/src/mmis/MachineSchedule.javajava/src/mmis/CsvJobReader.javajava/src/mmis/CsvScheduleWriter.java
If you are viewing the repo on GitHub, open the java/src/mmis/ folder directly.
Java baseline:
cd java
.\run-java.ps1Java tests:
cd java
.\run-java-tests.ps1Python greedy baseline:
cd python
.\run-python.ps1Python OR-Tools baseline:
cd ortools-python
.\run-ortools-python.ps1Java OR-Tools baseline:
cd ortools-java
.\run-ortools-java.ps1
.\run-ortools-java-tests.ps1Run every track:
.\run-all.ps1Greedy baseline reference:
Python greedy mirror:
OR-Tools CP-SAT result:
The Java baseline is a simple, readable greedy solver built around explicit domain classes instead of the original school-project array logic.
Key classes:
Main.java: CLI entry pointCsvJobReader.java: reads jobs from CSVGreedyScheduler.java: earliest-finish greedy assignmentMachineSchedule.java: per-machine schedule stateCsvScheduleWriter.java: writes assigned and unassigned CSV outputsSolverResult.java: final result payload
The code is intentionally plain Java so someone can clone the repo and follow the solver without needing a framework.
- clean greedy baseline
- CSV input/output
- verified sample run
- matching greedy baseline
- same input/output contract
- sample test added
- CP-SAT formulation
- maximize assigned jobs
- sample test added
- CP-SAT parity implementation
- same CSV input/output contract
- Maven-backed Java build
Completed:
- Refactored the original school concept into explicit domain objects.
- Replaced
input.txtwith CSV input. - Wrote schedule and unassigned outputs as CSV.
- Added Python and OR-Tools sample tests.
- Added a lightweight Java regression harness with no external test framework.
- Verified Java, Python, and OR-Tools runs on the same sample instance.
- Compare greedy vs CP-SAT behavior on richer benchmark inputs.
- Add fixed machine capabilities or weighted job variants.
- Repeat this same structure across additional scheduling families.