[Scip] ZIMPL Constraint translation

Ambros Gleixner gleixner at zib.de
Sat Feb 28 19:17:56 CET 2015


Dear Soukaina Sema,

please send us your full ZIMPL file with input data, ideally to me 
personally.

Thanks,
Ambros


Am 28.02.2015 um 19:03 schrieb Soukaina Sema:
>
> Dear Mailing List,
>
> I am currently trying to write my mathematical K-TSP model in ZIMPL
> format, i found some difficulties to translate these two constraints :
>
>
> _Constraint 1_ : (*x_i *- a_i )² + (y_i -b_i )²  <=  c²  , i= 1....n  ;
>
>
> (a_i ,b_i ) = the coordinate of a node i ( a city) and (x_i ,y_i ) = the
> coordinate of a special linked -point far away from the node i.
>
>
> I want to calculate the distance between each node and it’s
> linked-point,I stock the coordinate of each city in  file1 , and the
> coordinate of each linked-point (i) in another 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:
>
>
> _CODE 1:_ subto calculate_linked_point:
>        forall <i,j> in E  do
>         (x[i]-pa[i]) ^ 2 + (y[i]-pb[i]) ^ 2 <= r ^ 2;
>
>
> _CODE 1_: subto calculate_repoint:
>        forall <v> in V  do
>        forall <m> in M do
>         (x[m]-pa[v]) ^ 2 + (y[m]-pb[v]) ^ 2 <= r ^ 2;
>
>
> *** Error 106: Empty LHS, constraint trivially violated
> *** File: C:\Program Files\LPSolve IDE\_tmpfile Line 42
> *** in A do        (x[i]-pa[i]) ^ 2 + (y[i]-pb[i]) ^ 2 <= c ^ 2;
> ***                                                            ^^
> Elem store count 8
> Numb store count 2
>
>
>
>
> _Constraint 2_ : sum((i,j) in A) *Lambda_wij *  * *g[i,j]* >= 1 ; for
> each w from W;   // *g[i,j] is a binary variable*
>
>
> subto 2:
>         forall <w> in W do
>
>      sum <i,j> in E : Lambda[w,i,j] * g[i,j] >= 1;
>
>      *** Error 800: File C:\Program Files\LPSolve IDE\_tmpfile Line 44 :
> syntax error
> , unexpected VARSYM
> *** do             sum <i,j> in E : Lambda[w,i,j] * g[i,j] >= 1;
> ***                                                 ^^^
>
> Any ideas ??????
>
>
>
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip
>

-- 
______________________________________________________________
Ambros M. Gleixner
Zuse Institute Berlin - TU Berlin - Berlin Mathematical School
http://www.zib.de/gleixner


More information about the Scip mailing list