I had a linear programming problem where I am optimizing some function

$$f(x) = \sum_{j}x_jq_jp_j - \sum_{i}\left(\sum_{j}x_jq_jC_{ij} \right) c_i$$

Where $q, p, C, c$ are known.

I now want to extend this problem to something where my $p$ vector depends on the $x$ vector.

That is, I want to change the value of $p_j$ depending on the $x_j$ and original $p_j$. In particular, I want to do it in the following way. Let's take the example where:

$x = [1,0,1]^T$ and $p=[30,20,50]^T$

In this case, I would like my vector $p$ to be altered using the following rule: redistribute the % lost in $p$ following the multiplication with $x$ over all other $p$. So in this case, because the second element of $x$ is 0, I want to redistribute the 20/100 lost over the other $p$, such that $p_{new} = [36,0,60]$ (the other elements became 20% higher)

I am not sure how to incorporate this logic into my linear programming problem.

  • $\begingroup$ Hey, your x variables are binary and you want p = 0 whenever x = 0, and the summation of p values should be the same right? Should it be in linear format? because you can easily model it using multiplications of the binary variable(which is also possible to linearize later)?? $\endgroup$ Commented May 12, 2020 at 14:36
  • $\begingroup$ I don't think I fully follow.. It is indeed true that p=0 when x=0, but summation of x is not the same. Like in the example, initially it was 30+20+50=100, and after it was 36+0+60=96. $\endgroup$
    – BarkingCat
    Commented May 12, 2020 at 14:43
  • $\begingroup$ Never mind, I didn't fully read the question... $\endgroup$ Commented May 12, 2020 at 14:49
  • $\begingroup$ Are you only redistributing when $x_j=0$ (as opposed to when $x_j$ is "small"? In your example, what would $M$ be? You wrote it as if it would be a multiplicand, but it sounds more like a function of the first summation in the objective. $\endgroup$
    – prubin
    Commented May 12, 2020 at 15:58
  • $\begingroup$ Ah yeah you are right. Multiplying by M makes no sense here. So the solution would probably look different.. Indeed we are only redistributing when $x_j=0$ $\endgroup$
    – BarkingCat
    Commented May 12, 2020 at 18:33


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.