Optimizes vehicle scheduling (excavators, dirt trucks, material trucks, cranes) on a construction site grid using a genetic algorithm. Tightly integrated with deVision for scene definition and result visualization.
/home/sisa/Studium/Praktikum/deVision (branch: simOpt) — provides scene geometry and visualizes results.
sim/scenefile.go—LoadGridFromScene(): builds Grid fromsimopt-scene-v1JSON (replaces heightmap PNG)sim/roadnetwork.go—RoadGraph,LoadRoadNetwork(),RouteViaRoad()(A→road→A)sim/grid.go—Grid,AStarForVehicle()sim/vehicle.go—BaseVehicle,PathfindToViaRoad(),RetryPathfindViaRoad()sim/simulation.go—Simulation,NewSimulation(g, work, rg)cmd/worker/main.go— worker binary entry pointga_results/best_schedule.json— real GA result (gen 85, fitness 4218s, 20 vehicles)
./worker --simopt-scene <path> # replaces --heightmap; required if no --heightmap
--heightmap <path> # legacy PNG heightmap
--road-network <path> # optional; enables road-following routing
--fast # headless mode, no renderer
Written by deVision ExportSimOptScene pipeline. Contains:
- Grid dimensions, origin, metersPerCell
passable[],excavate[],pipePlacement[]flat bool arrays (row-major)spawnCol,spawnRow
Written by deVision ExportRoadNetwork pipeline. Contains:
transform:{originX, originZ, metersPerCell}— maps deVision world coords to grid cellspaths[]: spline point arrays from deVision drive paths
{
"generation": 85,
"fitness_seconds": 4218.46,
"num_excavators": 8, "num_dirt_trucks": 8,
"material_truck_count": 3, "crane_count": 1,
"schedule": { "<timeSeconds>": ["vehicle_type", ...] }
}- Per-vehicle path/waypoint export so deVision can animate vehicle movement
- SimOpt scenario bundle (scene + road network + schedule in one file)