Skip to main content
added 2 characters in body
Source Link
Nikos Kazazakis
  • 12.3k
  • 18
  • 59

Consider the notation and objective below for this sequential resource allocation problem:

Allocation channels $i \in (1, 2)$

Spend/Cost timestep i channel j: $C_{i, j}$

Total resource: $B$

Horizon: $H$

Max allocation jump between time-steps: $1.5$

Minimum allocation: $min\_total\_channel_i$

target ROI: $targetvalue$

planned spend over horizon: $P = (C_{1, 1}, C_{1, 2}.....C_{H, 1}, C_{H, 2})$

We have a time-variant predictor for the amount of sales on a specific day. For a certain timestep it takes the following form:

$sales_{i, j} = coeff_{i, j} * spend_{i, j}^{saturation_{{i, j}}}$

where as $i$ denotes the timestep and $j$ denotes the channel.

The following holds: $0 \le saturation_{i ,j} \le 1$ , notice that this curve exhibits diminishing marginal returns and is concave when minimizing thus convex when maximizing.

The total sales over the horizon can then be expressed as:

$totalsales(P) = \sum_{i}\sum_{j} coeff_{i, j} * spend_{i, j}^{saturation_{{i, j}}}$

The aim of this optimization task is to maximize the spend whilst maintaining a target ROI (return on investment). We also have some constraints we want our solution to adhere to such as minimum spend per channel, total budget constraint, max jump between the budgeting between one day and another.

We construct the following optimization problem:

\begin{align} \max_{C_{i, j}}\sum_{i}\sum_{j}C_{i, j} \\ s.t \sum_{i}\sum_{j} C_{i, j} &\le B \quad (Total-budget) \\ C_{i, j} & \ge 0.4 * C_{i - 1, j} \quad (Max-increment) \\ C_{i, j} & \ge 0.4 * C_{i + 1, j} \quad (Max-decrement) \\ \sum_{i}C_{i, j} & \ge min\_total\_spend\_channel_j \quad (Channel-budget) \\ \frac{totalsales(P)}{\sum_{i}\sum_{j}C_{i, j}} & \ge targetvalue \quad (ROI) \end{align}

This is a toy example and not the real-life example I am working on. In the real example, the sales predictor has a more complex functional shape looking like this:

$sales_{i} = \sum_{j}coeff_{i, j}*hill_saturation (adstock(C_{i, j})$$sales_{i} = \sum_{j}coeff_{i, j}*hill\_saturation (adstock(C_{i, j}))$

where as $adstock(C_{i, j}) = C_{i, j} + \lambda C_{i - 1, j}$ where $0 <= \lambda <= 1$

and

$hill\_saturation(C_{i, j}) = \frac{C_{i, j}^{\alpha}}{C_{i, j}^{\alpha} + \gamma^{\alpha}}$

Thus it exhibits a hill-type of function introducing all sorts of possible local minima. However, in the general case for my datasets, this function will be convex considering a maximization problem.

What I am wondering is if this is a good way of formulating this type of problem, particularly the formulation of the objective being maximizing the cost and putting the ROI objective as a constraint. I assume this could lead to some issues when picking up a solver. Maybe maximizing sales as an objective and keeping the constraint would be better.

I have been playing around with some python solvers without a good deal of luck(CPLEX doesn't work(DCP-violated), SLSQP and trust-constr gets stuck in local minima, and the random search takes ages. what would be a good solver for this type of problem - plus point for one with implementations that are free in python/API?

Consider the notation and objective below for this sequential resource allocation problem:

Allocation channels $i \in (1, 2)$

Spend/Cost timestep i channel j: $C_{i, j}$

Total resource: $B$

Horizon: $H$

Max allocation jump between time-steps: $1.5$

Minimum allocation: $min\_total\_channel_i$

target ROI: $targetvalue$

planned spend over horizon: $P = (C_{1, 1}, C_{1, 2}.....C_{H, 1}, C_{H, 2})$

We have a time-variant predictor for the amount of sales on a specific day. For a certain timestep it takes the following form:

$sales_{i, j} = coeff_{i, j} * spend_{i, j}^{saturation_{{i, j}}}$

where as $i$ denotes the timestep and $j$ denotes the channel.

The following holds: $0 \le saturation_{i ,j} \le 1$ , notice that this curve exhibits diminishing marginal returns and is concave when minimizing thus convex when maximizing.

The total sales over the horizon can then be expressed as:

$totalsales(P) = \sum_{i}\sum_{j} coeff_{i, j} * spend_{i, j}^{saturation_{{i, j}}}$

The aim of this optimization task is to maximize the spend whilst maintaining a target ROI (return on investment). We also have some constraints we want our solution to adhere to such as minimum spend per channel, total budget constraint, max jump between the budgeting between one day and another.

We construct the following optimization problem:

\begin{align} \max_{C_{i, j}}\sum_{i}\sum_{j}C_{i, j} \\ s.t \sum_{i}\sum_{j} C_{i, j} &\le B \quad (Total-budget) \\ C_{i, j} & \ge 0.4 * C_{i - 1, j} \quad (Max-increment) \\ C_{i, j} & \ge 0.4 * C_{i + 1, j} \quad (Max-decrement) \\ \sum_{i}C_{i, j} & \ge min\_total\_spend\_channel_j \quad (Channel-budget) \\ \frac{totalsales(P)}{\sum_{i}\sum_{j}C_{i, j}} & \ge targetvalue \quad (ROI) \end{align}

This is a toy example and not the real-life example I am working on. In the real example, the sales predictor has a more complex functional shape looking like this:

$sales_{i} = \sum_{j}coeff_{i, j}*hill_saturation (adstock(C_{i, j})$

where as $adstock(C_{i, j}) = C_{i, j} + \lambda C_{i - 1, j}$ where $0 <= \lambda <= 1$

and

$hill\_saturation(C_{i, j}) = \frac{C_{i, j}^{\alpha}}{C_{i, j}^{\alpha} + \gamma^{\alpha}}$

Thus it exhibits a hill-type of function introducing all sorts of possible local minima. However, in the general case for my datasets, this function will be convex considering a maximization problem.

What I am wondering is if this is a good way of formulating this type of problem, particularly the formulation of the objective being maximizing the cost and putting the ROI objective as a constraint. I assume this could lead to some issues when picking up a solver. Maybe maximizing sales as an objective and keeping the constraint would be better.

I have been playing around with some python solvers without a good deal of luck(CPLEX doesn't work(DCP-violated), SLSQP and trust-constr gets stuck in local minima, and the random search takes ages. what would be a good solver for this type of problem - plus point for one with implementations that are free in python/API?

Consider the notation and objective below for this sequential resource allocation problem:

Allocation channels $i \in (1, 2)$

Spend/Cost timestep i channel j: $C_{i, j}$

Total resource: $B$

Horizon: $H$

Max allocation jump between time-steps: $1.5$

Minimum allocation: $min\_total\_channel_i$

target ROI: $targetvalue$

planned spend over horizon: $P = (C_{1, 1}, C_{1, 2}.....C_{H, 1}, C_{H, 2})$

We have a time-variant predictor for the amount of sales on a specific day. For a certain timestep it takes the following form:

$sales_{i, j} = coeff_{i, j} * spend_{i, j}^{saturation_{{i, j}}}$

where as $i$ denotes the timestep and $j$ denotes the channel.

The following holds: $0 \le saturation_{i ,j} \le 1$ , notice that this curve exhibits diminishing marginal returns and is concave when minimizing thus convex when maximizing.

The total sales over the horizon can then be expressed as:

$totalsales(P) = \sum_{i}\sum_{j} coeff_{i, j} * spend_{i, j}^{saturation_{{i, j}}}$

The aim of this optimization task is to maximize the spend whilst maintaining a target ROI (return on investment). We also have some constraints we want our solution to adhere to such as minimum spend per channel, total budget constraint, max jump between the budgeting between one day and another.

We construct the following optimization problem:

\begin{align} \max_{C_{i, j}}\sum_{i}\sum_{j}C_{i, j} \\ s.t \sum_{i}\sum_{j} C_{i, j} &\le B \quad (Total-budget) \\ C_{i, j} & \ge 0.4 * C_{i - 1, j} \quad (Max-increment) \\ C_{i, j} & \ge 0.4 * C_{i + 1, j} \quad (Max-decrement) \\ \sum_{i}C_{i, j} & \ge min\_total\_spend\_channel_j \quad (Channel-budget) \\ \frac{totalsales(P)}{\sum_{i}\sum_{j}C_{i, j}} & \ge targetvalue \quad (ROI) \end{align}

This is a toy example and not the real-life example I am working on. In the real example, the sales predictor has a more complex functional shape looking like this:

$sales_{i} = \sum_{j}coeff_{i, j}*hill\_saturation (adstock(C_{i, j}))$

where as $adstock(C_{i, j}) = C_{i, j} + \lambda C_{i - 1, j}$ where $0 <= \lambda <= 1$

and

$hill\_saturation(C_{i, j}) = \frac{C_{i, j}^{\alpha}}{C_{i, j}^{\alpha} + \gamma^{\alpha}}$

Thus it exhibits a hill-type of function introducing all sorts of possible local minima. However, in the general case for my datasets, this function will be convex considering a maximization problem.

What I am wondering is if this is a good way of formulating this type of problem, particularly the formulation of the objective being maximizing the cost and putting the ROI objective as a constraint. I assume this could lead to some issues when picking up a solver. Maybe maximizing sales as an objective and keeping the constraint would be better.

I have been playing around with some python solvers without a good deal of luck(CPLEX doesn't work(DCP-violated), SLSQP and trust-constr gets stuck in local minima, and the random search takes ages. what would be a good solver for this type of problem - plus point for one with implementations that are free in python/API?

added 27 characters in body
Source Link
EhsanK
  • 5.9k
  • 3
  • 19
  • 54

Consider the notation and objective below for this sequentailsequential resource allocation problem:

Allocation channels $i \in (1, 2)$

Spend/Cost timestep i channel j: $C_{i, j}$

Total resource: $B$

Horizon: $H$

Max allocation jump between time-steps: $1.5$

Minimum allocation: $min\_total\_channel_i$

target ROI: $targetvalue$

planned spend over horizon: $P = (C_{1, 1}, C_{1, 2}.....C_{H, 1}, C_{H, 2})$

We have a time-variant predictor for the amount of sales on a specific day. For a certain timestep it takes the following form:

$sales_{i, j} = coeff_{i, j} * spend_{i, j}^{saturation_{{i, j}}}$

where as $i$ denotes the timestep and $j$ denotes the channel.

The following holds: $0 <= saturation_{i ,j} <= 1$$0 \le saturation_{i ,j} \le 1$ , notice that this curve exhibits diminishing marginal returns and is concave when minimizing thus convex when maximizing.

The total sales over the horizon can then be expressed as:

$totalsales(P) = \sum_{i}\sum_{j} coeff_{i, j} * spend_{i, j}^{saturation_{{i, j}}}$

The aim of this optimization task is to maximize the spend whilst maintaining a target ROI  (return on investment). We also have some constraints we want our solution to adhere to such as minimum spend per channel, total budget constraint, max jump between the budgeting between one day and another.

We construct the following optimization problem:

\begin{align} \max_{C_{i, j}}\sum_{i}\sum_{j}C_{i, j} \\ s.t \sum_{i}\sum_{j} C_{i, j} <&= B \quad (Total-budget) \\ C_{i, j} >&= 0.4 * C_{i - 1, j} \quad (Max-increment) \\ C_{i, j} >&= 0.4 * C_{i + 1, j} \quad (Max-decrement) \\ \sum_{i}C_{i, j} >&= min\_total\_spend\_channel_j \quad (Channel-budget) \\ \frac{totalsales(P)}{\sum_{i}\sum_{j}C_{i, j}} >&= targetvalu \quad (ROI) \end{align}\begin{align} \max_{C_{i, j}}\sum_{i}\sum_{j}C_{i, j} \\ s.t \sum_{i}\sum_{j} C_{i, j} &\le B \quad (Total-budget) \\ C_{i, j} & \ge 0.4 * C_{i - 1, j} \quad (Max-increment) \\ C_{i, j} & \ge 0.4 * C_{i + 1, j} \quad (Max-decrement) \\ \sum_{i}C_{i, j} & \ge min\_total\_spend\_channel_j \quad (Channel-budget) \\ \frac{totalsales(P)}{\sum_{i}\sum_{j}C_{i, j}} & \ge targetvalue \quad (ROI) \end{align}

This is a toy example and not the real life-life example iI am working on. In the real example, the sales-predictor have predictor has a more complex functional shape looking like this:

$sales_{i} = \sum_{j}coeff_{i, j}*hill_saturation(adstock(C_{i, j})$$sales_{i} = \sum_{j}coeff_{i, j}*hill_saturation (adstock(C_{i, j})$

where as $adstock(C_{i, j}) = C_{i, j} + \lambda C_{i - 1, j}$ where $0 <= \lambda <= 1$

and

$hill\_saturation(C_{i, j}) = \frac{C_{i, j}^{\alpha}}{C_{i, j}^{\alpha} + \gamma^{\alpha}}$

Thus it exhibits a hill type-type of function introducing all sorts of possible local minimasminima. However, in the general case for my datasets, this function will be convex considering ana maximization problem.

What iI am wondering is if this is a good way of formulating this type of problem, particularly the formulation of the objective being maximizing the cost and putting the ROI-objective objective as ana constraint. I assume, this could lead to some issues when picking up a solver. Maybe maximizing sales as an objective and keeping the constraint would be better.

I have been playing around with some python solvers without a good deal of luck(CPLEX doesntdoesn't work(DCP-violated), SLSQP and trust-constr gets stuck in local minimasminima, and the random search takes ages, ,. what would be a good solver for this type of problem - pluspointplus point for one with implementations that are free in python/API?

Consider the notation and objective below for this sequentail resource allocation problem:

Allocation channels $i \in (1, 2)$

Spend/Cost timestep i channel j: $C_{i, j}$

Total resource: $B$

Horizon: $H$

Max allocation jump between time-steps: $1.5$

Minimum allocation: $min\_total\_channel_i$

target ROI: $targetvalue$

planned spend over horizon: $P = (C_{1, 1}, C_{1, 2}.....C_{H, 1}, C_{H, 2})$

We have a time-variant predictor for the amount of sales on a specific day. For a certain timestep it takes the following form:

$sales_{i, j} = coeff_{i, j} * spend_{i, j}^{saturation_{{i, j}}}$

where as $i$ denotes the timestep and $j$ denotes the channel.

The following holds: $0 <= saturation_{i ,j} <= 1$ , notice that this curve exhibits diminishing marginal returns and is concave when minimizing thus convex when maximizing.

The total sales over the horizon can then be expressed as:

$totalsales(P) = \sum_{i}\sum_{j} coeff_{i, j} * spend_{i, j}^{saturation_{{i, j}}}$

The aim of this optimization task is to maximize the spend whilst maintaining a target ROI(return on investment). We also have some constraints we want our solution to adhere to such as minimum spend per channel, total budget constraint, max jump between the budgeting between one day and another.

We construct the following optimization problem:

\begin{align} \max_{C_{i, j}}\sum_{i}\sum_{j}C_{i, j} \\ s.t \sum_{i}\sum_{j} C_{i, j} <&= B \quad (Total-budget) \\ C_{i, j} >&= 0.4 * C_{i - 1, j} \quad (Max-increment) \\ C_{i, j} >&= 0.4 * C_{i + 1, j} \quad (Max-decrement) \\ \sum_{i}C_{i, j} >&= min\_total\_spend\_channel_j \quad (Channel-budget) \\ \frac{totalsales(P)}{\sum_{i}\sum_{j}C_{i, j}} >&= targetvalu \quad (ROI) \end{align}

This is a toy example and not the real life example i am working on. In the real example, the sales-predictor have a more complex functional shape looking like this:

$sales_{i} = \sum_{j}coeff_{i, j}*hill_saturation(adstock(C_{i, j})$

where as $adstock(C_{i, j}) = C_{i, j} + \lambda C_{i - 1, j}$ where $0 <= \lambda <= 1$

and

$hill\_saturation(C_{i, j}) = \frac{C_{i, j}^{\alpha}}{C_{i, j}^{\alpha} + \gamma^{\alpha}}$

Thus it exhibits a hill type of function introducing all sorts of possible local minimas. However, in the general case for my datasets, this function will be convex considering an maximization problem.

What i am wondering is if this a good way of formulating this type of problem, particularly the formulation of the objective being maximizing the cost and putting the ROI-objective as an constraint. I assume, this could lead to some issues when picking up a solver. Maybe maximizing sales as objective and keeping the constraint would be better.

I been playing around with some python solvers without a good deal of luck(CPLEX doesnt work(DCP-violated), SLSQP and trust-constr gets stuck in local minimas, random search takes ages, , what would be a good solver for this type of problem - pluspoint for one with implementations that are free in python/API?

Consider the notation and objective below for this sequential resource allocation problem:

Allocation channels $i \in (1, 2)$

Spend/Cost timestep i channel j: $C_{i, j}$

Total resource: $B$

Horizon: $H$

Max allocation jump between time-steps: $1.5$

Minimum allocation: $min\_total\_channel_i$

target ROI: $targetvalue$

planned spend over horizon: $P = (C_{1, 1}, C_{1, 2}.....C_{H, 1}, C_{H, 2})$

We have a time-variant predictor for the amount of sales on a specific day. For a certain timestep it takes the following form:

$sales_{i, j} = coeff_{i, j} * spend_{i, j}^{saturation_{{i, j}}}$

where as $i$ denotes the timestep and $j$ denotes the channel.

The following holds: $0 \le saturation_{i ,j} \le 1$ , notice that this curve exhibits diminishing marginal returns and is concave when minimizing thus convex when maximizing.

The total sales over the horizon can then be expressed as:

$totalsales(P) = \sum_{i}\sum_{j} coeff_{i, j} * spend_{i, j}^{saturation_{{i, j}}}$

The aim of this optimization task is to maximize the spend whilst maintaining a target ROI  (return on investment). We also have some constraints we want our solution to adhere to such as minimum spend per channel, total budget constraint, max jump between the budgeting between one day and another.

We construct the following optimization problem:

\begin{align} \max_{C_{i, j}}\sum_{i}\sum_{j}C_{i, j} \\ s.t \sum_{i}\sum_{j} C_{i, j} &\le B \quad (Total-budget) \\ C_{i, j} & \ge 0.4 * C_{i - 1, j} \quad (Max-increment) \\ C_{i, j} & \ge 0.4 * C_{i + 1, j} \quad (Max-decrement) \\ \sum_{i}C_{i, j} & \ge min\_total\_spend\_channel_j \quad (Channel-budget) \\ \frac{totalsales(P)}{\sum_{i}\sum_{j}C_{i, j}} & \ge targetvalue \quad (ROI) \end{align}

This is a toy example and not the real-life example I am working on. In the real example, the sales predictor has a more complex functional shape looking like this:

$sales_{i} = \sum_{j}coeff_{i, j}*hill_saturation (adstock(C_{i, j})$

where as $adstock(C_{i, j}) = C_{i, j} + \lambda C_{i - 1, j}$ where $0 <= \lambda <= 1$

and

$hill\_saturation(C_{i, j}) = \frac{C_{i, j}^{\alpha}}{C_{i, j}^{\alpha} + \gamma^{\alpha}}$

Thus it exhibits a hill-type of function introducing all sorts of possible local minima. However, in the general case for my datasets, this function will be convex considering a maximization problem.

What I am wondering is if this is a good way of formulating this type of problem, particularly the formulation of the objective being maximizing the cost and putting the ROI objective as a constraint. I assume this could lead to some issues when picking up a solver. Maybe maximizing sales as an objective and keeping the constraint would be better.

I have been playing around with some python solvers without a good deal of luck(CPLEX doesn't work(DCP-violated), SLSQP and trust-constr gets stuck in local minima, and the random search takes ages. what would be a good solver for this type of problem - plus point for one with implementations that are free in python/API?

added 147 characters in body
Source Link

Consider the notation and objective below for this sequentail resource allocation problem:

Allocation channels $i \in (1, 2)$

Spend/Cost timestep i channel j: $C_{i, j}$

Total resource: $B$

Horizon: $H$

Max allocation jump between time-steps: $1.5$

Minimum allocation: $min\_total\_channel_i$

target ROI: $targetvalue$

planned spend over horizon: $P = (C_{1, 1}, C_{1, 2}.....C_{H, 1}, C_{H, 2})$

We have a time-variant predictor for the amount of sales on a specific day. For a certain timestep it takes the following form:

$sales_{i, j} = coeff_{i, j} * spend_{i, j}^{saturation_{{i, j}}}$

where as $i$ denotes the timestep and $j$ denotes the channel.

The following holds: $0 <= saturation_{i ,j} <= 1$ , notice that this curve exhibits diminishing marginal returns and is concave when minimizing thus convex when maximizing.

The total sales over the horizon can then be expressed as:

$totalsales(P) = \sum_{i}\sum_{j} coeff_{i, j} * spend_{i, j}^{saturation_{{i, j}}}$

The aim of this optimization task is to maximize the spend whilst maintaining a target ROI(return on investment). We also have some constraints we want our solution to adhere to such as minimum spend per channel, total budget constraint, max jump between the budgeting between one day and another.

We construct the following optimization problem:

\begin{align} \max_{C_{i, j}}\sum_{i}\sum_{j}C_{i, j} \\ s.t \sum_{i}\sum_{j} C_{i, j} <&= B \quad (Total-budget) \\ C_{i, j} >&= 0.4 * C_{i - 1, j} \quad (Max-increment) \\ C_{i, j} >&= 0.4 * C_{i + 1, j} \quad (Max-decrement) \\ \sum_{i}C_{i, j} >&= min\_total\_spend\_channel_j \quad (Channel-budget) \\ \frac{totalsales(P)}{\sum_{i}\sum_{j}C_{i, j}} >&= targetvalu \quad (ROI) \end{align}

This is a toy example and not the real life example i am working on. In the real example, the sales-predictor have a more complex functional shape looking like this:

$sales_{i} = \sum_{j}coeff_{i, j}*hill_saturation(adstock(C_{i, j})$

where as $adstock(C_{i, j}) = C_{i, j} + \lambda C_{i - 1, j}$ where $0 <= \lambda <= 1$

and

$hill\_saturation(C_{i, j}) = \frac{C_{i, j}^{\alpha}}{C_{i, j}^{\alpha} + \gamma^{\alpha}}$

Thus it exhibits a hill type of function introducing all sorts of possible local minimas. However, in the general case for my datasets, this function will be convex considering an maximization problem.

What i am wondering is if this a good way of formulating this type of problem, particularly the formulation of the objective being maximizing the cost and putting the ROI-objective as an constraint. I assume, this could lead to some issues when picking up a solver. Maybe maximizing sales as objective and keeping the constraint would be better.

I been playing around with some python solvers without a good deal of luck(CPLEX doesnt work(DCP-violated), SLSQP and trust-constr gets stuck in local minimas, random search takes ages, , what would be a good solver for this type of problem - pluspoint for one with implementations that are free in python/API?

Consider the notation and objective below for this sequentail resource allocation problem:

Allocation channels $i \in (1, 2)$

Spend/Cost timestep i channel j: $C_{i, j}$

Total resource: $B$

Horizon: $H$

Max allocation jump between time-steps: $1.5$

Minimum allocation: $min\_total\_channel_i$

target ROI: $targetvalue$

planned spend over horizon: $P = (C_{1, 1}, C_{1, 2}.....C_{H, 1}, C_{H, 2})$

We have a time-variant predictor for the amount of sales on a specific day. For a certain timestep it takes the following form:

$sales_{i, j} = coeff_{i, j} * spend_{i, j}^{saturation_{{i, j}}}$

where as $i$ denotes the timestep and $j$ denotes the channel.

The following holds: $0 <= saturation_{i ,j} <= 1$ , notice that this curve exhibits diminishing marginal returns and is concave when minimizing thus convex when maximizing.

The total sales over the horizon can then be expressed as:

$totalsales(P) = \sum_{i}\sum_{j} coeff_{i, j} * spend_{i, j}^{saturation_{{i, j}}}$

The aim of this optimization task is to maximize the spend whilst maintaining a target ROI(return on investment). We also have some constraints we want our solution to adhere to such as minimum spend per channel, total budget constraint, max jump between the budgeting between one day and another.

We construct the following optimization problem:

\begin{align} \max_{C_{i, j}}\sum_{i}\sum_{j}C_{i, j} \\ s.t \sum_{i}\sum_{j} C_{i, j} <&= B \quad (Total-budget) \\ C_{i, j} >&= 0.4 * C_{i - 1, j} \quad (Max-increment) \\ C_{i, j} >&= 0.4 * C_{i + 1, j} \quad (Max-decrement) \\ \sum_{i}C_{i, j} >&= min\_total\_spend\_channel_j \quad (Channel-budget) \\ \frac{totalsales(P)}{\sum_{i}\sum_{j}C_{i, j}} >&= targetvalu \quad (ROI) \end{align}

This is a toy example and not the real life example i am working on. In the real example, the sales-predictor have a more complex functional shape looking like this:

$sales_{i} = \sum_{j}coeff_{i, j}*hill_saturation(adstock(C_{i, j})$

where as $adstock(C_{i, j}) = C_{i, j} + \lambda C_{i - 1, j}$ where $0 <= \lambda <= 1$

and

$hill\_saturation(C_{i, j}) = \frac{C_{i, j}^{\alpha}}{C_{i, j}^{\alpha} + \gamma^{\alpha}}$

Thus it exhibits a hill type of function introducing all sorts of possible local minimas. However, in the general case for my datasets, this function will be convex considering an maximization problem.

What i am wondering is if this a good way of formulating this type of problem, particularly the formulation of the objective being maximizing the cost and putting the ROI-objective as an constraint.

I been playing around with some python solvers without a good deal of luck(CPLEX doesnt work(DCP-violated), SLSQP and trust-constr gets stuck in local minimas, random search takes ages, , what would be a good solver for this type of problem - pluspoint for one with implementations that are free in python/API?

Consider the notation and objective below for this sequentail resource allocation problem:

Allocation channels $i \in (1, 2)$

Spend/Cost timestep i channel j: $C_{i, j}$

Total resource: $B$

Horizon: $H$

Max allocation jump between time-steps: $1.5$

Minimum allocation: $min\_total\_channel_i$

target ROI: $targetvalue$

planned spend over horizon: $P = (C_{1, 1}, C_{1, 2}.....C_{H, 1}, C_{H, 2})$

We have a time-variant predictor for the amount of sales on a specific day. For a certain timestep it takes the following form:

$sales_{i, j} = coeff_{i, j} * spend_{i, j}^{saturation_{{i, j}}}$

where as $i$ denotes the timestep and $j$ denotes the channel.

The following holds: $0 <= saturation_{i ,j} <= 1$ , notice that this curve exhibits diminishing marginal returns and is concave when minimizing thus convex when maximizing.

The total sales over the horizon can then be expressed as:

$totalsales(P) = \sum_{i}\sum_{j} coeff_{i, j} * spend_{i, j}^{saturation_{{i, j}}}$

The aim of this optimization task is to maximize the spend whilst maintaining a target ROI(return on investment). We also have some constraints we want our solution to adhere to such as minimum spend per channel, total budget constraint, max jump between the budgeting between one day and another.

We construct the following optimization problem:

\begin{align} \max_{C_{i, j}}\sum_{i}\sum_{j}C_{i, j} \\ s.t \sum_{i}\sum_{j} C_{i, j} <&= B \quad (Total-budget) \\ C_{i, j} >&= 0.4 * C_{i - 1, j} \quad (Max-increment) \\ C_{i, j} >&= 0.4 * C_{i + 1, j} \quad (Max-decrement) \\ \sum_{i}C_{i, j} >&= min\_total\_spend\_channel_j \quad (Channel-budget) \\ \frac{totalsales(P)}{\sum_{i}\sum_{j}C_{i, j}} >&= targetvalu \quad (ROI) \end{align}

This is a toy example and not the real life example i am working on. In the real example, the sales-predictor have a more complex functional shape looking like this:

$sales_{i} = \sum_{j}coeff_{i, j}*hill_saturation(adstock(C_{i, j})$

where as $adstock(C_{i, j}) = C_{i, j} + \lambda C_{i - 1, j}$ where $0 <= \lambda <= 1$

and

$hill\_saturation(C_{i, j}) = \frac{C_{i, j}^{\alpha}}{C_{i, j}^{\alpha} + \gamma^{\alpha}}$

Thus it exhibits a hill type of function introducing all sorts of possible local minimas. However, in the general case for my datasets, this function will be convex considering an maximization problem.

What i am wondering is if this a good way of formulating this type of problem, particularly the formulation of the objective being maximizing the cost and putting the ROI-objective as an constraint. I assume, this could lead to some issues when picking up a solver. Maybe maximizing sales as objective and keeping the constraint would be better.

I been playing around with some python solvers without a good deal of luck(CPLEX doesnt work(DCP-violated), SLSQP and trust-constr gets stuck in local minimas, random search takes ages, , what would be a good solver for this type of problem - pluspoint for one with implementations that are free in python/API?

Source Link
Loading