Courseplay/CourseGenerator

[Feature] even/uneven rowskipping pattern

Closed this issue ยท 6 comments

What is the problem this feature/enhancement solves?
I like skipping rows with certain implements to have tighter turns on my headlands, or runoff area.
I also like running my tools from the left side to the right in the classic up/down pattern, so I can run multiple tools of different width in unison if I calculate the proper applied square meters per second, adjusted with the driven speed, and keep proper separation when starting.
But when skipping rows, a tractor goes up the field, down, and then perhaps a few more times up and down.
This is impractical when running multiple tools of different widths since they'll then collide.

afbeelding

Describe the solution you'd like

I would like a rowskipping method that consistently goes forward in a predictable fashion so I can start a second tractor doing a different job.
I would call it something like immediate backward skipping or even-uneven skipping.

In the image below a tractor can drive over 11 lanes with a consistant forward movement within the lanes and minimal backmovement.
I call it 2/3 skipping mode.
There are three business rules for this skipping mode:

  1. Skip backwards with an even number of rows if able
  2. If not possible, skip forward with backwards skip width +1 row.
  3. Repeat step 1 untill at the edge of the field.
  4. somehow figure out what to do with the last two rows that might or might not be there.
    afbeelding

This rowskipping mode allows for consistent and predictable skipsizes, and therefore should be easyer to set up your headlands.
It should also allow you to work with multiple different kinds of tools at once on thesame field since it's easyer to space tools appart in this method.
even/uneven skipping is possible for every N rows with an N/N+1 pattern if N > 2.

A clear and concise description of what you want to happen.

Describe alternatives you've considered

In theory, having any given amount of rows, willing to skip forward any given amounth and any other amounth back at maximum, and a another amounth miminum to make tight turns on headlands, this is just a graph problem.

afbeelding
In this graph every node is the index of a row in the field, and it's connected to any of its neighbours that it is allowed to visit in theory.
This means any node between a minimal distance and a maximum distance from any other node gets connected.
Then we could weight all the edges of the graph by making going back cheap, and going forward expensive.
Then it should be possible to employ a graph walking algorithm to walk the entire graph as if it was the travelling salesman problem towards the endpoint.

This can be done and would probably yield slightly better results for the beginning and end of the map, but it's far more complex than is actually needed I think.

Have you tried the racetrack pattern?

I think I did.
That's the pattern with lines up on one side, and down on the other side, zero-ing in on the middle right?
There all tractors have to drive over the headland all the way to the other side of the field for the next swath, do they not?
That adds quite a lot of driving to line up for the next row which is time not spent doing effective work.

Nope, that's pretty much what you describe, only currently it always skips 4 rows:

--- A racetrack (circular) pattern
-- Circular mode: the area is split into multiple blocks which are then worked one by one. Work in each
-- block starts around the middle, skipping a maximum of four rows to avoid 180 turns and working the block in
-- a circular, racetrack like pattern.
-- Depending on the number of rows, there may be a few of them left at the end which will need to be worked in a
-- regular up/down pattern
--  ----- 2 ---- > -------     \
--  ----- 4 ---- > -------     |
--  ----- 6 ---- > -------     |
--  ----- 8 ---- > -------     | Block 1
--  ----- 1 ---- < -------     |
--  ----- 3 ---- < -------     |
--  ----- 5 ---- < ------      |
--  ----- 7 ---- < -------     /
--  -----10 ---- > -------    \
--  -----12 ---- > -------     |
--  ----- 9 ---- < -------     | Block 2
--  -----11 ---- < -------     /

Okay, that's pretty cool.
I did not know that.
How can I influence the block size though?
Also, would it be possible to have racetrack perform smaller blocks?
--- Block 1 ------- Block2
/------------\/-------------\
1, 4, 2, 5, 3, 6, 9, 7, 10, 8, 11
Is there any documentation about racetrack for this purpose?

Currently, you can't, it'll always skip 4 first, but shouldn't be a problem to make that a parameter. I'm moving this to the new CourseGenerator repository, so we add this to the new version.

In that case, perhaps this could be an alternative pattern generation for racetrack.