From a6007ee89ab4c2ba48a0ea9559f6478b9e52ad6d Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Thu, 15 Aug 2024 21:37:23 +0200 Subject: [PATCH] GetTimeSteps(): Use condition pop_time_step_config == (int)ATBTimeStepConfig::TimeStepConfig::RECOMPUTE_SOME (set in tariff-file) to decide the alogorithm to compute time-steps. --- library/src/calculator_functions.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/src/calculator_functions.cpp b/library/src/calculator_functions.cpp index afe43fa..12fa03a 100644 --- a/library/src/calculator_functions.cpp +++ b/library/src/calculator_functions.cpp @@ -159,7 +159,8 @@ std::string Calculator::GetDurationFromCost(Configuration* cfg, return CalcState::BELOW_MIN_PARKING_PRICE.toStdString(); } - if (prepaid == false) { + int const pop_time_step_config = cfg->getPaymentOptions(paymentOptionIndex).pop_time_step_config; + if (pop_time_step_config == (int)ATBTimeStepConfig::TimeStepConfig::RECOMPUTE_SOME || prepaid == false) { int const pop_id = cfg->getPaymentOptions(paymentOptionIndex).pop_id; int const pop_accumulate_prices = cfg->getPaymentOptions(paymentOptionIndex).pop_accumulate_prices; int const pop_accumulate_durations = cfg->getPaymentOptions(paymentOptionIndex).pop_accumulate_durations;