ERROR: LoadError: syntax: invalid identifier name "&&"

Dear all,
why it reports error with && in case below:
sum((change_cost[k,l,j]*C[k,l,j,t,t+1]) for k in F, l in F, j in U, t in TIME: (t<=length(TIME)-1) && (k != l))
Thanks!

Please make it easier to help you

My guess is it has to do with TIME:, or with some of those parentheses. Something there is invalid syntax.

3 Likes

I’m not exactly sure how it tried to parse it but the problem is almost certainly with :, where you probably want if instead.

great, if is the solution.
Thank you both.