Construction of the objective function for a mathematical model

Please read the first post of Please read: make it easier to help you - #19 and provide a reproducible example, along with the text of the error you encounter.

What do you expect to happen? C1[1:z] is a vector, y[i, j] + y1[i, j] is a scalar. You can’t sum vectors like this, because cause it is essentially (ignoring the scalar) C1[1:1] + C1[1:2] + C1[1:3] + ....

It might be helpful if you can provide the mathematical form of the objective function you are trying to code.

1 Like