Hi,
Recently I have this syntax error in one of my constraints
syntax error
context: subject to precedence_in_part_platform {j in J, l >>> in <<< J: l<>j} : 1 + x[j] >= f[j,l] + x[l];
ampl:
The model was working fine las month. I do not know the reason for this error, given that the model have earlier constraints with this loop but it did not give any syntax error.
Did you define l as a param or var earlier in the model? If l is already defined, then writing linJ in the constraint indexing gives exactly the error you are seeing. For example:
ampl: param l; set J; var x{J}; var f{J,J};
ampl: subject to precedence_in_part_platform {j in J, l in J: l<>j} : 1 + x[j] >= f[j,l] + x[l];
syntax error
context: subject to precedence_in_part_platform {j in J, l >>> in <<< J: l<>j} : 1 + x[j] >= f[j,l] + x[l];
ampl:
If you aren’t defining l earlier in the model, then can you post an example from your model, which causes the error to appear?