checkin for the weekend. proper commit-messages later

This commit is contained in:
2024-02-16 13:37:24 +01:00
parent 1d7779f666
commit c0f0648a74
12 changed files with 3374 additions and 14 deletions
+12 -8
View File
@@ -118,10 +118,10 @@ int main() {
QDateTime s(QDate(2023, 11, 30), QTime());
// QDateTime s(QDate(2023, 11, 26), QTime());
QDateTime end;
for (int duration = 30; duration <= 30; duration += 5) {
for (int duration = 35; duration <= 35; duration += 5) {
// for (int duration = 30; duration <= maxParkingTime; duration += 5) {
qCritical() << "";
for (int offset = 721; offset <= 721; ++offset) {
for (int offset = 1046; offset <= 1046; ++offset) {
//for (int offset = 420; offset <= 1080; ++offset) {
//if (offset > 720 && offset < 840) {
// continue;
@@ -130,8 +130,9 @@ int main() {
QDateTime const firstStart = start;
// qCritical() << "start" << start.toString(Qt::ISODate);
double cost = Calculator::GetInstance().GetCostFromDuration(&cfg, 3, start, end, duration, nextDay, prePaid);
double cost = Calculator::GetInstance().GetCostFromDuration(&cfg, 1, start, end, duration, nextDay, prePaid);
#if COST_FROM_DURATION==1
double cost_soll = 30 + ((duration-30)/5 * 10);
uint32_t duration_ist = start.secsTo(end) / 60;
@@ -160,13 +161,16 @@ int main() {
//break;
}
#else
std::string duration = Calculator::GetInstance().GetDurationFromCost(&cfg, 1,
start.toString(Qt::ISODate).toStdString().c_str(),
cost, false, true);
qCritical() << "start" << start.toString(Qt::ISODate)
<< "cost" << cost
<< "until" << duration.c_str() << start.secsTo(QDateTime::fromString(duration.c_str(), Qt::ISODate)) / 60;
#endif // COST_FROM_DURATION
//std::string duration = calculator.GetDurationFromCost(&cfg, 3, start.toString(Qt::ISODate).toStdString().c_str(), cost);
//qCritical() << "start" << start.toString(Qt::ISODate)
// << "cost" << cost
// << "until" << duration.c_str() << start.secsTo(QDateTime::fromString(duration.c_str(), Qt::ISODate)) / 60;
}
}
#endif // 0