I proposed a model and implemented it in CPLEX using Python. Now I'm trying to switch to Gurobi, but I can't find a way to model a constraint that finds the maximum value of some maximum values.
This is the constraint:
for j in N:
mdl.add_constraint(a + mdl.max( [ (mdl.max( [t_d[0,k] + s_d[k] + t_d[k,j] - t_t[0,j], 0] ) )*z[0,k,j] for k in N if j != k] )
<= a[j] + M)
- "a" and "z" are continuous variables
- "t_d", "s_d", "t_t" and "M" are constants
Please sign in to leave a comment.