QMarket optimization overhaul; Stepper oscillation
- pricing retries now has a "first" tries and a regular retries. The first one typically needs more iterations because the initial value is arbitrary, while later ones have a decent first guess in the previous period's value. - Removed obsolete 'optimizer' variable (made obsolete when optimization moved into QMarket itself in the eris optimizer design overhaul). - The Stepper used for adjusting the price is now public, so that its properties can be changed by the QMarket creator. - The default Stepper now has a minimum step size of 1/65536. The previous minimum of machine epsilon was rediculously small (and required a lot of steps to get away from). - Stepper now has a variable for checking whether the steps are oscillating back and forth at the minimum step size. - QMarket uses oscillation detecting to detect that the price is close enough to the optimum and thus more price adjustments aren't needed. - Various previously-const public attributes of Stepper are now non-const so that Stepper users can change the Stepper behaviour. This makes Stepper-using classes (like QMarket) easier: they can just expose the Stepper instead of needing to pass through a bunch of construction-time Stepper parameters.
Showing with 125 additions and 47 deletions