<div dir="ltr">Hello, <div><br></div><div>I have a question regarding the approach followed for line naming in loops that iterate over sets of 2-tuples.</div><div>To clarify the issue I attach the following example:</div><div><br></div><div>In my cmpl file I have the following constraint generation loop:</div><div><br></div><div><div><br></div><div>test_line_name {len(A) > 0 : {[i,j] in A: </div><div> echo i; echo j;</div><div> sum{k in (A_B *> [i,*]): x[i,k] * B[k]} - sum{k in (A_B *> [j,*]): x[j,k] * B[k]}  <= C[i,j];</div><div> sum{k in (A_B *> [j,*]): x[j,k] * B[k]} - sum{k in (A_B *> [i,*]): x[i,k] * B[k]}  >= D[i,j];</div><div>}</div></div><div><br></div><div>In the above, A and A_B are instances of set[2] used as parameters, C and D are again parameters defined over A (i.e. C[A] and D[A]), B is another array of parameters defined over a set of values, and x defined over A_B (i.e. x[A_B]) represents the problem variables. All values are provided though jCMPL.</div><div><br></div><div><br></div><div>When I run the optimizer and print the solution report, I get strange values for the line names... For example, in the case of a tuple ["p","r"] the line names generated for the two constraints are  "test_line_name (38985568,1)" and   "test_line_name (38985568,2)" (whereas values "p" and "r" are printed correctly with the echo statements inside the loop).  </div><div><br></div><div>What does this numeric value of 38985568 corresponds to?</div><div>I need to have a mapping between the type of constraint (as defined by me) and the parameters that populate it (i and j in my example), so that I can use it at a later phase in my project in case of a conflict.</div><div><br></div><div>I have also tried to transform the above formulation into double loops, as below, but the problem persists although now I get line names of the form " test_line_name (~1073741828,~1073741830,1)".</div><div><br></div><div><div>test_line_name {i in (A*> [*,/]):{j in (A*> [i,*]): </div><div><br></div><div>sum{k in (A_B *> [j,*]): x[j,k] * B[k]} - sum{k in (A_B *> [i,*]): x[i,k] * [k]} <= C[i,j];<span style="white-space:pre"> </span></div><div>sum{k in (A_B *> [i,*]): x[i,k] * B[k]} - sum{k in (A_B *> [j,*]): x[j,k] * B[k]} >= D[i,j];</div><div>}}</div></div><div><br></div><div>I also noticed that inside the loop I can use an expression such as: </div><div><br></div><div>test_line_name_$i$: sum{k in (A_B *> [j,*]): x[j,k] * B[k]} - sum{k in (A_B *> [i,*]): x[i,k] * [k]} <= C[i,j];<br></div><div><br></div><div>which correctly prints the line name using the value of i, but the expression </div><div><br></div><div>test_line_name_$i$_$j$: sum{k in (A_B *> [j,*]): x[j,k] * B[k]} - sum{k in (A_B *> [i,*]): x[i,k] * [k]} <= C[i,j];<br></div><div><br></div><div>does not work, since only one variable is supported.</div><div><br></div><div>Any ideas / suggestions on how to approach this issue are more than welcome!</div><div><br></div><div>Thank you very much in advance,</div><div>Maria </div><div><br></div></div>