artofscience / SAOR

Sequential Approximate Optimization Repository
GNU General Public License v3.0
5 stars 1 forks source link

Dev conv criteria plotter #47

Closed Giannis1993 closed 3 years ago

Giannis1993 commented 3 years ago

Boys,

This PR includes 2 main upgrades:

1. The addition of convergence criteria (could be improved in terms of structure, as @MaxvdKolk has previously indicated).
2. The code in `plotter.py` is now able to handle `Mixed` sub-problems and generate contour plots for 2D problems, see 
    classes `Plot2` and `Plot3`.

I know it might be a lot to review, but I worked on them simultaneously, so sorry for that. I would suggest to merge into dev and then improve the features. You can use as an example truss2d.py to check out the new features, as I have not edited the other files yet (e.g. mbb.py) cuz the solver must be finalised first.

One thing I already know needs some polishing is the repetitive code between Plot2 and Plot3 classes, but I was unsure whether its preferable to have ifs in the code to handle both Mixed and non-Mixed sub-problems in a single class, or just handle them separately (as it is now). In any case, let me know what you think. @aatmdelissen @MaxvdKolk @artofscience

MaxvdKolk commented 3 years ago

Took a quick look for now, I think it's OK to merge. There are, as you indicate, some duplicate pieces in the code and the convergence structure can be cleaned up I think. But, to not block your work, I would suggest to merge the current status and we can clean up those aspects later through future PRs.

Most of the plotting/examples can probably made more concise once we know which examples to show in the paper. When those are defined, we can just provide the examples that specifically show the results, so I suppose those files will all become a bit short, possibly with some more documentations etc.