!Sij<= Dist, Sij is the distance of the center from the lower vertix;
@FOR (LINKS (I,J):
Sij(I,J) <= Connection (I,J)*Dist (I,J));
!Xij is the arc that the center is located in. it can only happen in a arc belonging to connection;
@for (LINKS (I,J): Xij(I,J) <= Connection(I,J));
!we need 2 center;
@FOR( LINKS (I,J):
@SUM(LINKS(I,J): Xij )= 2);
@for (CloDist (K,I,J): Dis21Cent (K,I,J)=@if( Xij(I,J) #eq# 1,@smin(Dist(K,I)+Sij(I,J),Dist(K,J)+Dist(I,J)-Sij(I,J) ),99999999);
@for (Marcket (K): Dvy(K) = @min(CloDist(K,I,J): Dis21Cent(K,I,J)));
@for (Marcket(K): WDst(K)= Hi(K)+Wi(K)*Dvy(K));
MaxWDst = @Max (Marcket: WDst);
MaxWDst<=Z;
!Objective function;
MIN = Z;
!Xij, is binery, it has value 1 only when a center is located between i and j;
@FOR (LINKS: @bin (Xij));
END