How irb-lab/py-ga-vrptw works
py-ga-VRPTW solves vehicle-routing-with-time-windows instances using a genetic algorithm. A user runs a sample entry point, which configures costs and GA parameters and calls the solver; the solver loads an instance, evolves customer-order chromosomes, decodes and scores routes, then prints the best route and optionally exports generation metrics. The repository also supports Solomon benchmark data and custom text-to-JSON conversion. The graph follows documented capabilities and shown calls; unsampled solver details are represented only where the excerpts or README support them.
Main entry points: core.py GA orchestration · utils.py Text converter · text2json.py Standard conversion · text2json_customize.py Custom conversion
Components 18
Problem data
- Solomon instances
data/json - Text instances
data/text - Custom instance
data/text_customize
Instance conversion
- Instance utilities
gavrptw/utils.py - Text converter
gavrptw/utils.py - Standard conversion
text2json.py - Custom conversion
text2json_customize.py
Genetic solver
- Sample runs
sample_C204.py - Custom sample
sample_customized_data.py - GA orchestration
gavrptw/core.py - Route decoding
gavrptw/core.py - Route evaluation
gavrptw/core.py - Roulette selection
gavrptw/core.py - PMX crossover
gavrptw/core.py - Inverse mutation
gavrptw/core.py
Results
- Best route output
gavrptw/core.py - Generation CSV
results
Other components
- User
Connections 21
- User → Sample runs: runs
README.md - User → Custom sample: runs
README.md - Sample runs → GA orchestration: calls
sample_C204.py - Custom sample → GA orchestration: calls
sample_customized_data.py - GA orchestration → Solomon instances: loads instance
README.md - GA orchestration → Custom instance: selects custom data
- GA orchestration → Instance utilities: loads instance
gavrptw/core.py - GA orchestration → Route evaluation: evaluates population
gavrptw/core.py - Route evaluation → Route decoding: decodes chromosome
gavrptw/core.py - GA orchestration → Roulette selection: selects offspring
gavrptw/core.py - GA orchestration → PMX crossover: mates offspring
gavrptw/core.py - GA orchestration → Inverse mutation: mutates offspring
gavrptw/core.py - GA orchestration → Best route output: prints best route
gavrptw/core.py - GA orchestration → Generation CSV: writes metrics
gavrptw/core.py - User → Standard conversion: converts data
README.md - User → Custom conversion: converts data
README.md - Standard conversion → Text converter: calls
text2json.py - Custom conversion → Text converter: calls
text2json_customize.py - Text converter → Text instances: reads
gavrptw/utils.py - Text converter → Custom instance: reads
gavrptw/utils.py - Text converter → Solomon instances: writes JSON
gavrptw/utils.py