I am looking to create an algorithm to minimize an N dimensional problem. I am unsure how to write it in its generic form, so I will show it in 1, 2 and 3 dimensions Minimize $ \sum_{i} x_i\left [ f\left ( w_i\right )-H \right ], $
Constrained by$ \sum_{I} x_i \left (w_i - R \right) \le 0.01,$
Where $f\left (w\right)\left\{\begin{matrix} 0& w=0\\ 1& w>0 \end{matrix}\right.$
$0 <R\le1,$
$0 <H\le 1,$
$x \in \mathbb{R}^{+},$
$w \in \mathbb{R}^{+},$
In 2D Minimize $ \sum_{i}\sum_{j} x_{1i}x_{2j}\left [ f\left ( w_{ij}\right )-H \right ], $
Constrained by$ \sum_{i}\sum_{j} x_{1i }x_{2j}\left (w_{ij} - R \right) \le 0.01,$
And 3D Minimize $ \sum_{i}\sum_{j}\sum_{k}x_{1i}x_{2j}x_{3k}\left [ f\left ( w_{ijk}\right )-H \right ], $
Constrained by$ \sum_{i}\sum_{j}\sum_{k} x_{1i }x_{2j}x_{3k}\left (w_{ijk} - R \right) \le 0.01,$
The values of R, H and w are all known, so we are solving for x. The first problem I am looking to solve with this is actually in 5D, with each sum over 19. In 1D this looks to me like a basic branch and bounds problem akin to the regularly used example of the knapsack problem, however the unknowns here are all real rather than integer and I'm unsure of how this would generalise to multiple dimensions. Any pointers for literature to read or algorithms to try would be massively appreciated.
To clarify the problem, in case my notation is iffy, I am a physicist and a bit rusty on standard maths notation, expanding the 2D example with
$ w= \begin{bmatrix} 5 & 2\\ 0& 0 \end{bmatrix} $
$R=0.95$
Gives for the constraint
$4.05x_{11}x_{21}+1.05x_{11}x_{22}-0.95x_{12}x_{21}-0.95x_{12}x_{22}\le0.01$