I am trying to formulate the following linear programming problem.
My inputs are the following:
- A set of $N$ tables $\Pi_1, \dots, \Pi_N$
- A cost budget $G$
I have the following decision variables:
- $X_i$, $i \in [1, N]$ for whether or not we will perform transformation $X$ on table $\Pi_i$
- $Y_i$, $i \in [1, N]$ for whether or not we will perform transformation $Y$ on table $\Pi_i$
- $Z_i$, $i \in [1, N]$ for whether or not we will perform transformation $Z$ on table $\Pi_i$
The objective function is as follows:
min: $A_i\cdot X_i + B_i \cdot Y_i + C_i \cdot Z_i + D_i \cdot X_i + E_i \cdot Y_i + F_i \cdot Z_i$
where $A_i, B_i, C_i$ constants that influence the runtime of the original workload and $D_i, E_i, F_i$ calculate the runtime of the transformation.
And here are my constraints:
- $X_i, Y_i, Z_i \in \{0, 1\}$
- $Y_i + Z_i \leq 1$ as we do not want to both perform transformation $Y$ and $Z$ on a table
- $Y_i \leq X_i$, as we have an advantage by applying transformation $Y$ only if we have performed transformation $X$ first
- $T_i\cdot X_i + U_i\cdot Y_i + V_i\cdot Z_i \leq G$, where $G$ is a cost budget and $T_i, U_i, V_i$ is the cost of a transformation $X_i, Y_i, Z_i$ for $\Pi_i$ respectively.
My problem is the following: If we apply more than one transformations on a table, let's say $X$ and $Z$ for convenience then we have a discount factor, meaning that we won't have to pay both $A_i$ and $C_i$ runtime wise and $T_i$ and $V_i$ cost-wise. We will have a constant that is smaller than the sum of these two constants. I can calculate how much smaller this would be. How can we represent this in the problem? Should I have combined variables $XY$, $XZ$, $YZ$, $XYZ$ that are indicator variables that represent the combinations? Or is there another way to solve this type of linear programming problems?
Thanks a lot