Minor: change debug output
This commit is contained in:
parent
37620a06c1
commit
ca3c3921d4
@ -892,7 +892,7 @@ uint32_t Calculator::GetCostFromDuration(Configuration *cfg,
|
|||||||
int paymentOptionIndex) const {
|
int paymentOptionIndex) const {
|
||||||
// for instance, a tariff as used in Schoenau, Koenigssee: only steps, no
|
// for instance, a tariff as used in Schoenau, Koenigssee: only steps, no
|
||||||
// special days, nonstop.
|
// special days, nonstop.
|
||||||
qCritical() << __func__ << __LINE__;
|
//qCritical() << __func__ << __LINE__ << "paymentOptionIndex" << paymentOptionIndex;
|
||||||
|
|
||||||
static const PaymentMethod paymentMethodId = Utilities::getPaymentMethodId(cfg);
|
static const PaymentMethod paymentMethodId = Utilities::getPaymentMethodId(cfg);
|
||||||
if (paymentMethodId == PaymentMethod::Steps ||
|
if (paymentMethodId == PaymentMethod::Steps ||
|
||||||
@ -909,7 +909,7 @@ uint32_t Calculator::GetCostFromDuration(Configuration * cfg,
|
|||||||
int paymentOptionIndex) const {
|
int paymentOptionIndex) const {
|
||||||
static const PaymentMethod paymentMethodId = Utilities::getPaymentMethodId(cfg);
|
static const PaymentMethod paymentMethodId = Utilities::getPaymentMethodId(cfg);
|
||||||
|
|
||||||
qCritical() << __func__ << __LINE__;
|
//qCritical() << __func__ << __LINE__ << "paymentOptionIndex" << paymentOptionIndex;
|
||||||
|
|
||||||
if (paymentMethodId == PaymentMethod::Steps ||
|
if (paymentMethodId == PaymentMethod::Steps ||
|
||||||
paymentMethodId == PaymentMethod::Degressive) {
|
paymentMethodId == PaymentMethod::Degressive) {
|
||||||
@ -927,8 +927,8 @@ CalcState Calculator::isParkingAllowedForWeekDay(Configuration const *cfg,
|
|||||||
int netto_parking_time,
|
int netto_parking_time,
|
||||||
int paymentOptionIndex) {
|
int paymentOptionIndex) {
|
||||||
|
|
||||||
qCritical() << DBG_HEADER << "start" << start.toString(Qt::ISODate)
|
//qCritical() << DBG_HEADER << "start" << start.toString(Qt::ISODate)
|
||||||
<< "paymentOptionIndex" << paymentOptionIndex;
|
// << "paymentOptionIndex" << paymentOptionIndex;
|
||||||
|
|
||||||
// TODO: wieder entfernen
|
// TODO: wieder entfernen
|
||||||
return CalcState(CalcState::State::SUCCESS, "PARKING_ALLOWED", QTime(), QTime());
|
return CalcState(CalcState::State::SUCCESS, "PARKING_ALLOWED", QTime(), QTime());
|
||||||
@ -2249,7 +2249,8 @@ QList<int> &Calculator::GetTimeSteps(Configuration *cfg, int paymentOptionIndex,
|
|||||||
// for instance: until 13.59: price 8, from 14:00: price 5, then for the next day: 8
|
// for instance: until 13.59: price 8, from 14:00: price 5, then for the next day: 8
|
||||||
// for the following days: 8 euros
|
// for the following days: 8 euros
|
||||||
|
|
||||||
qCritical() << "(" << __func__ << ":" << __LINE__ << ") degressive";
|
qCritical() << "(" << __func__ << ":" << __LINE__ << ") degressive:";
|
||||||
|
qCritical() << "(" << __func__ << ":" << __LINE__ << ") paymentOptionIndex:" << paymentOptionIndex;
|
||||||
m_timeSteps[paymentOptionIndex].clear();
|
m_timeSteps[paymentOptionIndex].clear();
|
||||||
|
|
||||||
// lookup pop_next_id in worktimes;
|
// lookup pop_next_id in worktimes;
|
||||||
@ -2448,10 +2449,10 @@ QList<int> &Calculator::GetTimeSteps(Configuration *cfg, int paymentOptionIndex,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else { // if (carryOverTimeRangeFrom == QTime(0, 0, 0)) {
|
} else { // if (carryOverTimeRangeFrom == QTime(0, 0, 0)) {
|
||||||
if (DBG_LEVEL >= DBG_DEBUG) {
|
//if (DBG_LEVEL >= DBG_DEBUG) {
|
||||||
qCritical() << "(" << __func__ << ":" << __LINE__ << ") carry over time range from:" << carryOverTimeRangeFrom.toString(Qt::ISODate);
|
qCritical() << "(" << __func__ << ":" << __LINE__ << ") carry over time range from:" << carryOverTimeRangeFrom.toString(Qt::ISODate);
|
||||||
qCritical() << "(" << __func__ << ":" << __LINE__ << ") carry over time range to:" << carryOverTimeRangeTo.toString(Qt::ISODate);
|
qCritical() << "(" << __func__ << ":" << __LINE__ << ") carry over time range to:" << carryOverTimeRangeTo.toString(Qt::ISODate);
|
||||||
}
|
//}
|
||||||
|
|
||||||
m_timeSteps[paymentOptionIndex].clear();
|
m_timeSteps[paymentOptionIndex].clear();
|
||||||
|
|
||||||
@ -2459,9 +2460,9 @@ QList<int> &Calculator::GetTimeSteps(Configuration *cfg, int paymentOptionIndex,
|
|||||||
// TODO: zusaetzlicher faktor falls vorkauf-option zieht
|
// TODO: zusaetzlicher faktor falls vorkauf-option zieht
|
||||||
if (prepaidStart) {
|
if (prepaidStart) {
|
||||||
start = prepaidStart.value();
|
start = prepaidStart.value();
|
||||||
//if (DBG_LEVEL >= DBG_DEBUG) {
|
if (DBG_LEVEL >= DBG_DEBUG) {
|
||||||
qCritical() << "(" << __func__ << ":" << __LINE__ << ") prepaid adapted start:" << start.toString(Qt::ISODate);
|
qCritical() << "(" << __func__ << ":" << __LINE__ << ") prepaid adapted start:" << start.toString(Qt::ISODate);
|
||||||
//}
|
}
|
||||||
} else {
|
} else {
|
||||||
qCritical() << "(" << __func__ << ":" << __LINE__ << ") TODO";
|
qCritical() << "(" << __func__ << ":" << __LINE__ << ") TODO";
|
||||||
}
|
}
|
||||||
@ -2482,7 +2483,7 @@ QList<int> &Calculator::GetTimeSteps(Configuration *cfg, int paymentOptionIndex,
|
|||||||
QDateTime nextTimeStep = start;
|
QDateTime nextTimeStep = start;
|
||||||
int runtimeInMinutes = 0;
|
int runtimeInMinutes = 0;
|
||||||
|
|
||||||
qCritical() << "(" << __func__ << ":" << __LINE__ << ") runtime in minutes (1):" << runtimeInMinutes;
|
// qCritical() << "(" << __func__ << ":" << __LINE__ << ") runtime in minutes (1):" << runtimeInMinutes;
|
||||||
|
|
||||||
int const pop_truncate_last_interpolation_step = cfg->getPaymentOptions(paymentOptionIndex).pop_truncate_last_interpolation_step;
|
int const pop_truncate_last_interpolation_step = cfg->getPaymentOptions(paymentOptionIndex).pop_truncate_last_interpolation_step;
|
||||||
|
|
||||||
@ -2601,10 +2602,10 @@ QList<int> &Calculator::GetTimeSteps(Configuration *cfg, int paymentOptionIndex,
|
|||||||
if (runtimeInMinutes == 0) {
|
if (runtimeInMinutes == 0) {
|
||||||
if (start.time() < carryOverStart) {
|
if (start.time() < carryOverStart) {
|
||||||
runtimeInMinutes = start.time().secsTo(carryOverStart) / 60;
|
runtimeInMinutes = start.time().secsTo(carryOverStart) / 60;
|
||||||
//qCritical() << "(" << __func__ << ":" << __LINE__ << ") start:" << start.toString(Qt::ISODate);
|
qCritical() << "(" << __func__ << ":" << __LINE__ << ") start:" << start.toString(Qt::ISODate);
|
||||||
//qCritical() << "(" << __func__ << ":" << __LINE__ << ") carryOverStart:" << carryOverStart.toString(Qt::ISODate);
|
qCritical() << "(" << __func__ << ":" << __LINE__ << ") carryOverStart:" << carryOverStart.toString(Qt::ISODate);
|
||||||
//qCritical() << "(" << __func__ << ":" << __LINE__ << ") runtime in minutes:" << runtimeInMinutes;
|
qCritical() << "(" << __func__ << ":" << __LINE__ << ") runtime in minutes:" << runtimeInMinutes;
|
||||||
//qCritical() << "(" << __func__ << ":" << __LINE__ << ") pun_id:" << duration.pun_id;
|
qCritical() << "(" << __func__ << ":" << __LINE__ << ") pun_id:" << duration.pun_id;
|
||||||
duration.pun_duration = runtimeInMinutes;
|
duration.pun_duration = runtimeInMinutes;
|
||||||
m_timeSteps[paymentOptionIndex] << duration.pun_duration;
|
m_timeSteps[paymentOptionIndex] << duration.pun_duration;
|
||||||
search->second = duration;
|
search->second = duration;
|
||||||
@ -2734,6 +2735,7 @@ uint32_t Calculator::GetPriceForTimeStep(Configuration *cfg, int timeStep, int p
|
|||||||
|
|
||||||
uint32_t price = 0;
|
uint32_t price = 0;
|
||||||
|
|
||||||
|
//qCritical() << "(" << __func__ << ":" << __LINE__ << ") paymentOptionIndex" << paymentOptionIndex;
|
||||||
//qCritical() << "(" << __func__ << ":" << __LINE__ << ") timeStep" << timeStep;
|
//qCritical() << "(" << __func__ << ":" << __LINE__ << ") timeStep" << timeStep;
|
||||||
//qCritical() << "(" << __func__ << ":" << __LINE__ << ") pop_id" << pop_id;
|
//qCritical() << "(" << __func__ << ":" << __LINE__ << ") pop_id" << pop_id;
|
||||||
|
|
||||||
@ -2747,11 +2749,6 @@ uint32_t Calculator::GetPriceForTimeStep(Configuration *cfg, int timeStep, int p
|
|||||||
//qCritical() << "(" << __func__ << ":" << __LINE__ << ") pun_id" << pun_id;
|
//qCritical() << "(" << __func__ << ":" << __LINE__ << ") pun_id" << pun_id;
|
||||||
//qCritical() << "(" << __func__ << ":" << __LINE__ << ") pun_unit_id" << payment_unit_id;
|
//qCritical() << "(" << __func__ << ":" << __LINE__ << ") pun_unit_id" << payment_unit_id;
|
||||||
|
|
||||||
|
|
||||||
//qCritical() << "(" << __func__ << ":" << __LINE__ << ")" << cfg->Duration.find(1)->second.pun_duration;
|
|
||||||
//qCritical() << "(" << __func__ << ":" << __LINE__ << ")" << cfg->Duration.find(2)->second.pun_duration;
|
|
||||||
//qCritical() << "(" << __func__ << ":" << __LINE__ << ")" << cfg->Duration.find(3)->second.pun_duration;
|
|
||||||
|
|
||||||
int const pun_duration = cfg->Duration.find(payment_unit_id)->second.pun_duration;
|
int const pun_duration = cfg->Duration.find(payment_unit_id)->second.pun_duration;
|
||||||
//int const pun_duration = cfg->Duration.find(2)->second.pun_duration;
|
//int const pun_duration = cfg->Duration.find(2)->second.pun_duration;
|
||||||
if (pop_accumulate_prices) {
|
if (pop_accumulate_prices) {
|
||||||
|
Loading…
Reference in New Issue
Block a user