From ad4c023dba6d12f26b19dd11aa26b115deac1154 Mon Sep 17 00:00:00 2001 From: grufoony Date: Thu, 9 Apr 2026 16:54:11 +0200 Subject: [PATCH 1/2] Dump coilcode with network info --- src/dsf/mobility/FirstOrderDynamics.cpp | 13 ++++++++++--- webapp/script.js | 3 ++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/dsf/mobility/FirstOrderDynamics.cpp b/src/dsf/mobility/FirstOrderDynamics.cpp index 454c7964..85b2dd0a 100644 --- a/src/dsf/mobility/FirstOrderDynamics.cpp +++ b/src/dsf/mobility/FirstOrderDynamics.cpp @@ -1020,6 +1020,7 @@ namespace dsf::mobility { "maxspeed REAL NOT NULL, " "name TEXT, " "nlanes INTEGER NOT NULL, " + "coilcode TEXT, " "geometry TEXT NOT NULL)"); // Create nodes table this->database()->exec( @@ -1031,8 +1032,8 @@ namespace dsf::mobility { // Insert edges SQLite::Statement insertEdgeStmt(*this->database(), "INSERT INTO edges (id, source, target, length, " - "maxspeed, name, nlanes, geometry) " - "VALUES (?, ?, ?, ?, ?, ?, ?, ?);"); + "maxspeed, name, nlanes, coilcode, geometry) " + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?);"); for (const auto& [edgeId, pEdge] : this->graph().edges()) { insertEdgeStmt.bind(1, static_cast(edgeId)); insertEdgeStmt.bind(2, static_cast(pEdge->source())); @@ -1041,7 +1042,13 @@ namespace dsf::mobility { insertEdgeStmt.bind(5, pEdge->maxSpeed()); insertEdgeStmt.bind(6, pEdge->name()); insertEdgeStmt.bind(7, pEdge->nLanes()); - insertEdgeStmt.bind(8, std::format("{}", pEdge->geometry())); + auto const& counterName{pEdge->counterName()}; + if (counterName != "N/A") { + insertEdgeStmt.bind(8, counterName); + } else { + insertEdgeStmt.bind(8); + } + insertEdgeStmt.bind(9, std::format("{}", pEdge->geometry())); insertEdgeStmt.exec(); insertEdgeStmt.reset(); } diff --git a/webapp/script.js b/webapp/script.js index f2a75d36..ff7e01b9 100644 --- a/webapp/script.js +++ b/webapp/script.js @@ -903,7 +903,7 @@ function parseGeometry(geometryStr) { // Load edges from SQLite database function loadEdgesFromDB() { - const result = db.exec("SELECT id, source, target, length, maxspeed, name, nlanes, geometry FROM edges"); + const result = db.exec("SELECT id, source, target, length, maxspeed, name, nlanes, geometry, coilcode FROM edges"); if (result.length === 0) return []; const columns = result[0].columns; @@ -918,6 +918,7 @@ function loadEdgesFromDB() { edge.maxspeed = +edge.maxspeed || 0; edge.nlanes = +edge.nlanes || 1; edge.length = +edge.length || 0; + edge.coilcode = edge.coilcode || null; return edge; }); } From 2e4e4a980a0712d95dca84441a3f357590f81f70 Mon Sep 17 00:00:00 2001 From: grufoony Date: Thu, 9 Apr 2026 16:54:40 +0200 Subject: [PATCH 2/2] Version 5.3.3 --- CITATION.cff | 4 ++-- src/dsf/dsf.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index 93ed647b..a6cbeeea 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -12,5 +12,5 @@ authors: repository-code: 'https://github.com/physycom/DynamicalSystemFramework' url: 'https://physycom.github.io/DynamicalSystemFramework/' license: CC-BY-NC-SA-4.0 -version: 5.3.2 -date-released: '2026-04-08' +version: 5.3.3 +date-released: '2026-04-09' diff --git a/src/dsf/dsf.hpp b/src/dsf/dsf.hpp index 6c3f6c8d..65d0e9ad 100644 --- a/src/dsf/dsf.hpp +++ b/src/dsf/dsf.hpp @@ -9,7 +9,7 @@ static constexpr uint8_t DSF_VERSION_MAJOR = 5; static constexpr uint8_t DSF_VERSION_MINOR = 3; -static constexpr uint8_t DSF_VERSION_PATCH = 2; +static constexpr uint8_t DSF_VERSION_PATCH = 3; static auto const DSF_VERSION = std::format("{}.{}.{}", DSF_VERSION_MAJOR, DSF_VERSION_MINOR, DSF_VERSION_PATCH);