Skip to content

Commit

Permalink
corrected CSVParser bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Paolo Fittipaldi committed Feb 29, 2024
1 parent 714da83 commit c2570a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions quisp/channels/CSVParser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ double CSVParser::getPropertyAtTime(const double time) {
last_polled_time = time;
auto u_b = property.upper_bound(time);
if (u_b == property.end()) {
last_polled_value = --(u_b)->second;
last_polled_value = (--u_b)->second;
} else if (u_b == property.begin()) {
last_polled_value = u_b->second;
} else {
auto l_b = u_b;
--u_b;
--l_b;
const double delta = (time - l_b->first) / (u_b->first - l_b->first);
last_polled_value = delta * u_b->second + (1 - delta) * l_b->second;
}
Expand Down
4 changes: 2 additions & 2 deletions quisp/simulations/simulation_test.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[General]
seed-set = 1

sim-time-limit = 5d
sim-time-limit = 1d
**.initial_notification_timing_buffer = 5s # when to start the BSA timing notification.
**.app.request_generation_interval = 2s
**.logger.enabled_log = false
Expand Down Expand Up @@ -85,7 +85,7 @@ network = networks.Simple_MSM

[Config NoErrorMM_SAT]
network = networks.Simple_MM_SAT
**.qrsa.hm.link_tomography = false
**.qrsa.hm.link_tomography = true
**.Aatm_CSV = "../satellite_csvs/Micius-Nice_tatm_1550.csv"
**.distance_CSV = "../satellite_csvs/Micius-Nice_distance.csv"
**.buffers = 100
Expand Down

0 comments on commit c2570a2

Please sign in to comment.