Entwurf und Entwicklung eines KI-gestützten Verfahrens zur Auswahl einer (Meta-)Heuristik für das Tourist-Tour-Design-Problem
Dieses Projekt widmet sich der Entwicklung und Erforschung von Machine-Learning-Methoden zur intelligenten Auswahl einer passenden (Meta-)Heuristik für konkrete Probleminstanzen. Ausgangspunkt ist dabei die Modellierung der Instanz als Graph, was die Grundlage für die Entscheidungsfindung der Lernverfahren bildet. Ziel ist es, ein automatisiertes Modell zu trainieren, das auf Basis der strukturellen Eigenschaften des Eingabegraphen erkennt, welche Heuristik am besten für die jeweilige Problemstellung geeignet ist.
Dieser Abschnitt beschreibt, wie die einzelnen Skripte zusammenhängen und wie du die Ergebnisse der Arbeit Schritt für Schritt reproduzieren kannst.
Wichtig:
In vielen Skripten sind absolute Windows-Pfade hart kodiert.
Pipeline:
- Instanzen erzeugen oder bereitstellen
- Heuristiken auf allen Instanzen laufen lassen
- Graph-Features für alle Instanzen extrahieren
- Features in Wide-Format + Feature-Subset bringen
- Heuristik-Ergebnisse + Features mergen
- Random-Forest-Modelle trainieren
- Auswertung & Plots
- Vorhersage für neue Instanzen
Die wichtigsten Dateien dabei:
- Instanz-Generatoren:
gen_ttdp_instances.ps1 - TTDP-Solver & Heuristiken:
core.py,Greedy_Solver.py,Ils_Solver.py,Grasp_Solver.py,Vns_Solver.py,ttdp_solver.py - Batch-Runs:
parallel_heuristic_runner.py - Feature-Pipeline:
properties_extractor.py,batch_PropertiesExtractor.py,
concat_parquetParts.py,transposeFeatureTable.py,trimTrainFeatureVector.py - ML-Pipeline:
aggResults_mergeTrainData.py,learn_model.py,predictOnInstance.py - Auswertung:
expPlots.py,secondary_plots.py,featurePermutation.py - Visualisierung von Touren:
plotGraph.py
Skript: gen_ttdp_instances.ps1
Erzeugt zufällige TTDP-Instanzen im verwendeten Textformat:
n <anzahl_knoten>
m 1
tmax <budget>
x y score # eine Zeile pro Knoten (erster Knoten = Depot)
gen_ttdp_instance_auto.pyparallel_heuristic_runner.py->result_all.csvbatch_PropertiesExtractor.py→features-part-*.parquetconcat_parquetParts.py→features_all.parquettransposeFeatureTable.py→features_all_wide.csvtrimTrainFeatureVector.py→features_all_wide_trim.csvaggResults_mergeTrainData.py→train_data.csvlearn_model.py→ Modelle (*.joblib) +model_test_results.csvexpPlots.py(und optionalsecondary_plots.py,featurePermutation.py)predictOnInstance.pyfür neue Instanzen
Design and Development of an AI-Supported Method for Selecting a (Meta-)Heuristic for the Tourist Tour Design Problem
This project is dedicated to the development and investigation of machine-learning methods for the intelligent selection of a suitable (meta-)heuristic for specific problem instances. The starting point is the modeling of each instance as a graph, which forms the basis for the decision-making of the learning methods. The goal is to train an automated model that, based on the structural properties of the input graph, identifies which heuristic is best suited for the respective problem.
This section describes how the individual scripts are connected and how you can reproduce the results of the thesis step by step.
Important:
In many scripts, absolute Windows paths are hard-coded.
Pipeline:
- Generate or provide instances
- Run heuristics on all instances
- Extract graph features for all instances
- Convert features into wide format + feature subset
- Merge heuristic results + features
- Train random forest models
- Evaluation & plots
- Prediction for new instances
The most important files involved are:
- Instance generators:
gen_ttdp_instances.ps1 - TTDP solver & heuristics:
core.py,Greedy_Solver.py,Ils_Solver.py,Grasp_Solver.py,Vns_Solver.py,ttdp_solver.py - Batch runs:
parallel_heuristic_runner.py - Feature pipeline:
properties_extractor.py,batch_PropertiesExtractor.py,
concat_parquetParts.py,transposeFeatureTable.py,trimTrainFeatureVector.py - ML pipeline:
aggResults_mergeTrainData.py,learn_model.py,predictOnInstance.py - Evaluation:
expPlots.py,secondary_plots.py,featurePermutation.py - Tour visualization:
plotGraph.py
Script: gen_ttdp_instances.ps1
Generates random TTDP instances in the text format used:
n <number_of_nodes>
m 1
tmax <budget>
x y score # one line per node (first node = depot)
Concrete File Pipeline
gen_ttdp_instance_auto.pyparallel_heuristic_runner.py->result_all.csvbatch_PropertiesExtractor.py→features-part-*.parquetconcat_parquetParts.py→features_all.parquettransposeFeatureTable.py→features_all_wide.csvtrimTrainFeatureVector.py→features_all_wide_trim.csvaggResults_mergeTrainData.py→train_data.csvlearn_model.py→ models (*.joblib) +model_test_results.csvexpPlots.py(and optionallysecondary_plots.py,featurePermutation.py)predictOnInstance.pyfor new Instances