Skip to content

Plan Field Work#

This procedure makes a plan for the fields with the Run Optimizer, reads the result and drives the plan of one field in the simulation. It also runs the optimizer from the command line and reads the result files.

Before You Start#

  • Build the packaged game. Refer to Build the Game.
  • Do the commands in the repository root.
  • Read the scenarios of the Optimizer model if you want the equations.

CAUTION

Run only one instance of the game at a time. Two instances can use all the memory of the GPU.

The optimizer has three scenarios.

Scenario Result for Each Field Colour of the Map
Field Operation Plan Pass direction, passes, hours, fuel and the position in the route. The position in the route.
Traction and Fuel Setup Ballast, gear, speed, slip, fuel and cost. The cost for each hectare.
Harvest Timing against Rain Start and end of the harvest, grain moisture and loss. The start hour.

Make a Plan in the Menu#

  1. Start the game without options.

    Packaged/Linux/Acres.sh
    

    Expected Result

    The game shows the menu.

  2. Select Run Optimizer.

    Expected Result

    The configuration page opens. It has the tabs Optimize, Fields, Weather, Tractor and Additional.

  3. On the tab Optimize, select the scenario Traction and Fuel Setup.

  4. Select the field operation, for example Chisel Plow (Maxxum 2.7 m).

  5. Set the limits of the search: Ballast Available, Minimum Wheel Slip, Maximum Wheel Slip and Maximum Field Speed.

  6. Set the costs: Diesel Price and Operator + Machine Cost.

  7. If necessary, change the crop, the soil or the wetness of a field on the tab Fields.

  8. Select Run.

    Expected Result

    The result page opens in less than one second. The text below the table shows the time and the output folder.

    Solved in 0.29 s. Files: <repository>/Packaged/Linux/Acres/Saved/Optimizer/20261002-030448-traction
    

Note

The scenario Harvest Timing against Rain uses the weather of the tab Weather. Set a rain event there before you select Run.

Read the Result#

The result page of the scenario Traction and Fuel Setup

  1. Read the summary at the top right. It gives the operation and the totals or the means of all fields.

    Expected Result

    For the chisel plow with the default settings, the summary contains these lines.

    Chisel plow (5 cm points) (Maxxum 2.7 m), 2.7 m working width, 18 cm deep
    Mean 12.3 L/ha, $44/ha (diesel $1.00/L + $60/h) over 53 fields;
    slip band 8–15 %, 15 % torque reserve, ballast up to 1500 kg
    
  2. Read the map. Green is the good end of the colour scale and red is the poor end.

    Item on the Map Meaning
    Colour of a field The value of the scenario for that field.
    Grey field The field has no result. The table gives the cause in the column Note.
    Label of a field The field identifier and the key value, for example 8.9 L/ha.
    Yellow outline The selected field.
    Orange line The road route of the scenario Field Operation Plan. The square is the start.
  3. Select a field on the map or a row in the table.

    Expected Result

    The text below the table shows the setup of the field. For F54 it is this text.

    F54  corn 0.66 ha, soil Cm (fine), wetness 0.50 (θ 0.287).
    Setup: gear F9 at 1782 rpm, 7.5 km/h, ballast +0 kg, slip 10.1 %, draft 33.6 kN,
    engine 94 kW, 24.1 L/h, 14.0 L/ha ($49/ha), 1.72 ha/h.
    Passes 33 at 90° (turns 32), 0.61 h, 12.4 L.
    
  4. Read the column Slip of the table. A value outside the slip band shows that the search found no setup in the band for that field.

    Expected Result

    With the default settings, the 18 fields on the soils RcA, RoB and TmA have a slip of 4.5 % to 4.7 %. This is below the band of 8 % to 15 %. The 35 fields on the soil Cm have a slip of 10.1 %.

  5. Read the column Note of the scenarios Field Operation Plan and Harvest Timing against Rain. It gives the cause when a field has no result.

Visualize the Plan of One Field#

  1. Select a field with a setup on the result page.

  2. Select Visualize F... The button shows the identifier of the selected field.

    Expected Result

    A path replay session starts at the first pass of the field. The Maxxum has the ballast and the implement of the plan. The log contains these lines for F45.

    ACRES_OPTIMIZER_VISUALIZE F45 <repository>/Packaged/Linux/Acres/Saved/Optimizer/20261002-033822-traction/visualize-F45.csv
    ACRES_REPLAY_READY rows=515 duration=374.1 s path=1 mode=path source=<the same file>
    
  3. Monitor the speed on the HUD during the first pass.

  4. Stop the session with Esc and End Simulation.

  5. Compare the session log with the plan. Session Log gives the columns of tractor.csv.

    import csv
    
    rows = list(csv.DictReader(open("tractor.csv")))
    work = [r for r in rows if r["implement_in_soil"] == "1"]
    last = work[-1]
    print(last["speed_mps"], last["rpm"], last["gear"],
          last["implement_draft_n"], last["implement_depth_m"], last["rl_slip"])
    

    Expected Result

    For F45 with the chisel plow and the default settings, the last row of a test on 2026-10-02 was this. The test stopped after 824 s.

    0.0793 602.7 11 16780.7 0.2313 0.0229
    

    The plan for this field is 2.917 m/s, 1576 rpm, gear 11, 22.7 kN and 0.18 m.

CAUTION

Do not use the numbers of a plan before you compare them with a path replay. In the test above, the Maxxum did not keep the planned speed with the chisel plow. The current replay stops after 10 s below 0.15 m/s with a target above 0.5 m/s. It reports stalled, applies the brake and requests an implement lift. The plan has failed this replay test. Optimizer gives the measured values.

Note

For the scenario Harvest Timing against Rain, the session starts at the planned hour of the field. The rain event moves with the clock.

Run the Optimizer from the Command Line#

The menu has test options that set the parameters and select Run without a mouse. Menu Settings lists the identifiers of the parameters.

  1. Run the scenario Traction and Fuel Setup without a window.

    Packaged/Linux/Acres.sh -RenderOffscreen -MenuOpen=optimizer \
      "-MenuSet=opt:scenario=traction;opt:operation=chisel" \
      -MenuRunNow -MenuShot=/tmp/optimizer.png -MenuExitAfterShot
    

    Expected Result

    The game stops after approximately 10 seconds. The log contains one line with the summary and the output folder. This page shows the line on several lines.

    LogTemp: Display: ACRES_OPTIMIZER Traction and Fuel Setup
      | Chisel plow (5 cm points) (Maxxum 2.7 m), 2.7 m working width, 18 cm deep
      | Mean 12.3 L/ha, $44/ha (diesel $1.00/L + $60/h) over 53 fields;
        slip band 8–15 %, 15 % torque reserve, ballast up to 1500 kg
      | ...
      | /home/user/ACRES/Packaged/Linux/Acres/Saved/Optimizer/20261002-030448-traction
    

    The file /tmp/optimizer.png shows the result page.

  2. Run the scenario Field Operation Plan for the empty fields.

    Packaged/Linux/Acres.sh -RenderOffscreen -MenuOpen=optimizer \
      "-MenuSet=opt:scenario=plan;opt:operation=chisel;opt:fields=empty" \
      -MenuRunNow -MenuShot=/tmp/optimizer.png -MenuExitAfterShot
    

    Expected Result

    LogTemp: Display: ACRES_OPTIMIZER Field Operation Plan
      | Chisel plow (5 cm points) (Maxxum 2.7 m), 2.7 m working width
      | 4 fields, 2.5 ha in 2.0 h (1.9 h in field, 1.3 km road), fuel 40 L (15.9 L/ha)
      | Pass headings minimize passes + 4.7 m-radius U-turns; headland 3 laps;
        start and route from the Beck lot
      | ...
    
  3. Run the scenario Harvest Timing against Rain with the rain event of the Weather tab.

    Packaged/Linux/Acres.sh -RenderOffscreen -MenuOpen=optimizer \
      "-MenuSet=opt:scenario=harvest;env:rain.enabled=1" \
      -MenuRunNow -MenuShot=/tmp/optimizer.png -MenuExitAfterShot
    

    Expected Result

    LogTemp: Display: ACRES_OPTIMIZER Harvest Timing against Rain
      | Rain-aware: 48 of 49 fields in 7 days, 0 h on soil wetter than field capacity,
        grain loss 0.8 %, drying shrink 4.5 %
      | Start-now baseline (stop only while raining): 48 fields, 0 h rutting wet soil,
        grain loss 0.8 %, drying shrink 4.5 %.  Rain: 10 mm over 1 h
      | ...
    
  4. Add -MenuOptVisualize=<field> to start the path replay of one field after the screenshot. Do not use -MenuExitAfterShot with it.

    Packaged/Linux/Acres.sh -MenuOpen=optimizer \
      "-MenuSet=opt:scenario=traction;opt:operation=chisel" \
      -MenuRunNow -MenuShot=/tmp/optimizer.png -MenuOptVisualize=45
    
Option Function
-MenuOpen=optimizer Opens the configuration page of the optimizer.
-MenuSet=id=value;id=value Sets parameters. Put the option in quotation marks, because the shell reads the semicolon.
-MenuRunNow Selects Run at the start.
-MenuShot=<file> Writes a screenshot after 6 seconds. The other test options need it.
-MenuExitAfterShot Stops the game 3 seconds after the screenshot.
-MenuOptVisualize=<field> Selects Visualize for the field number 3 seconds after the screenshot.

Read the Output Files#

Each run writes a folder Packaged/Linux/Acres/Saved/Optimizer/<stamp>-<scenario>.

File Contents
fields.csv One row for each field: soil, setup, coverage, route and harvest values.
fields.geojson The outlines of the fields with the value and the label of the map.
result.json The scenario, the title and the summary lines.
visualize-F<id>.csv The replay path of one field. Visualize writes it.
  1. Find the folder of the last run.

    ls -t Packaged/Linux/Acres/Saved/Optimizer | head -1
    

    Expected Result

    20261002-030448-traction
    
  2. Read the table of the fields.

    import csv
    import json
    from pathlib import Path
    
    runs = Path("Packaged/Linux/Acres/Saved/Optimizer")
    run = sorted(runs.iterdir())[-1]
    rows = list(csv.DictReader(open(run / "fields.csv")))
    print(run.name, len(rows))
    for row in rows[:3]:
        in_band = 0.08 <= float(row["slip"]) <= 0.15
        print(row["field"], row["soil"], row["gear"], row["speed_kmh"],
              row["slip"], row["fuel_l_ha"], row["cost_per_ha"], in_band)
    

    Expected Result

    20261002-030448-traction 53
    F01 RcA 11 10.5 0.047 8.90 33.80 False
    F02 Cm 9 7.5 0.101 13.98 48.84 True
    F03 Cm 9 7.5 0.101 13.98 48.84 True
    

    The last column shows if the slip is in the slip band of 8 % to 15 %. The file has no column for this condition.

  3. Read the summary.

    raw = (run / "result.json").read_bytes()
    encoding = "utf-16" if raw[:2] in (b"\xff\xfe", b"\xfe\xff") else "utf-8"
    text = raw.decode(encoding).replace("\\'", "'")
    result = json.loads(text)
    print(result["schema"], result["scenario"], result["value"])
    

    Expected Result

    acres-optimizer-1 traction $/ha
    

    The example corrects two properties of the file that a JSON parser does not accept.

    • The game writes the file as UTF-16 when a summary line has a character outside ASCII.
    • The game writes an apostrophe in a summary line as \'.
  4. Open fields.geojson in a GIS program to see the fields on a map.

Note

The coordinates of fields.geojson are NAD83(HARN) latitude and longitude. They differ from WGS84 by approximately 1.3 m.

Next Steps#

  • Optimizer gives the equations, the parameters and the limits of each scenario.
  • Replay describes the path replay that Visualize starts.
  • Set Soil and Weather shows how to change the soil and the rain that the plans use.
  • Menu Settings lists the parameters opt:*.