Multivariable piecewise function optimization

263 Views Asked by At

So, don't even ask me where did I get this from, but I have a function of around 15 variables, that is piece-wise defined, in the sense that some of those 15 variables "divide" the domain, so that in each part of it (the domain) the formula differs.

It looks something like this:

x1 > x2 and x5 > 1 => f1(x1, x2, ... x15)

x2/x3 < x4 and x5 > 1 => f2(x1, x2, ... x15)

and so on... (around 6 pieces of the function)

Now, I would like to find minimums of this function - and, not only that, but with respect to only 5 of the variables... I know, it sounds crazy.

Anyway, I figured to do some kind of partial gradient descent (in Python): basically, I thought of only trying to approach some potential minimum by subtracting only that part of the gradient which depends on the variables in question.

On the hard note: some of the variables are binary, some are integers, some are in the interval of [0,1]. I was trying to convert the problem to an unconstrained linear optimization problem, but didn't have much success... Should I just abort this mission (again, don't even start to ask what is all this about), or is there somebody who can maybe see a way out?

Thanks in advance!