<div dir="ltr"><p class="MsoNormal"><br></p><p class="MsoNormal"><span style="font-size:11pt;line-height:115%;font-family:"Calibri","sans-serif"">Dear Mailing List,</span></p><p class="MsoNormal"><span style="font-size:11pt;line-height:115%;font-family:"Calibri","sans-serif"">I
 am currently trying to write my mathematical K-TSP model in ZIMPL 
format, i found some difficulties to translate these two constraints :</span></p><p class="MsoNormal"><br></p><p class="MsoNormal"><span style="font-size:11pt;line-height:115%;font-family:"Calibri","sans-serif""></span><span style="font-size:11pt;line-height:115%;font-family:"Times New Roman","serif"" lang="EN-US"><span style> <u>Constraint 1</u> :  <span style="color:rgb(76,17,48)">(</span></span></span><b><span style lang="EN-US">x<sub>i</sub></span></b><span style="font-size:11pt;line-height:115%;font-family:"Times New Roman","serif"" lang="EN-US"><span style><span style="color:rgb(76,17,48)"><span style="font-size:11pt;line-height:115%;font-family:"Times New Roman","serif"" lang="EN-US"><span style></span></span> - </span></span></span><span style="font-size:11pt;line-height:115%;font-family:"Times New Roman","serif"" lang="EN-US"><span style><span style="color:rgb(76,17,48)"><span style lang="EN-US">a<sub>i</sub></span>)² + (</span></span></span><span style="font-size:11pt;line-height:115%;font-family:"Times New Roman","serif"" lang="EN-US"><span style><span style="color:rgb(76,17,48)"><span style lang="EN-US">y<sub>i</sub></span> -</span></span></span><span style="font-size:11pt;line-height:115%;font-family:"Times New Roman","serif"" lang="EN-US"><span style><span style="color:rgb(76,17,48)"><span style lang="EN-US">b<sub>i</sub></span>)²  <=  c²  , i= 1....n  ;   </span>                 <br></span></span></p><p class="MsoNormal"><br><span style="font-size:11pt;line-height:115%;font-family:"Times New Roman","serif"" lang="EN-US"><span style></span></span></p><p class="MsoNormal"></p><p class="MsoNormal">

</p><p class="MsoNormal"><font><span style="line-height:115%;font-family:"Comic Sans MS""><span> </span></span><span style="font-family:times new roman,serif"><span lang="EN-US">(a<sub>i</sub>,b<sub>i</sub><span>) =
the coordinate of a node i ( a city) </span>and <span> </span></span><span lang="EN-US">(x<sub>i</sub>,y<sub>i</sub>) = the coordinate
of a special linked -point far away from the node i.</span></span></font></p><font><span style="font-family:times new roman,serif">

</span></font><p class="MsoNormal"><font><span style="font-family:times new roman,serif"><span lang="EN-US"><br></span></span></font></p><font><span style="font-family:times new roman,serif">

</span></font><p class="MsoNormal"><font><span style="font-family:times new roman,serif"><span lang="EN-US">I want to
calculate the distance between each node and it’s <span> </span>linked-point,<span> 
</span>I stock the coordinate of each city in  file1 , and the coordinate of
each linked-point (i) in another <span> </span>file2,  the set E is the set of arc, E = { <i,j> in V * V with i < j }; M is the set of  Linked-point, I put this 2 code in my LP-solver but it's stop and give the some error:</span></span></font></p><p class="MsoNormal"><font><span style="font-family:times new roman,serif"><span lang="EN-US"><br></span></span></font></p><p class="MsoNormal"><span style="background-color:rgb(255,229,153)"><font size="1"><span style="font-family:times new roman,serif"><span lang="EN-US"> <u>CODE 1:</u> subto calculate_linked_point:<br>      forall <i,j> in E  do <br>       (x[i]-pa[i]) ^ 2 + (y[i]-pb[i]) ^ 2 <= r ^ 2;</span></span></font></span></p><p class="MsoNormal"><span style="background-color:rgb(255,229,153)"><br><font size="1"><font size="1"><span style="font-family:times new roman,serif"><span lang="EN-US"><u>CODE 1</u>: </span></span></font>subto calculate_repoint:<br>      forall <v> in V  do<br>      forall <m> in M do<br>       (x[m]-pa[v]) ^ 2 + (y[m]-pb[v]) ^ 2 <= r ^ 2;</font></span><br></p><p class="MsoNormal"><font size="1"><br><span style="font-family:times new roman,serif"><span lang="EN-US"></span></span></font></p><p class="MsoNormal"><span style="background-color:rgb(102,102,102)"><font><span style="font-family:times new roman,serif"><span lang="EN-US"><font size="1"><span style="background-color:rgb(238,238,238)"><span></span></span>*** Error 106: Empty LHS, constraint trivially violated        <br>*** File: C:\Program Files\LPSolve IDE\_tmpfile Line 42    <br>*** in A do        (x[i]-pa[i]) ^ 2 + (y[i]-pb[i]) ^ 2 <= c ^ 2;<br>***                                                            ^^                     <br>Elem store count 8                                                               <br>Numb store count 2                                                            </font><span style="background-color:rgb(243,243,243)"><font size="1"><span style="background-color:rgb(243,243,243)"><span></span></span>    </font><br></span></span></span></font></span></p><p class="MsoNormal"><span style="background-color:rgb(102,102,102)"><font><span style="font-family:times new roman,serif"><span lang="EN-US"><span style="background-color:rgb(243,243,243)"><br></span></span></span></font></span></p><p class="MsoNormal"><span style="background-color:rgb(102,102,102)"><font><span style="font-family:times new roman,serif"><span lang="EN-US"><span style="background-color:rgb(243,243,243)">                                                   <br></span></span></span></font></span></p><span style="background-color:rgb(243,243,243)">

</span><br><p class="MsoNormal"><span style="font-size:11pt;line-height:115%;font-family:"Times New Roman","serif"" lang="EN-US"><span style></span></span></p><p class="MsoNormal"><span style="font-size:11pt;line-height:115%;font-family:"Times New Roman","serif"" lang="EN-US"><span style><span style="font-size:11pt;line-height:115%;font-family:"Calibri","sans-serif""></span> </span></span><span style="font-size:11pt;line-height:115%;font-family:"Times New Roman","serif"" lang="EN-US"><span style><span style="font-size:11pt;line-height:115%;font-family:"Times New Roman","serif"" lang="EN-US"><span style><u>Constraint 2</u> :  </span></span><span style="color:rgb(76,17,48)">sum((i,j) in A) </span></span></span><span style="font-size:11pt;line-height:115%;font-family:"Times New Roman","serif"" lang="EN-US"><span style><span style="color:rgb(76,17,48)"><b><span style lang="EN-US">Lambda<sub>wij</sub></span></b>  * </span></span></span><span style="font-size:11pt;line-height:115%;font-family:"Times New Roman","serif"" lang="EN-US"><span style><span style="color:rgb(76,17,48)"><b><span style lang="EN-US">g[i,j]</span></b> >= 1</span> ; for each w from W;   //  </span></span><span style="font-size:11pt;line-height:115%;font-family:"Times New Roman","serif"" lang="EN-US"><span style><font size="1"><b><span style="line-height:115%;font-family:"Times New Roman","serif"" lang="EN-US"><span><span style="color:rgb(76,17,48)"> </span></span></span><span style="line-height:115%;font-family:"Times New Roman","serif"" lang="EN-US"><span><span style="color:rgb(76,17,48)"><span lang="EN-US">g[i,j] is a binary variable</span></span></span></span></b></font></span></span></p><p class="MsoNormal"><br></p><p class="MsoNormal"><span style="background-color:rgb(255,229,153)">subto 2:<br>       forall <w> in W do<br>       <br>    sum <i,j> in E : Lambda[w,i,j] * g[i,j] >= 1;</span><br><br><span style="font-size:11pt;line-height:115%;font-family:"Times New Roman","serif"" lang="EN-US"><span style></span><span style></span></span></p><p class="MsoNormal"><span style="font-size:12pt;line-height:115%;font-family:"Comic Sans MS"" lang="EN-US"><span style="background-color:rgb(102,102,102)"><font size="1">    *** Error 800: File C:\Program Files\LPSolve IDE\_tmpfile Line 44 : syntax error <br>, unexpected VARSYM                                                                                           <br>*** do             sum <i,j> in E : Lambda[w,i,j] * g[i,j] >= 1;                                            <br>***                                                 ^^^                                                               </font></span>                 <br><br></span></p><p class="MsoNormal"><span style="font-size:12pt;line-height:115%;font-family:"Comic Sans MS"" lang="EN-US">Any ideas ?????? <br></span></p><p class="MsoNormal"><span style="font-size:12pt;line-height:115%;font-family:"Comic Sans MS"" lang="EN-US"><br></span></p></div>