I have a function that takes in a number of input parameters and returns a single result
def objective(a, b, c, d, e, f):
...
return result
I would like to find the values of a, b, and c within certain ranges that maximize result, while keeping d, e, and f constant.
I have been browsing around to understand how scipy.optimize.minimize works, but I am not sure I get how I could achieve this.
What I don't understand how to do is:
- How to pass the constraints for a, b, and c separately (say, a needs to be within [-1, 0], b needs to be within [0, 1], etc.)
- How to make sure d, e, and f are kept exogenous to the maximization exercise (i.e. they are not flexed) - and I suppose conversely, how to instruct the minimize function to flex a, b, and c.