Constraint set with max function

Concerning the constraint set
Screenshot from 2022-12-22 08-19-35

I am having problem with the last term of the constraint (?):
@constraint(model, [m in 1:machines, j in 1:jobs], PT[m,j] == SET[m] * Z[m,j] + VT[m]*(sum(v[i] * X[m,j,i] for i in 1:parts) + HT[m] * (?)))

How can I determine
Screenshot from 2022-12-22 08-26-43
Note: X and Z are a binary decision variables; PT is a continuous decision variable; SET, VT, and HT are parameters (input data).

One reformulation is Tips and tricks · JuMP

@variable(model, t[1:parts])
@constraint(model, [i=1:parts], t >= h[i] * X[m,j,i])

but this will only work if t wants to minimize. That is, you might get a case where t > \max\limits_{i \in I} \left\{h_i \cdot X_{mji}\right\}.

Dear Oscar, thank you very much!

1 Like