I’m currently working on a sales optimization problem using JuMP in Julia. The challenge involves representing the total sales value under specific constraints. However, my current approach leads to bilinear terms, which seem overly complex for this problem. I’m wondering if there’s a more straightforward formulation that avoids these bilinear terms. There are binary variables as well which will make the problem MIQP, but these have been left out from here.

**Conditions**:

**Item Purchase**: Each year, exactly one item is purchased, represented by`y[i]`

.**Item Sale**: Items purchased in previous years can be sold in the current year. The amount sold is a fixed percentage of all items held.

**JuMP Model Setup**:

```
model = Model()
@variable(model, 0 <= y[i=1:3] <= 1) # Percentage of item purchased each year
@variable(model, 0 <= z[i=1:3, t=1:3] <= 1) # Percentage of item sold
# Sale price matrix
sales_matrix = [100 95 90;
0 98 92;
0 0 80]
```

**Current Expression**:

The total sales value at time `t`

is formulated as:

```
# Fix z[i, t] to 0 for t < i, as we cannot sell an item before it is bought
for i in 1:3
for t in 1:(i-1)
fix(z[i, t], 0;force=true) # This fixes z[i, t] to 0 for t < i
end
end
@expression(model, total_sales[t=1:3],
sum(sales_matrix[i,t] * (y[i] - sum(z[i,k] for k in 1:(t-1))) * z[i,t] for i in 1:t))
```

**Additional Constraints**:

- To ensure the amount sold does not exceed the amount purchased:
`for i in 1:3 @constraint(model, sum(z[i,t] for t in 1:3) <= y[i]) end`

- For a uniform sale percentage across all items:
`@variable(model, 0 <= alpha[t=1:3] <= 1) for t in 1:3 for i in 1:t @constraint(model, z[i,t] == alpha[t]) end end`

**Question**:

Is there an alternative formulation for this optimization problem that avoids the use of bilinear terms? The current model seems overly complex for what appears to be a straightforward problem. I’m looking for suggestions on how to simplify the model or represent it more efficiently, especially regarding the bilinear terms in the `total_sales`

expression.