Conversation
| dynamics.setSpeedFluctuationSTD(0.1); | ||
|
|
||
| // Connect database for saving data | ||
| dynamics.connectDataBase(OUT_FOLDER + "simulation_data.db"); |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 18.4 rule Note
| dynamics.setDataUpdatePeriod(30); // Store data every 30 time steps | ||
|
|
||
| // Connect database for saving data | ||
| dynamics.connectDataBase(OUT_FOLDER + "simulation_data.db"); |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 18.4 rule Note
| #ifdef __APPLE__ | ||
| std::time_t const t = std::chrono::system_clock::to_time_t(now); | ||
| std::ostringstream oss; | ||
| oss << std::put_time(std::localtime(&t), "%Y%m%d%H%M%S"); |
Check notice
Code scanning / Cppcheck (reported by Codacy)
localtime is Y2038-unsafe Note
| std::filesystem::remove(testFile); | ||
| SQLite::Statement cols(db, | ||
| "SELECT street_id, density, avg_speed FROM road_data"); | ||
| while (cols.executeStep()) { |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 14.4 rule Note test
| std::ifstream file(entry.path()); | ||
| REQUIRE(file.is_open()); | ||
| // Evolve until agent reaches destination (with limit) | ||
| for (int iter = 0; iter < 1000 && dynamics.nAgents() > 0; ++iter) { |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.1 rule Note test
| break; | ||
| } | ||
| SQLite::Statement cols(db, "SELECT distance_m, travel_time_s FROM travel_data"); | ||
| while (cols.executeStep()) { |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 14.4 rule Note test
| SQLite::Statement cols(db, "SELECT distance_m, travel_time_s FROM travel_data"); | ||
| while (cols.executeStep()) { | ||
| auto distance = cols.getColumn(0).getDouble(); | ||
| auto time = cols.getColumn(1).getDouble(); |
Check notice
Code scanning / Cppcheck (reported by Codacy)
time is Y2038-unsafe Note test
| auto distance = cols.getColumn(0).getDouble(); | ||
| auto time = cols.getColumn(1).getDouble(); | ||
| CHECK(distance > 0.0); | ||
| CHECK(time > 0.0); |
Check notice
Code scanning / Cppcheck (reported by Codacy)
time is Y2038-unsafe Note test
|
|
||
| file.close(); | ||
| std::filesystem::remove(testFile); | ||
| for (int iter = 0; iter < 1000 && dynamics.nAgents() > 0; ++iter) { |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.1 rule Note test
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #403 +/- ##
==========================================
+ Coverage 85.81% 87.41% +1.59%
==========================================
Files 54 53 -1
Lines 6190 5936 -254
Branches 671 657 -14
==========================================
- Hits 5312 5189 -123
+ Misses 862 728 -134
- Partials 16 19 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| /// @brief Copy assignment operator for PointsCluster. | ||
| /// @param other The PointsCluster to copy from. | ||
| /// @return Reference to this PointsCluster. | ||
| PointsCluster& operator=(PointsCluster const& other) = default; |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 16.3 rule Note
| cluster_radius_km, | ||
| max_speed_kph, | ||
| min_duration_min](auto& pair) { | ||
| max_speed_kph](auto& pair) { |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 13.1 rule Note
There was a problem hiding this comment.
Cppcheck (reported by Codacy) found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
| } | ||
|
|
||
| /* Database modal styles */ | ||
| .modal { |
Check warning
Code scanning / Csslint (reported by Codacy)
Rule doesn't have all its properties in alphabetical order. Warning
| display: none; | ||
| } | ||
|
|
||
| .modal-content { |
Check warning
Code scanning / Csslint (reported by Codacy)
Rule doesn't have all its properties in alphabetical order. Warning
| text-align: center; | ||
| } | ||
|
|
||
| .modal-content h2 { |
Check warning
Code scanning / Csslint (reported by Codacy)
Rule doesn't have all its properties in alphabetical order. Warning
| margin-bottom: 20px; | ||
| } | ||
|
|
||
| .db-input-group input[type="file"] { |
Check warning
Code scanning / Csslint (reported by Codacy)
Rule doesn't have all its properties in alphabetical order. Warning
| border-color: #4CAF50; | ||
| } | ||
|
|
||
| .db-status { |
Check warning
Code scanning / Csslint (reported by Codacy)
Rule doesn't have all its properties in alphabetical order. Warning
| text-align: center; | ||
| } | ||
|
|
||
| .modal-content h2 { |
Check notice
Code scanning / Csslint (reported by Codacy)
Heading (h2) should not be qualified. Note
| border: 2px dashed #ccc; | ||
| border-radius: 5px; | ||
| width: 100%; | ||
| box-sizing: border-box; |
Check notice
Code scanning / Csslint (reported by Codacy)
The box-sizing property isn't supported in IE6 and IE7. Note
| min-height: 20px; | ||
| } | ||
|
|
||
| .db-status.error { |
Check notice
Code scanning / Csslint (reported by Codacy)
Adjoining classes: .db-status.error Note
| color: #c62828; | ||
| } | ||
|
|
||
| .db-status.success { |
Check notice
Code scanning / Csslint (reported by Codacy)
Adjoining classes: .db-status.success Note
| color: #2e7d32; | ||
| } | ||
|
|
||
| .db-status.loading { |
Check notice
Code scanning / Csslint (reported by Codacy)
Adjoining classes: .db-status.loading Note
There was a problem hiding this comment.
Stylelint (reported by Codacy) found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
TODO: