Notations in Binary Integer Model

74 Views Asked by At

I am trying to build a model to solve a problem. In the problem, one product set consists of different product items, for example, product set 1 consists of Pencil A + Pen D + Eraser B + Scissor C, and product set 2 consists of Pencil C + Pen D + Eraser C. Some products are necessary in the set, some aren't. And try to maximize the total of product set with the constraint of the quantity of different products. For example, can only have 5 pencils, 2 pens, 4 erasers. Since the actual product set consists of eight products, there will be a long list for just the notation, for example, parameter $A_k^i = 1$ if Pencil i is included in Product Set k, parameter $S_i$ for the quantity constraint, and decision variable $X_i = 1$, if Pencil i is in stock. I am thinking of creating a product index which includes all the products, for example, $X_i^p = 1$, if the ith one in Product p is in stock. However, since the number of each product type is different, I am not sure how to index it.

1

There are 1 best solutions below

0
On

To avoid ambiguity, I will use the term product bundle instead of product set. Let $P$ be the set of products, with $|P|=8$. Let $B$ be the set of product bundles. For $p\in P$, let parameter $s_p$ be the supply of product $p$. For $p\in P$ and $b\in B$, let parameter $a_{p,b}\in\{0,1\}$ indicate whether product $p$ appears in bundle $b$. (More generally, $a_{p,b}$ can be the number of times that product $p$ appears in bundle $b$.) For $b\in B$, let nonnegative integer decision variable $x_b$ represent the number of times bundle $b$ is produced. The problem is to maximize $\sum_{b\in B} x_b$ subject to linear constraints $$\sum_{b \in B} a_{p,b} x_b \le s_p \quad \text{for $p\in P$}.$$