<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Maria,<div class=""><br class=""></div><div class="">Could you send your model directly to me? (<a href="mailto:mike.steglich@th-wildau.de" class="">mike.steglich@th-wildau.de</a>)</div><div class=""><br class=""></div><div class="">The Cmpl expressions you sent should work as you expect. It could be possible that you found a bug.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""></div><div class="">Mike</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">Am 01.04.2016 um 18:03 schrieb Maria Giatsoglou <<a href="mailto:maria.giatsoglou@gmail.com" class="">maria.giatsoglou@gmail.com</a>>:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hello, <div class=""><br class=""></div><div class="">I have a question regarding the approach followed for line naming in loops that iterate over sets of 2-tuples.</div><div class="">To clarify the issue I attach the following example:</div><div class=""><br class=""></div><div class="">In my cmpl file I have the following constraint generation loop:</div><div class=""><br class=""></div><div class=""><div class=""><br class=""></div><div class="">test_line_name {len(A) > 0 : {[i,j] in A: </div><div class=""> echo i; echo j;</div><div class=""> 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 class=""> 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 class="">}</div></div><div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">What does this numeric value of 38985568 corresponds to?</div><div class="">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 class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class=""><div class="">test_line_name {i in (A*> [*,/]):{j in (A*> [i,*]): </div><div class=""><br class=""></div><div class="">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" class="">    </span></div><div class="">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 class="">}}</div></div><div class=""><br class=""></div><div class="">I also noticed that inside the loop I can use an expression such as: </div><div class=""><br class=""></div><div class="">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 class=""></div><div class=""><br class=""></div><div class="">which correctly prints the line name using the value of i, but the expression </div><div class=""><br class=""></div><div class="">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 class=""></div><div class=""><br class=""></div><div class="">does not work, since only one variable is supported.</div><div class=""><br class=""></div><div class="">Any ideas / suggestions on how to approach this issue are more than welcome!</div><div class=""><br class=""></div><div class="">Thank you very much in advance,</div><div class="">Maria </div><div class=""><br class=""></div></div>
_______________________________________________<br class="">Cmpl mailing list<br class=""><a href="mailto:Cmpl@list.coin-or.org" class="">Cmpl@list.coin-or.org</a><br class="">http://list.coin-or.org/mailman/listinfo/cmpl</div></blockquote></div><br class=""></div></body></html>