Inventory optimization problem.












-1












$begingroup$


I have n products. $(y_1, y_2, ...y_n)$ is my inventory vector. This should last for a certain period.



Assume $m$ transactions will be made in this period.



Each transaction will have only one of these $n$ items (they are substitutional products). The probabilities of purchase of each product are known, $p_1,p_2,p_3,...,p_n.$ They add up to 1.



Revenue given by each product is known $r_1,r_2,...r_n$.



OBJECTIVE



Maximize :- $R_m(y_1, y_2, ...,y_n)$
which is the revenue made in this period, given $m$ purchases are made and given an inventory vector.



Decision variable is obviously the inventory vector.



CONSTRAINT



$y_1+y_2+...+y_n leq C$ [capacity constraint]



How do you approach this problem? It's more tricky than your usual lp problem which is what I'm familiar with. I have done a bit of searching but didn't across similar problems.



Expected revenue for one transaction is just sumproduct of probablities and profits. So we have $m$ transactions and just multiplying by $m$ is wrong since we don't know if the products still remain in inventory by the time we reach $m-th$ transaction (quantity is what we have to decide).










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    what are you asking? what are your own thoughts about how to approach this problem?
    $endgroup$
    – gt6989b
    Jan 1 at 7:13










  • $begingroup$
    Oh i guess I should have written a bit more.. I'll edit
    $endgroup$
    – Goutham
    Jan 1 at 7:24










  • $begingroup$
    Do you mean that if before the initial inventory is $(y_1,y_2,...,y_i,...,y_n)$, it will be $(y_1,y_2,...,y_i-1,...,y_n)$ after the first transaction, or can it be $(y_1,y_2,...,y_i-k,...,y_n)$ and $k$ is also a random variable?
    $endgroup$
    – Patricio
    Jan 1 at 7:50












  • $begingroup$
    No just one would be sold
    $endgroup$
    – Goutham
    Jan 1 at 9:13
















-1












$begingroup$


I have n products. $(y_1, y_2, ...y_n)$ is my inventory vector. This should last for a certain period.



Assume $m$ transactions will be made in this period.



Each transaction will have only one of these $n$ items (they are substitutional products). The probabilities of purchase of each product are known, $p_1,p_2,p_3,...,p_n.$ They add up to 1.



Revenue given by each product is known $r_1,r_2,...r_n$.



OBJECTIVE



Maximize :- $R_m(y_1, y_2, ...,y_n)$
which is the revenue made in this period, given $m$ purchases are made and given an inventory vector.



Decision variable is obviously the inventory vector.



CONSTRAINT



$y_1+y_2+...+y_n leq C$ [capacity constraint]



How do you approach this problem? It's more tricky than your usual lp problem which is what I'm familiar with. I have done a bit of searching but didn't across similar problems.



Expected revenue for one transaction is just sumproduct of probablities and profits. So we have $m$ transactions and just multiplying by $m$ is wrong since we don't know if the products still remain in inventory by the time we reach $m-th$ transaction (quantity is what we have to decide).










share|cite|improve this question











$endgroup$








  • 1




    $begingroup$
    what are you asking? what are your own thoughts about how to approach this problem?
    $endgroup$
    – gt6989b
    Jan 1 at 7:13










  • $begingroup$
    Oh i guess I should have written a bit more.. I'll edit
    $endgroup$
    – Goutham
    Jan 1 at 7:24










  • $begingroup$
    Do you mean that if before the initial inventory is $(y_1,y_2,...,y_i,...,y_n)$, it will be $(y_1,y_2,...,y_i-1,...,y_n)$ after the first transaction, or can it be $(y_1,y_2,...,y_i-k,...,y_n)$ and $k$ is also a random variable?
    $endgroup$
    – Patricio
    Jan 1 at 7:50












  • $begingroup$
    No just one would be sold
    $endgroup$
    – Goutham
    Jan 1 at 9:13














-1












-1








-1





$begingroup$


I have n products. $(y_1, y_2, ...y_n)$ is my inventory vector. This should last for a certain period.



Assume $m$ transactions will be made in this period.



Each transaction will have only one of these $n$ items (they are substitutional products). The probabilities of purchase of each product are known, $p_1,p_2,p_3,...,p_n.$ They add up to 1.



Revenue given by each product is known $r_1,r_2,...r_n$.



OBJECTIVE



Maximize :- $R_m(y_1, y_2, ...,y_n)$
which is the revenue made in this period, given $m$ purchases are made and given an inventory vector.



Decision variable is obviously the inventory vector.



CONSTRAINT



$y_1+y_2+...+y_n leq C$ [capacity constraint]



How do you approach this problem? It's more tricky than your usual lp problem which is what I'm familiar with. I have done a bit of searching but didn't across similar problems.



Expected revenue for one transaction is just sumproduct of probablities and profits. So we have $m$ transactions and just multiplying by $m$ is wrong since we don't know if the products still remain in inventory by the time we reach $m-th$ transaction (quantity is what we have to decide).










share|cite|improve this question











$endgroup$




I have n products. $(y_1, y_2, ...y_n)$ is my inventory vector. This should last for a certain period.



Assume $m$ transactions will be made in this period.



Each transaction will have only one of these $n$ items (they are substitutional products). The probabilities of purchase of each product are known, $p_1,p_2,p_3,...,p_n.$ They add up to 1.



Revenue given by each product is known $r_1,r_2,...r_n$.



OBJECTIVE



Maximize :- $R_m(y_1, y_2, ...,y_n)$
which is the revenue made in this period, given $m$ purchases are made and given an inventory vector.



Decision variable is obviously the inventory vector.



CONSTRAINT



$y_1+y_2+...+y_n leq C$ [capacity constraint]



How do you approach this problem? It's more tricky than your usual lp problem which is what I'm familiar with. I have done a bit of searching but didn't across similar problems.



Expected revenue for one transaction is just sumproduct of probablities and profits. So we have $m$ transactions and just multiplying by $m$ is wrong since we don't know if the products still remain in inventory by the time we reach $m-th$ transaction (quantity is what we have to decide).







optimization dynamic-programming






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Jan 1 at 7:48









amWhy

1




1










asked Jan 1 at 7:01









Goutham Goutham

12




12








  • 1




    $begingroup$
    what are you asking? what are your own thoughts about how to approach this problem?
    $endgroup$
    – gt6989b
    Jan 1 at 7:13










  • $begingroup$
    Oh i guess I should have written a bit more.. I'll edit
    $endgroup$
    – Goutham
    Jan 1 at 7:24










  • $begingroup$
    Do you mean that if before the initial inventory is $(y_1,y_2,...,y_i,...,y_n)$, it will be $(y_1,y_2,...,y_i-1,...,y_n)$ after the first transaction, or can it be $(y_1,y_2,...,y_i-k,...,y_n)$ and $k$ is also a random variable?
    $endgroup$
    – Patricio
    Jan 1 at 7:50












  • $begingroup$
    No just one would be sold
    $endgroup$
    – Goutham
    Jan 1 at 9:13














  • 1




    $begingroup$
    what are you asking? what are your own thoughts about how to approach this problem?
    $endgroup$
    – gt6989b
    Jan 1 at 7:13










  • $begingroup$
    Oh i guess I should have written a bit more.. I'll edit
    $endgroup$
    – Goutham
    Jan 1 at 7:24










  • $begingroup$
    Do you mean that if before the initial inventory is $(y_1,y_2,...,y_i,...,y_n)$, it will be $(y_1,y_2,...,y_i-1,...,y_n)$ after the first transaction, or can it be $(y_1,y_2,...,y_i-k,...,y_n)$ and $k$ is also a random variable?
    $endgroup$
    – Patricio
    Jan 1 at 7:50












  • $begingroup$
    No just one would be sold
    $endgroup$
    – Goutham
    Jan 1 at 9:13








1




1




$begingroup$
what are you asking? what are your own thoughts about how to approach this problem?
$endgroup$
– gt6989b
Jan 1 at 7:13




$begingroup$
what are you asking? what are your own thoughts about how to approach this problem?
$endgroup$
– gt6989b
Jan 1 at 7:13












$begingroup$
Oh i guess I should have written a bit more.. I'll edit
$endgroup$
– Goutham
Jan 1 at 7:24




$begingroup$
Oh i guess I should have written a bit more.. I'll edit
$endgroup$
– Goutham
Jan 1 at 7:24












$begingroup$
Do you mean that if before the initial inventory is $(y_1,y_2,...,y_i,...,y_n)$, it will be $(y_1,y_2,...,y_i-1,...,y_n)$ after the first transaction, or can it be $(y_1,y_2,...,y_i-k,...,y_n)$ and $k$ is also a random variable?
$endgroup$
– Patricio
Jan 1 at 7:50






$begingroup$
Do you mean that if before the initial inventory is $(y_1,y_2,...,y_i,...,y_n)$, it will be $(y_1,y_2,...,y_i-1,...,y_n)$ after the first transaction, or can it be $(y_1,y_2,...,y_i-k,...,y_n)$ and $k$ is also a random variable?
$endgroup$
– Patricio
Jan 1 at 7:50














$begingroup$
No just one would be sold
$endgroup$
– Goutham
Jan 1 at 9:13




$begingroup$
No just one would be sold
$endgroup$
– Goutham
Jan 1 at 9:13










1 Answer
1






active

oldest

votes


















0












$begingroup$

If in each transaction only one unit is sold, I guess your objective function is something like



$$ sum_j^m sum_i^n r_i.p_i·1_{ij},$$



where $1_{ij}$ is an indicator function, that takes value $1$ if after $j$ transactions there is still inventory left for product $i$ and $0$ otherwise. If initially you have $y_i$ units of this particular product, after $j$ transactions you can expect to have $y_i-j·p_i$ units left (because the number of units sold has a binomial distribution). Therefore $1_{ij}=1_{y_i-j·p_i>0},$ the indicator function will take value $1$ if $1y_i-j·p_i>0,$ and $0$ otherwise.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    Thanks a lot. I think I've understood it.
    $endgroup$
    – Goutham
    Jan 1 at 9:11










  • $begingroup$
    The indicator function's boolean expression would have (j-1) though not j right?
    $endgroup$
    – Goutham
    Jan 3 at 11:14










  • $begingroup$
    Yes, you're right
    $endgroup$
    – Patricio
    Jan 4 at 10:49










  • $begingroup$
    Can this function's maxima be actually found using a solver? I used scipy's minimze function in python and it failed. It doesn't seem like a convex function so it can't be done?
    $endgroup$
    – Goutham
    Jan 4 at 11:42











Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3058260%2finventory-optimization-problem%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0












$begingroup$

If in each transaction only one unit is sold, I guess your objective function is something like



$$ sum_j^m sum_i^n r_i.p_i·1_{ij},$$



where $1_{ij}$ is an indicator function, that takes value $1$ if after $j$ transactions there is still inventory left for product $i$ and $0$ otherwise. If initially you have $y_i$ units of this particular product, after $j$ transactions you can expect to have $y_i-j·p_i$ units left (because the number of units sold has a binomial distribution). Therefore $1_{ij}=1_{y_i-j·p_i>0},$ the indicator function will take value $1$ if $1y_i-j·p_i>0,$ and $0$ otherwise.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    Thanks a lot. I think I've understood it.
    $endgroup$
    – Goutham
    Jan 1 at 9:11










  • $begingroup$
    The indicator function's boolean expression would have (j-1) though not j right?
    $endgroup$
    – Goutham
    Jan 3 at 11:14










  • $begingroup$
    Yes, you're right
    $endgroup$
    – Patricio
    Jan 4 at 10:49










  • $begingroup$
    Can this function's maxima be actually found using a solver? I used scipy's minimze function in python and it failed. It doesn't seem like a convex function so it can't be done?
    $endgroup$
    – Goutham
    Jan 4 at 11:42
















0












$begingroup$

If in each transaction only one unit is sold, I guess your objective function is something like



$$ sum_j^m sum_i^n r_i.p_i·1_{ij},$$



where $1_{ij}$ is an indicator function, that takes value $1$ if after $j$ transactions there is still inventory left for product $i$ and $0$ otherwise. If initially you have $y_i$ units of this particular product, after $j$ transactions you can expect to have $y_i-j·p_i$ units left (because the number of units sold has a binomial distribution). Therefore $1_{ij}=1_{y_i-j·p_i>0},$ the indicator function will take value $1$ if $1y_i-j·p_i>0,$ and $0$ otherwise.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    Thanks a lot. I think I've understood it.
    $endgroup$
    – Goutham
    Jan 1 at 9:11










  • $begingroup$
    The indicator function's boolean expression would have (j-1) though not j right?
    $endgroup$
    – Goutham
    Jan 3 at 11:14










  • $begingroup$
    Yes, you're right
    $endgroup$
    – Patricio
    Jan 4 at 10:49










  • $begingroup$
    Can this function's maxima be actually found using a solver? I used scipy's minimze function in python and it failed. It doesn't seem like a convex function so it can't be done?
    $endgroup$
    – Goutham
    Jan 4 at 11:42














0












0








0





$begingroup$

If in each transaction only one unit is sold, I guess your objective function is something like



$$ sum_j^m sum_i^n r_i.p_i·1_{ij},$$



where $1_{ij}$ is an indicator function, that takes value $1$ if after $j$ transactions there is still inventory left for product $i$ and $0$ otherwise. If initially you have $y_i$ units of this particular product, after $j$ transactions you can expect to have $y_i-j·p_i$ units left (because the number of units sold has a binomial distribution). Therefore $1_{ij}=1_{y_i-j·p_i>0},$ the indicator function will take value $1$ if $1y_i-j·p_i>0,$ and $0$ otherwise.






share|cite|improve this answer









$endgroup$



If in each transaction only one unit is sold, I guess your objective function is something like



$$ sum_j^m sum_i^n r_i.p_i·1_{ij},$$



where $1_{ij}$ is an indicator function, that takes value $1$ if after $j$ transactions there is still inventory left for product $i$ and $0$ otherwise. If initially you have $y_i$ units of this particular product, after $j$ transactions you can expect to have $y_i-j·p_i$ units left (because the number of units sold has a binomial distribution). Therefore $1_{ij}=1_{y_i-j·p_i>0},$ the indicator function will take value $1$ if $1y_i-j·p_i>0,$ and $0$ otherwise.







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered Jan 1 at 8:22









PatricioPatricio

3377




3377












  • $begingroup$
    Thanks a lot. I think I've understood it.
    $endgroup$
    – Goutham
    Jan 1 at 9:11










  • $begingroup$
    The indicator function's boolean expression would have (j-1) though not j right?
    $endgroup$
    – Goutham
    Jan 3 at 11:14










  • $begingroup$
    Yes, you're right
    $endgroup$
    – Patricio
    Jan 4 at 10:49










  • $begingroup$
    Can this function's maxima be actually found using a solver? I used scipy's minimze function in python and it failed. It doesn't seem like a convex function so it can't be done?
    $endgroup$
    – Goutham
    Jan 4 at 11:42


















  • $begingroup$
    Thanks a lot. I think I've understood it.
    $endgroup$
    – Goutham
    Jan 1 at 9:11










  • $begingroup$
    The indicator function's boolean expression would have (j-1) though not j right?
    $endgroup$
    – Goutham
    Jan 3 at 11:14










  • $begingroup$
    Yes, you're right
    $endgroup$
    – Patricio
    Jan 4 at 10:49










  • $begingroup$
    Can this function's maxima be actually found using a solver? I used scipy's minimze function in python and it failed. It doesn't seem like a convex function so it can't be done?
    $endgroup$
    – Goutham
    Jan 4 at 11:42
















$begingroup$
Thanks a lot. I think I've understood it.
$endgroup$
– Goutham
Jan 1 at 9:11




$begingroup$
Thanks a lot. I think I've understood it.
$endgroup$
– Goutham
Jan 1 at 9:11












$begingroup$
The indicator function's boolean expression would have (j-1) though not j right?
$endgroup$
– Goutham
Jan 3 at 11:14




$begingroup$
The indicator function's boolean expression would have (j-1) though not j right?
$endgroup$
– Goutham
Jan 3 at 11:14












$begingroup$
Yes, you're right
$endgroup$
– Patricio
Jan 4 at 10:49




$begingroup$
Yes, you're right
$endgroup$
– Patricio
Jan 4 at 10:49












$begingroup$
Can this function's maxima be actually found using a solver? I used scipy's minimze function in python and it failed. It doesn't seem like a convex function so it can't be done?
$endgroup$
– Goutham
Jan 4 at 11:42




$begingroup$
Can this function's maxima be actually found using a solver? I used scipy's minimze function in python and it failed. It doesn't seem like a convex function so it can't be done?
$endgroup$
– Goutham
Jan 4 at 11:42


















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3058260%2finventory-optimization-problem%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Måne

Storängen

VLT Carioca