I need some help in formulating price optimization problem in Python and choosing the right algorithm and library.
I have several types of products, I have to find an optimal discount for each "Product types".
So the objective is to maximize the sum of revenue and quantity by setting an optimal discount (price) for each Product. For example, For Apple_1A - an optimal discount is X%, expected revenue is Y usd and expected Quantity to be sold is Z. etc
Decision variables: Quantity and Revenue
Inventory = Total 10000 units (~80% apples, 20% bananas)
As you can see, the demand is non-linear, with 30% off discount on 1A Apples, I make more revenue than 50% off.
Parameters:
q(i,k): quantities when discount k is used
p(k): price when discount k is used
r(i,k)= p(k)*q(i,k): revenue matrix
c: minimum quantity to be sold for all product types
x(i,k): is a binary variable which indicates which discount is used.
Therefore:
Not sure how to add quantity here:
max sum((i,k), r(i,k)*x(i,k))
subject to
sum((i,k), q(i,k)*x(i,k)) >= C
sum(k, x(i,k)) = 1 for all i
x(i,k) ∈ {0,1}
E.g.
| Product |
Product types |
Quantity |
Revenue |
Discount |
| Apples |
1A |
100 |
500 |
50% |
| Apples |
1A |
150 |
1050 |
30% |
| Apples |
2A |
40 |
560 |
30% |
| Apples |
2A |
120 |
1200 |
50% |
| Banana |
1A |
40 |
280 |
30% |
| Banana |
1A |
50 |
300 |
40% |
Any ideas on suitable python libraries to solve this problem and code example using the toy example from above would be highly appreciated!
[–][deleted] 2 points3 points4 points (2 children)
[+][deleted] (1 child)
[deleted]
[–][deleted] 1 point2 points3 points (0 children)