artofscience / SAOR

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

Dev 2nd order problem struct #5

Closed Giannis1993 closed 3 years ago

Giannis1993 commented 3 years ago

@MaxvdKolk Please check RosenbrockMax.py, AbstractResponse.py and AbstractProblem.py to see if I implemented correctly your suggested format (i.e. with one class per response function). If yes, I can proceed by applying the changes to the restl of the problems.


A question I had is what happens to problems like the Vanderplaats beam for which we have stress and displacement constraints. Do you then code a single class per response set (e.g. a single class for stress constraints?

MaxvdKolk commented 3 years ago

A question I had is what happens to problems like the Vanderplaats beam for which we have stress and displacement constraints. Do you then code a single class per response set (e.g. a single class for stress constraints?

I would have to think a bit more about how this can be done nicely and maybe play around with some variations to really see how things fit together. Maybe we can change the current implementation around a bit to better accommodate for those specific, strictly defined problem sets.

On the one hand, for very specific problem definitions, it does not make much sense to split them up. In that case, we might simply provide them as a complete Problem class, without specifically splitting the response functions. However, if both the displacement and stress constraints are separate responses (or at least accessible as separate responses) it would be easy to create a variation of the Vanderplaats beam by swapping the order of the responses, e.g. changing the objective/constraints around. This is somewhat more restricted when provided as a single class.

So, for more generic responses, e.g. a volume constraint, a (soft) maximum, an average, etc, it is nicest to provide these as a Response. In that case they can be easily combined with any already existing set of responses that are implemented.

aatmdelissen commented 3 years ago

To add to Max's comments, it seems Response and Problem are doing the same thing. They return information on function value and derivatives. Just parsed differently (list vs single value). Is there anything preventing us to use only Problem class? And for separable problems, you could use sub- Problem classes.