Pipeline controller: plan 2 (hard +, error +50 %), backlog throttle, 2 trajectory workers, stop rules, summaries every 50; budget reserve
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1
tasks_gen/train/G1306/spec.md
Normal file
1
tasks_gen/train/G1306/spec.md
Normal file
@@ -0,0 +1 @@
|
||||
Hello, please create the class {{P}}DRONE_CHECKER in package $TMP. The class must be public, final, and have a public constructor without parameters. It must implement the interface {{P}}IF_DRONE_CHECK. The interface {{P}}IF_DRONE_CHECK exists in package $TMP and is active. It has the types TY_REASON (character, length 10), TY_WEIGHT (packed number, length 8, 2 decimals), TY_DISTANCE (packed number, length 8, 2 decimals), TY_SPEED (packed number, length 8, 2 decimals), and TY_PERCENT (integer). It has the constant structure C_REASON with the components OK, PAYLOAD, DISTANCE, WIND, BATTERY, ZONE, and LIGHT. It has one method CHECK with IMPORTING parameters iv_payload TYPE ty_weight, iv_distance TYPE ty_distance, iv_wind_speed TYPE ty_speed, iv_battery TYPE ty_percent, iv_in_zone TYPE abap_bool, iv_daylight TYPE abap_bool, and RETURNING VALUE(rv_reason) TYPE ty_reason. The class must have the public method REQUIRED_BATTERY with IMPORTING iv_distance TYPE {{P}}IF_DRONE_CHECK=>TY_DISTANCE and RETURNING VALUE(rv_percent) TYPE {{P}}IF_DRONE_CHECK=>TY_PERCENT. Do not add other public methods. The payload is in kilograms, the distance in kilometres, the wind speed in metres per second, and the battery charge in percent. The check applies the rules in this sequence and returns the reason of the first rule that fails. If the payload is less than or equal to zero, or greater than 5.00, return PAYLOAD. If the distance is less than or equal to zero, or greater than 20.00, return DISTANCE. If the wind speed is greater than 12.00, return WIND. If the battery charge is less than the charge that the flight needs, return BATTERY. If iv_in_zone is abap_false, return ZONE. If iv_daylight is abap_false, return LIGHT. Else return OK. The charge that a flight needs is the result of REQUIRED_BATTERY. If the distance is less than or equal to zero, the result is 0. Else the result is 2 percent for each started kilometre plus a reserve of 10 percent. A started kilometre counts as a full kilometre. The release target is SAP_BASIS 816 (ABAP Platform 2025). Follow Clean ABAP. Keep the method length below 40 statements. Do not use global variables. Do not write comments that restate the code. Do not change {{P}}IF_DRONE_CHECK. The class must be active and have no syntax error. The hidden tests must pass. Write your own ABAP Unit tests for the class.
|
||||
Reference in New Issue
Block a user