Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Formulating pricing optimization as MILP

I am uncertain whether it is possible to formulate the following problem in a linear fashion or whether i should attempt to optimize it non-linearly.

I wish to find the optimal combination of a fixed fee F and variable price p for a product.

I have a given number of n clients who each want to purchase quantity q_i for which they are willing to pay a total price of w_i.

My objective is to maximize revenue: max sum( F + q_i * p) for all customers i in n

My decision variables are of course F and p and then n binary variables s_i indicating whether a customer is buying or not.

I am having trouble formulating this problem and the constraints in a way to allow for customers not purchasing - some customers have a very low willingness to pay.

There is obviously the constraint F + q_i * p <= w_i but this only holds for the customers buying. I would like to impose something like s_i * (F + q_i * p) <= w_ibut this is clealy not linear.

I hope the above makes sense, and thanks in advance for any help.

like image 525
Ingmar Avatar asked Jun 08 '26 17:06

Ingmar


1 Answers

Let me try again.

We can state the problem as:

 max sum(i,  s(i)*(F+p*q(i))) 
     s(i)*(F+p*q(i)) ≤ w(i)
     for variables s(i) ∈ {0,1}, p ≥ 0, F ≥ 0

This can be linearized as:

 max sum(i, y(i))
     y(i) ≤ F+p*q(i)
     y(i) ≤ s(i)*w(i)
     y(i) ≥ F+p*q(i) - (1-s(i))*M
     for variables s(i) ∈ {0,1}, p ≥ 0, F ≥ 0, y(i) ≥ 0
     with M a large enough constant

Many solvers allow indicator constraints. This will simplify things:

 max sum(i, y(i))
     s(i) = 1 ==> y(i) = F+p*q(i)
     y(i) ≤ s(i)*w(i)  
     for variables s(i) ∈ {0,1}, p ≥ 0, F ≥ 0, y(i) ≥ 0      

or using two indicator constraints::

 max sum(i, y(i))
     s(i) = 1 ==> y(i) = F+p*q(i)
     s(i) = 0 ==> y(i) = 0
     for variables s(i) ∈ {0,1}, p ≥ 0, F ≥ 0, y(i) ∈ [0,w(i)]      
like image 88
Erwin Kalvelagen Avatar answered Jun 11 '26 18:06

Erwin Kalvelagen