Skip to content

WIP: Control LoopSolver entirely through criteria

pipping requested to merge flexible-loopsolver-max into master

These days, it's possible to add termination criteria and output to a LoopSolver through a mechanism referred to as Criteria (a Criterion can track quantities and/or print a summary of them, so that in particular something that just prints information is covered by this general concept).

So far, the LoopSolver has only been extended in this direction, however: It still does a lot of manual termination logic that should really be replaced through criteria as well. @maxka has done a lot of work in this direction and in doing so uncovered that the LoopSolver does quite a few things slightly differently than one would expect: A straight-forward translation of its current termination criteria leads to different criteria than the ones we currently provide as extensions.

First of all, I find it very nice that we're now able to analyse these differences easily. And we might also want to switch to different default termination criteria (a change that clearly should not be backported to a release branch without proper thought and communication).

So what I've done here is just to take the branch flexible-loopsolver-max that's already been around for quite a while without any changes, and turned it into a merge request. I would like to get this work merged because I consider it an improvement and I'd hate to see it continue to accumulate dust and go untested. I'm also interest in comments as to why merging this might be a bad idea. I believe that the work on this branch is in a state where no additional code needs to be written (if that should turn out not to be true, I'd volunteer to write that code), one might only want to squash a few commits, but that is optional clearly optional.

This MR would also put as in a position to get rid of the SolverResult class, which in its current state (a lesson for the future maybe?) I feel does more harm than good. Its members have terrible names. And because it comes with the disclaimer "anything could change any moment" you can't use it any code that you want to continue to work in the future.

Update: There is at least one remaining TODO (with the output precision). I also need to sort out all the merge conflicts.

Merge request reports