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:
56
tasks_gen/eval/G0142/seed/train_punct_old.prog.abap
Normal file
56
tasks_gen/eval/G0142/seed/train_punct_old.prog.abap
Normal file
@@ -0,0 +1,56 @@
|
||||
REPORT {{p}}train_punct_old.
|
||||
|
||||
DATA gv_line TYPE {{p}}trun-line_code.
|
||||
DATA gv_date TYPE {{p}}trun-plan_date.
|
||||
|
||||
SELECT-OPTIONS s_line FOR gv_line.
|
||||
SELECT-OPTIONS s_date FOR gv_date.
|
||||
|
||||
TYPES: BEGIN OF ty_out,
|
||||
line_code TYPE {{p}}trun-line_code,
|
||||
runs TYPE i,
|
||||
late TYPE i,
|
||||
sum_delay TYPE i,
|
||||
punct TYPE i,
|
||||
END OF ty_out.
|
||||
|
||||
DATA gt_out TYPE STANDARD TABLE OF ty_out.
|
||||
|
||||
FIELD-SYMBOLS <ls_run> TYPE {{p}}trun.
|
||||
FIELD-SYMBOLS <ls_out> TYPE ty_out.
|
||||
|
||||
START-OF-SELECTION.
|
||||
DATA lt_runs TYPE STANDARD TABLE OF {{p}}trun.
|
||||
SELECT * FROM {{p}}trun
|
||||
INTO TABLE @lt_runs
|
||||
WHERE plan_date IN @s_date
|
||||
AND line_code IN @s_line.
|
||||
|
||||
LOOP AT lt_runs ASSIGNING <ls_run>.
|
||||
IF <ls_run>-cancelled = 'X'.
|
||||
CONTINUE.
|
||||
ENDIF.
|
||||
READ TABLE gt_out ASSIGNING <ls_out> WITH KEY line_code = <ls_run>-line_code.
|
||||
IF sy-subrc <> 0.
|
||||
APPEND INITIAL LINE TO gt_out ASSIGNING <ls_out>.
|
||||
<ls_out>-line_code = <ls_run>-line_code.
|
||||
ENDIF.
|
||||
<ls_out>-runs = <ls_out>-runs + 1.
|
||||
<ls_out>-sum_delay = <ls_out>-sum_delay + <ls_run>-delay_min.
|
||||
IF <ls_run>-delay_min > 5.
|
||||
<ls_out>-late = <ls_out>-late + 1.
|
||||
ENDIF.
|
||||
ENDLOOP.
|
||||
|
||||
LOOP AT gt_out ASSIGNING <ls_out>.
|
||||
<ls_out>-punct = ( <ls_out>-runs - <ls_out>-late ) * 100 / <ls_out>-runs.
|
||||
ENDLOOP.
|
||||
|
||||
SORT gt_out BY punct line_code.
|
||||
|
||||
TRY.
|
||||
cl_salv_table=>factory( IMPORTING r_salv_table = DATA(lo_alv)
|
||||
CHANGING t_table = gt_out ).
|
||||
lo_alv->display( ).
|
||||
CATCH cx_salv_msg.
|
||||
ENDTRY.
|
||||
21
tasks_gen/eval/G0142/seed/train_seed.clas.abap
Normal file
21
tasks_gen/eval/G0142/seed/train_seed.clas.abap
Normal file
@@ -0,0 +1,21 @@
|
||||
CLASS {{p}}train_seed DEFINITION PUBLIC FINAL CREATE PUBLIC.
|
||||
PUBLIC SECTION.
|
||||
INTERFACES if_oo_adt_classrun.
|
||||
ENDCLASS.
|
||||
|
||||
CLASS {{p}}train_seed IMPLEMENTATION.
|
||||
METHOD if_oo_adt_classrun~main.
|
||||
DELETE FROM {{p}}trun.
|
||||
INSERT {{p}}trun FROM TABLE @( VALUE #(
|
||||
( run_id = 1 line_code = 'IC1001' plan_date = '20260105' delay_min = 0 cancelled = '' )
|
||||
( run_id = 2 line_code = 'IC1001' plan_date = '20260105' delay_min = 12 cancelled = '' )
|
||||
( run_id = 3 line_code = 'IC1001' plan_date = '20260106' delay_min = 3 cancelled = '' )
|
||||
( run_id = 4 line_code = 'IC1002' plan_date = '20260105' delay_min = 20 cancelled = '' )
|
||||
( run_id = 5 line_code = 'IC1002' plan_date = '20260106' delay_min = 2 cancelled = '' )
|
||||
( run_id = 6 line_code = 'IC1002' plan_date = '20260106' delay_min = 5 cancelled = 'X' )
|
||||
( run_id = 7 line_code = 'RE2001' plan_date = '20260106' delay_min = 7 cancelled = '' )
|
||||
( run_id = 8 line_code = 'RE2001' plan_date = '20260106' delay_min = 1 cancelled = 'X' )
|
||||
( run_id = 9 line_code = 'IC1003' plan_date = '20260107' delay_min = 4 cancelled = 'X' ) ) ).
|
||||
out->write( sy-dbcnt ).
|
||||
ENDMETHOD.
|
||||
ENDCLASS.
|
||||
13
tasks_gen/eval/G0142/seed/trun.tabl.asabap
Normal file
13
tasks_gen/eval/G0142/seed/trun.tabl.asabap
Normal file
@@ -0,0 +1,13 @@
|
||||
@EndUserText.label : 'Train runs'
|
||||
@AbapCatalog.enhancement.category : #NOT_EXTENSIBLE
|
||||
@AbapCatalog.tableCategory : #TRANSPARENT
|
||||
@AbapCatalog.deliveryClass : #A
|
||||
@AbapCatalog.dataMaintenance : #RESTRICTED
|
||||
define table {{p}}trun {
|
||||
key client : abap.clnt not null;
|
||||
key run_id : abap.int4 not null;
|
||||
line_code : abap.char(6);
|
||||
plan_date : abap.dats;
|
||||
delay_min : abap.int4;
|
||||
cancelled : abap.char(1);
|
||||
}
|
||||
Reference in New Issue
Block a user