heat/cool prediction: fixed embarassing off-by-1 bug! removed the "margin of error" config convering up this bug.

This commit is contained in:
Louis Hong
2024-10-29 00:47:36 -07:00
parent 475cb1c1f0
commit 1e41e5733d
6 changed files with 79 additions and 65 deletions

View File

@@ -78,6 +78,13 @@ public class HeatActionSolver
{
/**
* <b>Warning:</b> this method prefers overshooting goal. For example, if goal is 957,
* it will return index that reaches >957.<br>
* This may be desirable if we're aiming to heat over range minimum,
* but undesirable when cooling below range maximum; make sure to -1 the index if so.
*
*
*
* @param goal the desired heat destination
* @param init_dx1 initial speed of heating/cooling. currently 7 for heat/cool, 27 for dunk/quench.
* @param dx2_offset bonus acceleration. currently, 0 for heat/cool, 2 for dunk/quench.