Stage 2 summary at 50 accepted trajectories

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Kral
2026-10-05 18:02:52 +02:00
parent 332fb4601d
commit 5bcd1bf9cd
1230 changed files with 77563 additions and 33 deletions

View File

@@ -0,0 +1,39 @@
FUNCTION {{p}}dlv_price
IMPORTING
iv_service TYPE string
iv_weight TYPE decfloat34
iv_distance TYPE decfloat34
EXPORTING
ev_skip TYPE abap_bool
CHANGING
cv_price TYPE decfloat34
EXCEPTIONS
invalid_weight.
ev_skip = abap_true.
IF iv_weight <= 0.
RAISE invalid_weight.
ENDIF.
IF iv_distance > 300.
ev_skip = abap_true.
RETURN.
ENDIF.
CASE iv_service.
WHEN 'EX'.
cv_price = round( val = 12 + iv_distance * '0.60' + iv_weight * '1.50'
dec = 2 mode = cl_abap_math=>round_half_up ).
IF cv_price < 6.
cv_price = 6.
ENDIF.
WHEN 'ST'.
cv_price = round( val = 5 + iv_distance * '0.30' + iv_weight * '0.80'
dec = 2 mode = cl_abap_math=>round_half_up ).
IF cv_price < 6.
cv_price = 6.
ENDIF.
WHEN OTHERS.
ev_skip = abap_true.
cv_price = 0.
ENDCASE.
ENDFUNCTION.