Commit Graph

199 Commits

Author SHA1 Message Date
e6d8c04076 Fix: for time change summer -> winter term. Compute minutes until midnight manually. 2024-10-30 15:56:58 +01:00
7e2f40a7b5 Add assigment-operator (otherwise compilation error). 2024-10-10 11:33:33 +02:00
44e2ce24a3 Add helper computeMinutesUntilCarryOverEnd().
Used in new tariff-calculator. Replace of previous wrong approach of
        using m_range.duration.
2024-10-10 11:30:53 +02:00
5868d3b510 Introduce computational state 2024-09-30 16:46:36 +02:00
2b9ea67ef5 Added function to implement new tariff-calculator:
std::pair<CalcState, QDateTime> ComputeDurationFromCost(Configuration const* cfg, QDateTime const &startDatetimePassed,  int cost);
std::pair<CalcState, std::optional<int>> ComputeCostFromDuration(Configuration const* cfg, QDateTime const &startDatetime, QDateTime &endDatetime, int nettoParkingTime);
2024-09-27 13:48:30 +02:00
d117328bed Minor: removed default parameter in constructor 2024-09-27 13:47:26 +02:00
fd04531474 Added payment <unified> payment-methode 2024-09-27 13:45:45 +02:00
5749fa422e Added structures for parsing of tariff05 in bad neuenahr 2024-09-27 13:45:04 +02:00
515dfaf35c reprogrammed to use ATBTime class 2024-09-27 13:41:30 +02:00
0ab833709c Added struct ATBTariffCarryOver 2024-09-27 13:40:18 +02:00
8e4f47c7b6 Added struct ATBTariffPrepaid 2024-09-27 13:39:35 +02:00
bc9645f1fa Minor: removed "pragma once" compiler flag 2024-09-27 13:38:39 +02:00
356e451839 Add structures to encode service and out-of-service times 2024-09-27 13:35:03 +02:00
c4e1d412a5 Add some assinment operators to support assignment of tariff-time-ranges. 2024-09-27 13:31:01 +02:00
1b716c48d2
Fix: copy header files 2024-09-19 14:10:05 +02:00
2ce0aeef1d Minor: include atb_time.h 2024-09-17 16:59:07 +02:00
4030a4b165 Add pop_max_price_save in case pop_max_price has to be re-computed dynamically, so it can be reset 2024-09-17 16:57:34 +02:00
8c7afdfcb1 Add additional constructor. 2024-09-17 16:53:45 +02:00
1874b08210 Merge branch 'kleipeda-experimental-snapshot-2024-09-12' into kleipeda-experimental 2024-09-16 10:49:23 +02:00
a8ae9fc602 Add own Time class (similar QTime) 2024-09-16 10:42:08 +02:00
7c0514e241 save current state 2024-09-13 10:42:45 +02:00
e38a1bfe12 Add default constructor, update debug output. 2024-09-11 11:40:19 +02:00
f38a8d528c Minor: add getters for parking-time-limit. 2024-09-11 11:39:16 +02:00
08a593eb12 Add 'pop_apply_carry_over_to_ticket_endtime':
If ticket-end-time exactly hits the start of a carry-over-time-range,
	the move to the end of the carry-over-time-range, even if this
	were not strictly necessary.
2024-09-11 11:36:57 +02:00
f322d30e36 Add default constructor, fix debug output. 2024-09-11 11:35:17 +02:00
7a53a68850 getPaymentOptionIndex(): add start-time parameter 2024-09-06 12:05:41 +02:00
75f1c1bb76 Checking parking-time-limit:
provide start-date-time as well, because the limit counts only
	from one day to following day (e.g. Sunday to Monday or from
	holiday to next day).
2024-09-03 11:10:24 +02:00
f47695de8b Add pop_plus_steps_saved 2024-09-02 17:16:47 +02:00
53cf9a7341 Add description for tariff-settings.w 2024-09-02 16:46:00 +02:00
3a18ee2d7c Add description for carry-over-settings 2024-09-02 16:45:35 +02:00
929a8a4a27 Reuse of "class ATBWeekDays":
Description of a weekday: Mon-Sun. For holidays contains a type-flag
	to indicate such a day.

	Each weekday has some tariff-settings and some carry-over-settings.
2024-09-02 16:41:26 +02:00
eca285cc25 remove obsolete print-function 2024-09-02 16:40:07 +02:00
bda8914f1a Add free functions:
previousDayHoliday():
	Check if previous day was a holiday. Check is done relative to
	computed endtime.

isHoliday():
	Check if startDateTime is on a holiday.

getPaymentOptionIndex():
	Compute the index of the payment-options-section inside a tariff-file.
	This is done as workaround (and backward compatibility).

parseWeekDay():
	Parse new structure of tariff-file.
2024-09-02 16:35:25 +02:00
9b524d63e5 Add 'pop_allow_overpay' setting: set vai tariff-file if operpay is allowed. 2024-08-21 15:33:02 +02:00
89b05ffadc Added GetYearPeriodActive() to get active year period. 2024-08-01 15:45:50 +02:00
260973cd09 Added pop_plus_steps/pop_minus_steps to control step sizes 2024-08-01 15:44:06 +02:00
52b7c2390a Minor: introduce using-typedef for Duration 2024-07-29 17:33:49 +02:00
24ab01695d GetPriceForTimeStep(): remove default parameter. 2024-07-29 17:28:27 +02:00
31b1dd1690 ResetTimeSteps():
Check paymentOptionIndex for correct value.
2024-07-29 11:20:00 +02:00
b7facb9d60 checkin for tariff02.json 2024-07-26 10:59:45 +02:00
003b7e8e8a getPaymentOption() functions and getPaymentOptionIndex() 2024-07-25 09:46:46 +02:00
7ef2d44fc4 Add parameter PermitType to GetCostForDuration() and GetDurationFromCost() 2024-07-25 09:45:36 +02:00
8f203184b6 Add additional parameter (PermitType) to several functions 2024-07-25 09:44:24 +02:00
7d452c82b7 Added pop_product_id and pop_product_name 2024-07-24 17:33:53 +02:00
0a08221381 Added conversion from QString to PermitType 2024-07-24 17:33:06 +02:00
da05d004dd Introduced 'pun_duration_saved': to be used when time steps have to be re-calculated. 2024-07-23 12:46:44 +02:00
45694106a7 GetTimeSteps():
added default parameter 'start'; was set inside the funtion.
2024-07-22 15:48:21 +02:00
6d125c65fe Added flags
pop_accumulate_prices
	pop_accumulate_durations
to decide if values in json files should be accumulated or not.
2024-07-22 15:46:45 +02:00
3503306637 save experimental 2024-07-21 20:58:12 +02:00
f2356bec55 Added new products 2024-07-19 14:04:20 +02:00