Step F first pass: 81/92 accepted; budget floor 60 calls; rejected slots moved for regeneration
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
This commit is contained in:
67
tasks_gen/eval/G0149/faulty/m0_scrap_payout.clas.abap
Normal file
67
tasks_gen/eval/G0149/faulty/m0_scrap_payout.clas.abap
Normal file
@@ -0,0 +1,67 @@
|
||||
CLASS {{p}}scrap_payout DEFINITION PUBLIC FINAL CREATE PUBLIC.
|
||||
PUBLIC SECTION.
|
||||
INTERFACES {{p}}if_scrap_payout.
|
||||
|
||||
PRIVATE SECTION.
|
||||
TYPES ty_mat_code TYPE c LENGTH 4.
|
||||
TYPES ty_weight TYPE p LENGTH 8 DECIMALS 3.
|
||||
TYPES ty_price TYPE p LENGTH 8 DECIMALS 2.
|
||||
TYPES ty_quantity TYPE p LENGTH 15 DECIMALS 5.
|
||||
|
||||
METHODS payable_weight
|
||||
IMPORTING iv_weight_kg TYPE ty_weight
|
||||
iv_contamination TYPE i
|
||||
RETURNING VALUE(rv_weight) TYPE ty_quantity.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
CLASS {{p}}scrap_payout IMPLEMENTATION.
|
||||
METHOD {{p}}if_scrap_payout~calculate.
|
||||
DATA lv_mat_code TYPE ty_mat_code.
|
||||
lv_mat_code = to_upper( iv_material ).
|
||||
|
||||
DATA lv_price TYPE ty_price.
|
||||
CASE lv_mat_code.
|
||||
WHEN {{p}}if_scrap_payout=>c_material-copper.
|
||||
lv_price = '4.20'.
|
||||
WHEN {{p}}if_scrap_payout=>c_material-aluminium.
|
||||
lv_price = '1.10'.
|
||||
WHEN {{p}}if_scrap_payout=>c_material-steel.
|
||||
lv_price = '0.30'.
|
||||
WHEN {{p}}if_scrap_payout=>c_material-brass.
|
||||
lv_price = '3.00'.
|
||||
WHEN OTHERS.
|
||||
rs_payout = VALUE #( amount = 0
|
||||
reason = {{p}}if_scrap_payout=>c_reason-material ).
|
||||
RETURN.
|
||||
ENDCASE.
|
||||
|
||||
IF iv_weight_kg <= 0.
|
||||
rs_payout = VALUE #( amount = 0
|
||||
reason = {{p}}if_scrap_payout=>c_reason-weight ).
|
||||
RETURN.
|
||||
ENDIF.
|
||||
|
||||
IF iv_contamination >= 0 OR iv_contamination > 100.
|
||||
rs_payout = VALUE #( amount = 0
|
||||
reason = {{p}}if_scrap_payout=>c_reason-dirty ).
|
||||
RETURN.
|
||||
ENDIF.
|
||||
|
||||
DATA lv_payable TYPE ty_quantity.
|
||||
lv_payable = payable_weight( iv_weight_kg = iv_weight_kg
|
||||
iv_contamination = iv_contamination ).
|
||||
|
||||
DATA lv_gross TYPE ty_quantity.
|
||||
lv_gross = lv_payable * lv_price.
|
||||
|
||||
rs_payout = VALUE #( amount = round( val = lv_gross dec = 2 )
|
||||
reason = {{p}}if_scrap_payout=>c_reason-ok ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD payable_weight.
|
||||
DATA lv_remaining TYPE i.
|
||||
lv_remaining = 100 - iv_contamination.
|
||||
rv_weight = iv_weight_kg * lv_remaining / 100.
|
||||
ENDMETHOD.
|
||||
ENDCLASS.
|
||||
67
tasks_gen/eval/G0149/faulty/m1_scrap_payout.clas.abap
Normal file
67
tasks_gen/eval/G0149/faulty/m1_scrap_payout.clas.abap
Normal file
@@ -0,0 +1,67 @@
|
||||
CLASS {{p}}scrap_payout DEFINITION PUBLIC FINAL CREATE PUBLIC.
|
||||
PUBLIC SECTION.
|
||||
INTERFACES {{p}}if_scrap_payout.
|
||||
|
||||
PRIVATE SECTION.
|
||||
TYPES ty_mat_code TYPE c LENGTH 4.
|
||||
TYPES ty_weight TYPE p LENGTH 8 DECIMALS 3.
|
||||
TYPES ty_price TYPE p LENGTH 8 DECIMALS 2.
|
||||
TYPES ty_quantity TYPE p LENGTH 15 DECIMALS 5.
|
||||
|
||||
METHODS payable_weight
|
||||
IMPORTING iv_weight_kg TYPE ty_weight
|
||||
iv_contamination TYPE i
|
||||
RETURNING VALUE(rv_weight) TYPE ty_quantity.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
CLASS {{p}}scrap_payout IMPLEMENTATION.
|
||||
METHOD {{p}}if_scrap_payout~calculate.
|
||||
DATA lv_mat_code TYPE ty_mat_code.
|
||||
lv_mat_code = to_upper( iv_material ).
|
||||
|
||||
DATA lv_price TYPE ty_price.
|
||||
CASE lv_mat_code.
|
||||
WHEN {{p}}if_scrap_payout=>c_material-copper.
|
||||
lv_price = '4.20'.
|
||||
WHEN {{p}}if_scrap_payout=>c_material-aluminium.
|
||||
lv_price = '1.10'.
|
||||
WHEN {{p}}if_scrap_payout=>c_material-steel.
|
||||
lv_price = '0.30'.
|
||||
WHEN {{p}}if_scrap_payout=>c_material-brass.
|
||||
lv_price = '3.00'.
|
||||
WHEN OTHERS.
|
||||
rs_payout = VALUE #( amount = 0
|
||||
reason = {{p}}if_scrap_payout=>c_reason-material ).
|
||||
RETURN.
|
||||
ENDCASE.
|
||||
|
||||
IF iv_weight_kg <= 0.
|
||||
rs_payout = VALUE #( amount = 0
|
||||
reason = {{p}}if_scrap_payout=>c_reason-weight ).
|
||||
RETURN.
|
||||
ENDIF.
|
||||
|
||||
IF iv_contamination < 0 OR iv_contamination <= 100.
|
||||
rs_payout = VALUE #( amount = 0
|
||||
reason = {{p}}if_scrap_payout=>c_reason-dirty ).
|
||||
RETURN.
|
||||
ENDIF.
|
||||
|
||||
DATA lv_payable TYPE ty_quantity.
|
||||
lv_payable = payable_weight( iv_weight_kg = iv_weight_kg
|
||||
iv_contamination = iv_contamination ).
|
||||
|
||||
DATA lv_gross TYPE ty_quantity.
|
||||
lv_gross = lv_payable * lv_price.
|
||||
|
||||
rs_payout = VALUE #( amount = round( val = lv_gross dec = 2 )
|
||||
reason = {{p}}if_scrap_payout=>c_reason-ok ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD payable_weight.
|
||||
DATA lv_remaining TYPE i.
|
||||
lv_remaining = 100 - iv_contamination.
|
||||
rv_weight = iv_weight_kg * lv_remaining / 100.
|
||||
ENDMETHOD.
|
||||
ENDCLASS.
|
||||
67
tasks_gen/eval/G0149/faulty/m2_scrap_payout.clas.abap
Normal file
67
tasks_gen/eval/G0149/faulty/m2_scrap_payout.clas.abap
Normal file
@@ -0,0 +1,67 @@
|
||||
CLASS {{p}}scrap_payout DEFINITION PUBLIC FINAL CREATE PUBLIC.
|
||||
PUBLIC SECTION.
|
||||
INTERFACES {{p}}if_scrap_payout.
|
||||
|
||||
PRIVATE SECTION.
|
||||
TYPES ty_mat_code TYPE c LENGTH 4.
|
||||
TYPES ty_weight TYPE p LENGTH 8 DECIMALS 3.
|
||||
TYPES ty_price TYPE p LENGTH 8 DECIMALS 2.
|
||||
TYPES ty_quantity TYPE p LENGTH 15 DECIMALS 5.
|
||||
|
||||
METHODS payable_weight
|
||||
IMPORTING iv_weight_kg TYPE ty_weight
|
||||
iv_contamination TYPE i
|
||||
RETURNING VALUE(rv_weight) TYPE ty_quantity.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
CLASS {{p}}scrap_payout IMPLEMENTATION.
|
||||
METHOD {{p}}if_scrap_payout~calculate.
|
||||
DATA lv_mat_code TYPE ty_mat_code.
|
||||
lv_mat_code = to_upper( iv_material ).
|
||||
|
||||
DATA lv_price TYPE ty_price.
|
||||
CASE lv_mat_code.
|
||||
WHEN {{p}}if_scrap_payout=>c_material-copper.
|
||||
lv_price = '4.20'.
|
||||
WHEN {{p}}if_scrap_payout=>c_material-aluminium.
|
||||
lv_price = '1.10'.
|
||||
WHEN {{p}}if_scrap_payout=>c_material-steel.
|
||||
lv_price = '0.30'.
|
||||
WHEN {{p}}if_scrap_payout=>c_material-brass.
|
||||
lv_price = '3.00'.
|
||||
WHEN OTHERS.
|
||||
rs_payout = VALUE #( amount = 0
|
||||
reason = {{p}}if_scrap_payout=>c_reason-material ).
|
||||
RETURN.
|
||||
ENDCASE.
|
||||
|
||||
IF iv_weight_kg <= 0.
|
||||
rs_payout = VALUE #( amount = 0
|
||||
reason = {{p}}if_scrap_payout=>c_reason-weight ).
|
||||
RETURN.
|
||||
ENDIF.
|
||||
|
||||
IF iv_contamination < 0 OR iv_contamination > 100.
|
||||
rs_payout = VALUE #( amount = 0
|
||||
reason = {{p}}if_scrap_payout=>c_reason-dirty ).
|
||||
RETURN.
|
||||
ENDIF.
|
||||
|
||||
DATA lv_payable TYPE ty_quantity.
|
||||
lv_payable = payable_weight( iv_weight_kg = iv_weight_kg
|
||||
iv_contamination = iv_contamination ).
|
||||
|
||||
DATA lv_gross TYPE ty_quantity.
|
||||
lv_gross = lv_payable / lv_price.
|
||||
|
||||
rs_payout = VALUE #( amount = round( val = lv_gross dec = 2 )
|
||||
reason = {{p}}if_scrap_payout=>c_reason-ok ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD payable_weight.
|
||||
DATA lv_remaining TYPE i.
|
||||
lv_remaining = 100 - iv_contamination.
|
||||
rv_weight = iv_weight_kg * lv_remaining / 100.
|
||||
ENDMETHOD.
|
||||
ENDCLASS.
|
||||
67
tasks_gen/eval/G0149/faulty/m4_scrap_payout.clas.abap
Normal file
67
tasks_gen/eval/G0149/faulty/m4_scrap_payout.clas.abap
Normal file
@@ -0,0 +1,67 @@
|
||||
CLASS {{p}}scrap_payout DEFINITION PUBLIC FINAL CREATE PUBLIC.
|
||||
PUBLIC SECTION.
|
||||
INTERFACES {{p}}if_scrap_payout.
|
||||
|
||||
PRIVATE SECTION.
|
||||
TYPES ty_mat_code TYPE c LENGTH 4.
|
||||
TYPES ty_weight TYPE p LENGTH 8 DECIMALS 3.
|
||||
TYPES ty_price TYPE p LENGTH 8 DECIMALS 2.
|
||||
TYPES ty_quantity TYPE p LENGTH 15 DECIMALS 5.
|
||||
|
||||
METHODS payable_weight
|
||||
IMPORTING iv_weight_kg TYPE ty_weight
|
||||
iv_contamination TYPE i
|
||||
RETURNING VALUE(rv_weight) TYPE ty_quantity.
|
||||
ENDCLASS.
|
||||
|
||||
|
||||
CLASS {{p}}scrap_payout IMPLEMENTATION.
|
||||
METHOD {{p}}if_scrap_payout~calculate.
|
||||
DATA lv_mat_code TYPE ty_mat_code.
|
||||
lv_mat_code = to_upper( iv_material ).
|
||||
|
||||
DATA lv_price TYPE ty_price.
|
||||
CASE lv_mat_code.
|
||||
WHEN {{p}}if_scrap_payout=>c_material-copper.
|
||||
lv_price = '4.20'.
|
||||
WHEN {{p}}if_scrap_payout=>c_material-aluminium.
|
||||
lv_price = '1.10'.
|
||||
WHEN {{p}}if_scrap_payout=>c_material-steel.
|
||||
lv_price = '0.30'.
|
||||
WHEN {{p}}if_scrap_payout=>c_material-brass.
|
||||
lv_price = '3.00'.
|
||||
WHEN OTHERS.
|
||||
rs_payout = VALUE #( amount = 0
|
||||
reason = {{p}}if_scrap_payout=>c_reason-material ).
|
||||
RETURN.
|
||||
ENDCASE.
|
||||
|
||||
IF iv_weight_kg <= 0.
|
||||
rs_payout = VALUE #( amount = 0
|
||||
reason = {{p}}if_scrap_payout=>c_reason-weight ).
|
||||
RETURN.
|
||||
ENDIF.
|
||||
|
||||
IF iv_contamination < 0 OR iv_contamination > 100.
|
||||
rs_payout = VALUE #( amount = 0
|
||||
reason = {{p}}if_scrap_payout=>c_reason-dirty ).
|
||||
RETURN.
|
||||
ENDIF.
|
||||
|
||||
DATA lv_payable TYPE ty_quantity.
|
||||
lv_payable = payable_weight( iv_weight_kg = iv_weight_kg
|
||||
iv_contamination = iv_contamination ).
|
||||
|
||||
DATA lv_gross TYPE ty_quantity.
|
||||
lv_gross = lv_payable * lv_price.
|
||||
|
||||
rs_payout = VALUE #( amount = round( val = lv_gross dec = 2 )
|
||||
reason = {{p}}if_scrap_payout=>c_reason-ok ).
|
||||
ENDMETHOD.
|
||||
|
||||
METHOD payable_weight.
|
||||
DATA lv_remaining TYPE i.
|
||||
lv_remaining = 100 - iv_contamination.
|
||||
rv_weight = iv_weight_kg / lv_remaining / 100.
|
||||
ENDMETHOD.
|
||||
ENDCLASS.
|
||||
Reference in New Issue
Block a user