# How to make ConstrainedQuadraticModel handle products of non integer variables in the objective?

I have a problem of the following form:

$$\max \sum_i w_i h_i$$

subject to:

$$\forall i \forall j \neq i: x_i + h_i \leq x_j + x_{max}*\delta_{i,j,1}$$

$$\forall i \forall j \neq i: y_i + d_i \leq y_j + y_{max}*\delta_{i,j,2}$$

$$\forall i \forall j \neq i: x_j + h_j \leq x_i + x_{max}*\delta_{i,j,3}$$

$$\forall i \forall j \neq i: y_j + d_j \leq y_i + y_{max}*\delta_{i,j,4}$$

$$\forall i \forall j \neq i: \sum_k \delta_{i,j,k} \leq 3$$

$$0 \leq x_i \leq x_{max}$$

$$0 \leq y_i \leq y_{max}$$

$$0 \leq w_i \leq x_{max}$$

$$0 \leq d_i \leq y_{max}$$

where $x_{max}, y_{max}$ are constants, $\delta_{i,j,k}$ are binary and $x,y,w,d$ are real valued. This problem is simplified however i've been failing to get it into a form that ConstrainedQuadraticModel as by documentation $x$ has to be discrete. If you can think of a way so solve this it would be appreciated, my actual model is a bit more complicated with things being 3d and there being some constraints on placement of the cuboids. If i could be shown how to reformulate my problem as i am more familiar with MILP or modeling languages from mathematical programming.

It is obvious that i could build my own fixed point numbers by adding powers of two multiplied by binary variables into a new variable and use that however i would rather leave such discretization decisions up to the solver as it might do a better job than i do. In addition hybrid solving technologies might actually allow them to treat reals like reals.

## Comments

Ed C(Report)If I were working on this, my first thought would be to go ahead and implement it using the powers of two, fixed-point method you mentioned. I am not aware of any way of directly modeling continuous value optimizations with the D-Wave tools.

I will keep looking and if I come up with anything, I'll post it here.

Hopefully some others in the forum may have some more info.

Ed

Please sign in to leave a comment.