Categorize my constraint

41 Views Asked by At

Is the following constraint linear?

$$\lambda_1=\alpha_1 q^2+\varepsilon$$

$\lambda$ is a 1x8760 vector which is also a decision variable.

$\alpha$ is just a number, which is also a decision variable.

$q$ is a 1x8760 vector, which is an input. This means all values in the $q$ vector is known. However all 8760 values are different.

$\varepsilon$ is an input, which is constant.

I am trying to determine if my problem is linear programming, but i am unsure as q is squared.

2

There are 2 best solutions below

6
On

I interpret $q^2$ as element wise squaring.

Then yes, it is linear.

If it helps, you can let $q^2=p$ and every entry of $p$ is known.

0
On

Your program is linear. You mention that $q$ is a known input vector. Thus, $x = q^2$ is also known and it will be a vector. Then you will have $ \lambda = \alpha x + \epsilon $, where basically $\alpha$ is the only parameter that you optimize.

Note I have understood $x = q^2$ as a pointwise product, i.e., $x = q \odot q$.