Questions about sets

I have a set here, set D1 := {cav_index_start[12]… cav_index_end[12]}; .

If the value of d1 is 0, the following constraints apply: s.t. terminal_x_D1 {m in D1}:

yr[m,Nfe] - R > = 12;

I want constraint not to work, how should I set D1?

If cav_index_start[12]=1, cav_index_end[12]=0, does the constraint still work?

If cav_index_start[12]=1 and cav_index_end[12]=0, then {cav_index_start[12]..cav_index_end[12]} is the empty set. Thus D1 is the empty set.

Since D1 is the empty set, your statement

s.t. terminal_x_D1 {m in D1}: yr[m,Nfe] - R >= 12;

does not create any constraints.