tests for schnals/muehlbach

This commit is contained in:
Gerhard Hoffmann 2024-08-19 12:10:43 +02:00
parent d86a688836
commit 675ba60733

View File

@ -741,9 +741,14 @@ int main() {
input.open("/opt/ptu5/opt/customer_502/etc/psa_tariff/tariff02.json");
}
if (zone == 3) {
input.open("/opt/ptu5/opt/customer_502/etc/psa_tariff/tariff03.json");
//input.open("/opt/ptu5/opt/customer_502/etc/psa_tariff/tariff03.json");
//input.open("/home/linux/customer_502/etc/psa_tariff/tariff01.json");
input.open("/home/linux/customer_502/etc/psa_tariff/tariff03.json");
// schnals
// input.open("/opt/ptu5/opt/customer_505/etc/psa_tariff/tariff01.json");
// muehlbach
input.open("/opt/ptu5/opt/customer_504/etc/psa_tariff/tariff01.json");
}
std::stringstream sstr;
@ -917,7 +922,7 @@ int main() {
QDateTime end;
QDateTime s(QDateTime::currentDateTime());
s.setTime(QTime(13, 30, 0));
s.setTime(QTime(10, 0, 0));
#if 0
@ -947,12 +952,12 @@ int main() {
#if 1
qCritical() << "start" << s.toString(Qt::ISODate);
//for (int i = 1; i < 11; ++i) {
for (int i = 1; i < 8; ++i) {
for (int i = 0; i < 21; ++i) {
calcState = compute_duration_for_parking_ticket(&cfg, s,
(double)i*200,
(double)i*10,
end, PermitType(PERMIT_TYPE::SHORT_TERM_PARKING_PKW));
qCritical() << "RUN" << i << ": start" << s.toString(Qt::ISODate)
<< ": price" << i*200 << "->" << end.toString(Qt::ISODate) << calcState.toString();
<< ": price" << i*10 << "->" << end.toString(Qt::ISODate) << calcState.toString();
}
#else
struct price_t price;