Views
No views yet
| Port | Name | Shape | Type |
|---|---|---|---|
| Input | locs | [batch, nodes, 3] | float32 |
| Input | demand | [batch, nodes, 1] | float32 |
| Input | capacity | [batch, 1] | float32 |
| Output | actions | [batch, max_steps] | int64 |
| Output | log_p | [batch, max_steps] | float32 |
(0.5, 0.5, 0.0) with zero demand. Set capacity high (e.g. 999) for unconstrained TSP optimization, or use the trained value (40) for standard CVRP-50 benchmark routing.| Parameter | Value |
|---|---|
| Problem size | 50 customers |
| Batch size | 512–1024 |
| Epochs | 500–1000 |
| Learning rate | 1e-4 (cosine annealing) |
| Warmup | 10 epochs |
| Demand range | {1..9} |
| Vehicle capacity | 40 |
| Entropy bonus | 0.01 |
1import numpy as np
2import onnxruntime as ort
3
4session = ort.InferenceSession("cvrp50_model.onnx")
5
6locs = np.random.rand(1, 10, 3).astype(np.float32)
7demand = np.ones((1, 10, 1), dtype=np.float32)
8capacity = np.array([[999.0]], dtype=np.float32)
9
10actions, log_p = session.run(None, {
11 "locs": locs,
12 "demand": demand,
13 "capacity": capacity,
14})
15
16print(actions[0, :20])