Minor: additional loop for test of NAZ

This commit is contained in:
Gerhard Hoffmann 2024-04-24 12:01:24 +02:00
parent d8ec41ebfc
commit 9d72574106

View File

@ -38,9 +38,9 @@ extern "C" char* strptime(const char* s,
#define SCHOENAU_KOENIGSEE (0) #define SCHOENAU_KOENIGSEE (0)
#define NEUHAUSER_KORNEUBURG (0) #define NEUHAUSER_KORNEUBURG (0)
#define NEUHAUSER_LINSINGER_MASCHINENBAU (0) #define NEUHAUSER_LINSINGER_MASCHINENBAU (0)
#define NEUHAUSER_NORDISCHES_AUSBILDUNGSZENTRUM (0) #define NEUHAUSER_NORDISCHES_AUSBILDUNGSZENTRUM (1)
#define NEUHAUSER_BILEXA_GALTUER (0) #define NEUHAUSER_BILEXA_GALTUER (0)
#define NEUHAUSER_KIRCHDORF (1) #define NEUHAUSER_KIRCHDORF (0)
#define BAD_NEUENAHR_AHRWEILER (0) #define BAD_NEUENAHR_AHRWEILER (0)
#define NEUHAUSER_CHRISTOPH_REISEN (0) #define NEUHAUSER_CHRISTOPH_REISEN (0)
#define NEUHAUSER_PERNEGG_AN_DER_MUR (0) #define NEUHAUSER_PERNEGG_AN_DER_MUR (0)
@ -1050,20 +1050,23 @@ int main() {
QDateTime s(QDate(2023, 11, 30), QTime()); QDateTime s(QDate(2023, 11, 30), QTime());
QDateTime end; QDateTime end;
struct price_t price; struct price_t price;
#define ADULT 1
//#define TEEN 1
for (int offset = 480; offset < 1200; ++offset) { for (int offset = 480; offset < 1200; ++offset) {
QDateTime start = s.addSecs(offset * 60); QDateTime start = s.addSecs(offset * 60);
CalcState cs = compute_price_for_daily_ticket(&cfg, start, end, CalcState cs = compute_price_for_daily_ticket(&cfg, start, end,
#if ADULT==1
PERMIT_TYPE::DAY_TICKET_ADULT, PERMIT_TYPE::DAY_TICKET_ADULT,
#elif TEEN==1
PERMIT_TYPE::DAY_TICKET_TEEN,
#endif
&price); &price);
qCritical() << "start=" << start.toString(Qt::ISODate) qCritical() << "start=" << start.toString(Qt::ISODate)
<< "end" << end.toString(Qt::ISODate) << "price" << price.netto; << "end" << end.toString(Qt::ISODate) << "price (ADULT)" << price.netto;
}
for (int offset = 480; offset < 1200; ++offset) {
QDateTime start = s.addSecs(offset * 60);
CalcState cs = compute_price_for_daily_ticket(&cfg, start, end,
PERMIT_TYPE::DAY_TICKET_TEEN,
&price);
qCritical() << "start=" << start.toString(Qt::ISODate)
<< "end" << end.toString(Qt::ISODate) << "price (TEEN)" << price.netto;
} }
} }
#undef ADULT #undef ADULT