diff --git a/data/solutions/Sol_MPVRP_S_002_s10_d2_p3.dat b/data/solutions/Sol_MPVRP_S_002_s10_d2_p3.dat new file mode 100644 index 0000000..da1f2f5 --- /dev/null +++ b/data/solutions/Sol_MPVRP_S_002_s10_d2_p3.dat @@ -0,0 +1,18 @@ +2: 1 - 2 [2184] - 7 (1280) - 2 [760] - 4 (657) - 3 (1007) - 1 [2183] - 4 (1527) - 1 [1017] - 8 (1673) - 1 [1107] - 10 (1107) - 1 [2184] - 8 (2184) - 2 [658] - 4 (657) - 6 (1) - 2 [2184] - 6 (2184) - 1 [2100] - 6 (2100) - 1 +2: 2(0.0) - 2(0.0) - 2(0.0) - 2(0.0) - 2(0.0) - 2(0.0) - 2(0.0) - 2(0.0) - 2(0.0) - 2(0.0) - 2(0.0) - 2(0.0) - 2(0.0) - 2(0.0) - 2(0.0) - 2(0.0) - 2(0.0) - 2(0.0) - 2(0.0) - 2(0.0) - 2(0.0) - 0(40.0) + +3: 1 - 2 [3] - 6 (3) - 1 [1] - 1 (1) - 2 [2402] - 1 (417) - 1 [1042] - 5 (1) - 1 [602] - 5 (3628) - 1 +3: 0(0.0) - 0(0.0) - 0(0.0) - 0(0.0) - 0(0.0) - 0(0.0) - 0(0.0) - 0(0.0) - 0(0.0) - 0(0.0) - 0(0.0) - 0(0.0) + +4: 1 - 1 [1] - 1 (1) - 2 [4144] - 1 (1) - 8 (588) - 1 [1] - 9 (2421) - 1 [1] - 10 (1135) - 1 (1) - 1 [4144] - 10 (2060) - 1 [1021] - 6 (3105) - 1 [4144] - 1 (4144) - 1 +4: 0(0.0) - 0(0.0) - 0(0.0) - 0(0.0) - 0(0.0) - 0(0.0) - 0(0.0) - 0(0.0) - 0(0.0) - 0(0.0) - 0(0.0) - 0(0.0) - 0(0.0) - 0(0.0) - 0(0.0) - 0(0.0) - 0(0.0) - 0(0.0) + +5: 1 - 2 [2505] - 10 (1825) - 7 (680) - 2 [2504] - 9 (2504) - 2 [2326] - 3 (2326) - 1 [2505] - 3 (2505) - 1 [2505] - 2 (2505) - 2 [2505] - 10 (2505) - 1 [2505] - 7 (1529) - 2 (976) - 1 [2505] - 7 (2505) - 1 [2007] - 9 (1852) - 7 (155) - 1 +5: 1(0.0) - 1(0.0) - 1(0.0) - 1(0.0) - 1(0.0) - 1(0.0) - 1(0.0) - 1(0.0) - 1(0.0) - 1(0.0) - 1(0.0) - 1(0.0) - 1(0.0) - 1(0.0) - 1(0.0) - 1(0.0) - 1(0.0) - 1(0.0) - 1(0.0) - 1(0.0) - 1(0.0) - 1(0.0) - 0(49.1) + +4 +2 +89.10 +3567.09 +Intel® Core™ i7-10850H × 12 +57.73 diff --git a/pages/static/js/visualisation.js b/pages/static/js/visualisation.js index 1e9e846..cefda5b 100644 --- a/pages/static/js/visualisation.js +++ b/pages/static/js/visualisation.js @@ -444,6 +444,12 @@ function mapNodeNumber(nodeStr, numGarages, numDepots, numStations) { } } +function setTextContentById(id, value) { + const el = document.getElementById(id); + if (!el) return; + el.textContent = value; +} + function updateFileStatus(type, filename) { const statusEl = document.getElementById(type + 'Status'); const zoneEl = document.getElementById(type + 'Zone'); @@ -533,14 +539,14 @@ function initData() { // Update Stats const metrics = solution.metrics || {}; - document.getElementById('stat-dist').textContent = (metrics.total_cost || solution.objective || 0).toFixed(2); - document.getElementById('stat-routing').textContent = (metrics.routing_cost || 0).toFixed(2); - document.getElementById('stat-exchanges').textContent = `0/${totalExchanges}`; - document.getElementById('stat-trucks').textContent = metrics.vehicles_used || trucks.length; + setTextContentById('stat-dist', (metrics.total_cost || solution.objective || 0).toFixed(2)); + setTextContentById('stat-routing', (metrics.routing_cost || 0).toFixed(2)); + // setTextContentById('stat-exchanges', `0/${totalExchanges}`); + setTextContentById('stat-trucks', metrics.vehicles_used || trucks.length); let totalSegs = trucks.reduce((sum, t) => sum + t.segments.length, 0); - document.getElementById('stat-segments').textContent = totalSegs; - document.getElementById('stat-status').textContent = solution.status || 'Loaded'; + setTextContentById('stat-segments', totalSegs); + setTextContentById('stat-status', solution.status || 'Loaded'); // Update Fleet Legend const legendEl = document.getElementById('fleet-legend'); @@ -1011,7 +1017,7 @@ function updateUI() { calculateCurrentExchangesAndDeliveries(); // Update exchanges display - document.getElementById('stat-exchanges').textContent = `${currentExchanges}/${totalExchanges}`; + // document.getElementById('stat-exchanges').textContent = `${currentExchanges}/${totalExchanges}`; // Update depot inventory panel updateDepotInventoryPanel(); diff --git a/pages/visualisation.html b/pages/visualisation.html index 104749a..78360b5 100644 --- a/pages/visualisation.html +++ b/pages/visualisation.html @@ -53,9 +53,13 @@