Stage 2 summary at 50 accepted trajectories
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
40
tasks_gen/train/G1065/seed/hire_rates.clas.abap
Normal file
40
tasks_gen/train/G1065/seed/hire_rates.clas.abap
Normal file
@@ -0,0 +1,40 @@
|
||||
CLASS {{p}}hire_rates DEFINITION PUBLIC FINAL CREATE PUBLIC.
|
||||
PUBLIC SECTION.
|
||||
TYPES ty_rate TYPE p LENGTH 10 DECIMALS 2.
|
||||
|
||||
METHODS get_daily_rate
|
||||
IMPORTING iv_category TYPE string
|
||||
RETURNING VALUE(rv_rate) TYPE ty_rate.
|
||||
|
||||
METHODS get_season_factor
|
||||
IMPORTING iv_month TYPE i
|
||||
RETURNING VALUE(rv_factor) TYPE ty_rate.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
CLASS {{p}}hire_rates IMPLEMENTATION.
|
||||
METHOD get_daily_rate.
|
||||
CASE to_upper( iv_category ).
|
||||
WHEN 'NARROW'.
|
||||
rv_rate = 120.
|
||||
WHEN 'WIDE'.
|
||||
rv_rate = 180.
|
||||
WHEN 'BARGE'.
|
||||
rv_rate = 260.
|
||||
WHEN OTHERS.
|
||||
rv_rate = 0.
|
||||
ENDCASE.
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD get_season_factor.
|
||||
IF iv_month >= 6 AND iv_month <= 9.
|
||||
rv_factor = '1.30'.
|
||||
ELSEIF iv_month = 4 OR iv_month = 5 OR iv_month = 10.
|
||||
rv_factor = '1.00'.
|
||||
ELSEIF iv_month >= 1 AND iv_month <= 12.
|
||||
rv_factor = '0.80'.
|
||||
ELSE.
|
||||
rv_factor = 0.
|
||||
ENDIF.
|
||||
ENDMETHOD.
|
||||
ENDCLASS.
|
||||
Reference in New Issue
Block a user