Commit Graph

  • 9dd0108731 ParseJson(): Gerhard Hoffmann 2024-09-11 11:54:16 +02:00
  • fa10ea4b89 compute_price_for_parking_ticket(): Gerhard Hoffmann 2024-09-11 11:49:31 +02:00
  • 05f03a623b compute_price_for_parking_ticket(): Gerhard Hoffmann 2024-09-11 11:47:50 +02:00
  • 03e9076962 compute_price_for_parking_ticket(): Gerhard Hoffmann 2024-09-11 11:46:36 +02:00
  • 5dbd3645c6 compute_price_for_parking_ticket(): Gerhard Hoffmann 2024-09-11 11:44:09 +02:00
  • d21f69cb9b get_maximal_parkingprice(): Gerhard Hoffmann 2024-09-11 11:42:15 +02:00
  • e38a1bfe12 Add default constructor, update debug output. Gerhard Hoffmann 2024-09-11 11:40:19 +02:00
  • f38a8d528c Minor: add getters for parking-time-limit. Gerhard Hoffmann 2024-09-11 11:39:16 +02:00
  • 08a593eb12 Add 'pop_apply_carry_over_to_ticket_endtime': Gerhard Hoffmann 2024-09-11 11:36:57 +02:00
  • f322d30e36 Add default constructor, fix debug output. Gerhard Hoffmann 2024-09-11 11:35:17 +02:00
  • 7a53a68850 getPaymentOptionIndex(): add start-time parameter Gerhard Hoffmann 2024-09-06 12:05:41 +02:00
  • 275c3ec869 compute_price_for_parking_ticket(): Pass start-date-time to parking-time-checker. Gerhard Hoffmann 2024-09-03 11:19:23 +02:00
  • 6d2bde1fe9 getPaymentOptionIndex(): Fix: make sure only one payment option can be chosen. Gerhard Hoffmann 2024-09-03 11:17:31 +02:00
  • f02521d3c2 parseWeekDay(): for the park-time-limit checking take into account that the start-date-time and end-date-time are on different days. Gerhard Hoffmann 2024-09-03 11:15:08 +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). Gerhard Hoffmann 2024-09-03 11:10:24 +02:00
  • f47695de8b Add pop_plus_steps_saved Gerhard Hoffmann 2024-09-02 17:16:47 +02:00
  • cce3db301b Minor: comment out some code to prevent compiler warnings (about some unused variables). Gerhard Hoffmann 2024-09-02 17:15:33 +02:00
  • 5cab0de9fb Use free function getPaymentOptionIndex() to compute index of valid payment-option-section in tariff-file based on configured businessHours. Gerhard Hoffmann 2024-09-02 17:14:20 +02:00
  • f92906f680 Minor: debug output. Gerhard Hoffmann 2024-09-02 17:13:11 +02:00
  • 8cdeef26fc Check if computed ticket-end-time violates a carry-over-limit defined in tariff-file. Gerhard Hoffmann 2024-09-02 17:11:48 +02:00
  • 52ebbf7bc9 Use free function getPaymentOptionIndex() in serveral places to compute valid index of a payment-option-section within tariff file. If this is not possible, then try the already available functionality. Gerhard Hoffmann 2024-09-02 17:09:26 +02:00
  • 349e9d8b06 Add free functions isHoliday() to check if the current day is a holiday and previousDayHoliday() to check if previous day (relative to endtime) is a holiday. Gerhard Hoffmann 2024-09-02 17:05:32 +02:00
  • 68a1c24861 Add free function getPaymentOptionIndex(): Compute payment option index base on current start-date-time and businesshour-setiing in tariff-file. Returns -1 to indicate error. Gerhard Hoffmann 2024-09-02 17:03:37 +02:00
  • c946c106d1 Configuration::ParseJson(): Save the pop_plus_steps setting: sometimes it is necessary to adapt the pop_plus_steps-variable in order to hit a time-limit-boundary exactly. Otherwise the next computed time-step might overshoot the time-limit, and when moving backwards (via Minus-Button) there is a better resolution: going backwards, the user could hit the exact time-limit, which he could not when going up. Gerhard Hoffmann 2024-09-02 16:58:34 +02:00
  • f24f1fe646 Configuration::ParseJson(): Call parseWeekDay() to reading the week-day-settings. Gerhard Hoffmann 2024-09-02 16:57:11 +02:00
  • c6b8a37263 ParseJson(): Minor: some reformatting of source code. Gerhard Hoffmann 2024-09-02 16:55:48 +02:00
  • 58d8f16681 ParseWeekDay(): Parsing "Monday" - "Sunday" section i a tariff-file. Gerhard Hoffmann 2024-09-02 16:49:21 +02:00
  • 431664d8b9 IdentifyJsonMember(): Add "Monday" - "Sunday" as level-1 sections in a tariff-file. Gerhard Hoffmann 2024-09-02 16:47:46 +02:00
  • 53cf9a7341 Add description for tariff-settings.w Gerhard Hoffmann 2024-09-02 16:46:00 +02:00
  • 3a18ee2d7c Add description for carry-over-settings Gerhard Hoffmann 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. Gerhard Hoffmann 2024-09-02 16:41:26 +02:00
  • 2b9657787d add tests for bad-neuenahr Gerhard Hoffmann 2024-09-02 16:40:38 +02:00
  • eca285cc25 remove obsolete print-function Gerhard Hoffmann 2024-09-02 16:40:07 +02:00
  • bda8914f1a Add free functions: Gerhard Hoffmann 2024-09-02 16:35:25 +02:00
  • a3983ed427 check for time-step-config == STATIC 2.3.99-19 Gerhard Hoffmann 2024-08-21 17:46:35 +02:00
  • f8805e9e78 compute_duration_for_parking_ticket(): Fix: handle carry-over for coin-insertion. Gerhard Hoffmann 2024-08-21 15:40:55 +02:00
  • 7a6360f392 compute_duration_for_parking_ticket(): Fix: handle prepaid-setting for coin-insertion. Gerhard Hoffmann 2024-08-21 15:39:44 +02:00
  • 08a249f393 return OVERPAID in case overpay is not allowed Gerhard Hoffmann 2024-08-21 15:39:05 +02:00
  • 7c173ae292 parse for pop_allow_overpay Gerhard Hoffmann 2024-08-21 15:38:06 +02:00
  • 80637260f3 Utilities::IsYearPeriodActive(): Fix: take into account if start-date <= end-date or not. Otherwise check is wrong, and no valid year period is returned. Gerhard Hoffmann 2024-08-21 15:35:03 +02:00
  • 9b524d63e5 Add 'pop_allow_overpay' setting: set vai tariff-file if operpay is allowed. Gerhard Hoffmann 2024-08-21 15:33:02 +02:00
  • 96aad6b797 Merge branch 'fuchs-muehlbach' of git.mimbach49.de:GerhardHoffmann/MOBILISIS-Calculator into fuchs-muehlbach 2.3.99-18 fuchs-muehlbach Siegfried Siegert 2024-08-19 12:41:02 +02:00
  • 648799629a GetTimeSteps(): Gerhard Hoffmann 2024-08-19 12:19:01 +02:00
  • 84e2530767 Calculator::GetDurationFromCost(): Minor: debug output. Gerhard Hoffmann 2024-08-19 12:18:05 +02:00
  • ceb78772dd Minor: debug output Gerhard Hoffmann 2024-08-19 12:11:47 +02:00
  • 675ba60733 tests for schnals/muehlbach Gerhard Hoffmann 2024-08-19 12:10:43 +02:00
  • d86a688836 GetTimeSteps(): unifiy implementation for Fuchs/Muehlbach and Fuchs/Schnals. Gerhard Hoffmann 2024-08-18 19:29:48 +02:00
  • 171b23eebb added parsing for new duration fields Gerhard Hoffmann 2024-08-18 19:27:06 +02:00
  • ae9a54bf02 Added: pun_mutable: duration might be changed during runtime pun_round_to_next_24h_boundary duration has to be aligned with next possible 24h boundary pun_round_to_prev_24h_boundary duration has to be aligned with previous 24h boundary pun_align_with_timepoint duration has to be aligned with dedicated time point Gerhard Hoffmann 2024-08-18 19:23:12 +02:00
  • 84e61844ab test case schnals Gerhard Hoffmann 2024-08-18 19:22:07 +02:00
  • 328f7cb712 test cases for fuchs-mue=hlbach 2.3.99-17 Gerhard Hoffmann 2024-08-15 21:45:53 +02:00
  • 84dbfc7234 GetTimeSteps(): compute time steps and duration values. Gerhard Hoffmann 2024-08-15 21:41:09 +02:00
  • 48cc6b1302 Minor: debug output. duartionUnit as signed int (to see errors in case it becomes negative). Gerhard Hoffmann 2024-08-15 21:39:22 +02:00
  • a6007ee89a GetTimeSteps(): Use condition pop_time_step_config == (int)ATBTimeStepConfig::TimeStepConfig::RECOMPUTE_SOME (set in tariff-file) to decide the alogorithm to compute time-steps. Gerhard Hoffmann 2024-08-15 21:37:23 +02:00
  • 192a37d93f .GetTimeSteps(): pass parameters tariff, paymentOptionIndex and start_parking_time_); Gerhard Hoffmann 2024-08-15 21:29:37 +02:00
  • b17f77b22a Add setting of max-price in case of degressive-tariff. Gerhard Hoffmann 2024-08-15 21:28:49 +02:00
  • 007978a0f8 Added include/mobilisis/tariff_prepay.h. OTHER_FILES removed. Gerhard Hoffmann 2024-08-15 21:26:30 +02:00
  • 80b21ac231 New internal representation for the prepaid option Gerhard Hoffmann 2024-08-15 21:24:27 +02:00
  • 0a32d60827 Added parsing for new duration members and new prepaid-option. Gerhard Hoffmann 2024-08-15 21:23:17 +02:00
  • 26a50fb972 Add enum constant RECOMPUTE_SOME=3: some duration values have to be recomputed at runtime (to determine time steps). Gerhard Hoffmann 2024-08-15 21:20:18 +02:00
  • 964ee17540 add new prepaid_option_id Gerhard Hoffmann 2024-08-15 21:19:40 +02:00
  • 6ef57792ce Add PrepaidOptionType. PrepaidType declared as deprecated. Gerhard Hoffmann 2024-08-15 21:16:46 +02:00
  • ec9f7d9262 Introduce bew memebers to control the handling of duration objects (especially for GetTimeSteps() computation). Gerhard Hoffmann 2024-08-15 21:14:57 +02:00
  • a2c40fa32a re-introduce prepay-option for backward compatibility Gerhard Hoffmann 2024-08-15 21:13:25 +02:00
  • b05950fc37 test case for fuchs/muelbach fuchs-experimental Gerhard Hoffmann 2024-08-14 12:26:09 +02:00
  • 1c6c9f934d compute_price_for_parking_ticket(): Minor: added debug output. Gerhard Hoffmann 2024-08-14 12:05:29 +02:00
  • 9baaca1c80 Minor: removed some debug output. 2.3.99-16 Gerhard Hoffmann 2024-08-13 15:41:29 +02:00
  • 18f2895250 GetDurationFromCost(): Use pop_accumulate_durations, to decide if durations have to be summed up. Gerhard Hoffmann 2024-08-13 15:34:20 +02:00
  • fc78eff0a4 compute_duration_for_parking_ticket(): Set ticket end time to 23:59 (instaed of 00:00:00). Gerhard Hoffmann 2024-08-13 15:28:42 +02:00
  • b303a59964 GetTimeSteps(): use pop_accumulate_durations to properly compute time steps such that following functions comuting a price have the same behaviour. Gerhard Hoffmann 2024-08-13 15:04:13 +02:00
  • 77ca6a4736 Use computeBruttoDurationInSecs() to compute from durationInSecs (which is a netto-time) to corresponding brutto-time, and adapt inputDate according to that date. Gerhard Hoffmann 2024-08-13 15:01:24 +02:00
  • 8b65bb3e2c Actuallu use pop_accumulate_durations. Gerhard Hoffmann 2024-08-13 14:59:11 +02:00
  • 82ca274c45 Fetch pop_accumulate_durations form tariff-file (to decide if durrations have to be summed up). Gerhard Hoffmann 2024-08-13 14:57:12 +02:00
  • 04e1fe40ba Added test cases for Fuchs/Schnals 2.3.99-15 Gerhard Hoffmann 2024-08-12 09:24:48 +02:00
  • 397e0f9061 GetDurationFromCost(): Minor: changed some debug output. Gerhard Hoffmann 2024-08-12 09:22:55 +02:00
  • 75c98c18ad Added: Calculator::computeBruttoDurationInSecs() and Calculator::computeBruttoDateTime() (based on it). Gerhard Hoffmann 2024-08-13 14:55:05 +02:00
  • e6b5bc0f4d compute_price_for_parking_ticket(): Use (netto_parking_time >= minutesUntilCarryOver) instead of (netto_parking_time > minutesUntilCarryOver), to correctly use interval limit. Gerhard Hoffmann 2024-08-12 09:19:20 +02:00
  • 3cfaf88a6d compute_price_for_parking_ticket(): Comute effective start time (jump over carry over time). Gerhard Hoffmann 2024-08-12 09:18:20 +02:00
  • 21534ba153 Minor: debug output (de-)activated. Gerhard Hoffmann 2024-08-13 14:53:44 +02:00
  • 8d9119ac83 Compute time steps using start_parking_time as parameter: Calculator::GetInstance().GetTimeSteps(tariff, paymentOptionIndex, start_parking_time); Gerhard Hoffmann 2024-08-13 14:52:48 +02:00
  • da7a3cf67b Minor: reformatted code. Gerhard Hoffmann 2024-08-13 14:52:11 +02:00
  • 1be07a2415 get_minimal_parkingtime(): compute_price_for_parking_ticket(): Minor: changed debug output. Gerhard Hoffmann 2024-08-12 09:16:26 +02:00
  • 449fb163bd Compute maxPrice directly (without using something from Utilities). Gerhard Hoffmann 2024-08-13 14:51:08 +02:00
  • 19032349ae Add test cases for muehlbach Gerhard Hoffmann 2024-08-13 14:38:37 +02:00
  • 2c2fd3845b Added: int computeBruttoDurationInSecs() and computeBruttoDateTime() based on it. Gerhard Hoffmann 2024-08-13 14:35:08 +02:00
  • 5131892744 Added test cases for Fuchs/Schnals Gerhard Hoffmann 2024-08-12 09:24:48 +02:00
  • 6d6615b81e GetDurationFromCost(): Minor: changed some debug output. Gerhard Hoffmann 2024-08-12 09:22:55 +02:00
  • eafbfd60c3 compute_price_for_parking_ticket(): Use (netto_parking_time >= minutesUntilCarryOver) instead of (netto_parking_time > minutesUntilCarryOver), to correctly use interval limit. Gerhard Hoffmann 2024-08-12 09:19:20 +02:00
  • 41fc924a7c compute_price_for_parking_ticket(): Comute effective start time (jump over carry over time). Gerhard Hoffmann 2024-08-12 09:18:20 +02:00
  • cbcf8391b3 get_minimal_parkingtime(): compute_price_for_parking_ticket(): Minor: changed debug output. Gerhard Hoffmann 2024-08-12 09:16:26 +02:00
  • 25b3143d88 Merge branch 'kleipeda-experimental' of /home/siegert/atbfs01entwicklung/Elektronik/PTU/git_bare_repos/libmobilisis-calc into kleipeda-experimental 2.3.99-14 Siegfried Siegert 2024-08-02 14:37:42 +02:00
  • 0856f10ca9 GetDurationFromCost(): Fix computation of end-time when pop_accumulate_durations is set in tariff-file. Gerhard Hoffmann 2024-08-02 14:34:44 +02:00
  • 88c703ecc2 Merge branch 'kleipeda-experimental' of /home/siegert/atbfs01entwicklung/Elektronik/PTU/git_bare_repos/libmobilisis-calc into kleipeda-experimental 2.3.99-13 Siegfried Siegert 2024-08-02 13:21:54 +02:00
  • 465b2274a1 compute_duration_for_parking_ticket(): Adapt end-time in case it is midnight: 00:00 -> 23:59 Gerhard Hoffmann 2024-08-02 13:15:11 +02:00
  • f946cd13e4 Merge branch 'kleipeda-experimental' of /home/siegert/atbfs01entwicklung/Elektronik/PTU/git_bare_repos/libmobilisis-calc into kleipeda-experimental 2.3.99-12 Siegfried Siegert 2024-08-02 11:55:12 +02:00
  • 8d1cbe7337 Merge branch 'kleipeda-experimental' of /home/siegert/atbfs01entwicklung/Elektronik/PTU/git_bare_repos/libmobilisis-calc into kleipeda-experimental 2.3.99-11 Siegfried Siegert 2024-08-02 11:29:10 +02:00
  • 62c52fd580 test case for fuchs, fane alm. Gerhard Hoffmann 2024-08-02 11:13:50 +02:00
  • 1023f6ede1 GetPriceForTimeStep(): Use "pop_accumulate_durations" setting to sum up the durations. Otherwise time-step will not be found in time-step-list. Gerhard Hoffmann 2024-08-02 11:12:07 +02:00
  • 36b3e85d1b GetCostFromDuration(): recompute timestep list to make sure that time step is found in it. Gerhard Hoffmann 2024-08-02 11:11:20 +02:00
  • b394ed46cc In case end-parking-time ends with 00:00, set it to 23:59. Gerhard Hoffmann 2024-08-02 11:09:20 +02:00