GetTimeSteps():

Use condition pop_time_step_config == (int)ATBTimeStepConfig::TimeStepConfig::RECOMPUTE_SOME
(set in tariff-file) to decide the alogorithm to compute time-steps.
This commit is contained in:
Gerhard Hoffmann 2024-08-15 21:37:23 +02:00
parent 192a37d93f
commit a6007ee89a

View File

@ -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;