Closed artofscience closed 2 years ago
Maybe you could construct with Problem
, then copying all MoveLimits
and Bounds
? Might be a little dirty tho
Maybe you could construct with
Problem
, then copying allMoveLimits
andBounds
? Might be a little dirty tho
Not sure. Then you force subproblem to always depend on a problem. maybe some cases you dont have a problem but still want to generate a subproblem.
Maybe we can have all of them as optional arguments and assert only one is present?
def foo(self, problem=None, x_min=None, x_max=None):
assert problem is None ^ (x_min is None or x_max is None)
self.x_min = problem.x_min if problem else x_min
self.x_max = problem.x_max if problem else x_max
Maybe we can have all of them as optional arguments and assert only one is present?
def foo(self, problem=None, x_min=None, x_max=None): assert problem is None ^ (x_min is None or x_max is None) self.x_min = problem.x_min if problem else x_min self.x_max = problem.x_max if problem else x_max
If both are present, both the bounds provided by xmin, xmax and by problem should be considered imo
Now subproblem and problem both have similar bound structure: x_min, x_max. alpha,beta is removed. Would be nice if the subproblem "automatically" takes the bounds of the problem. (this was and is currently not the case)