set - GAMS Definition of a Subset with k and k+1 -
so have following set:
i 1,2,3,...,i j 1,2,3,...,j k 1,2,3,...,k k´2,3,4,...,k
i defining set , parameters via gdx-import through excel sheet can change set , parameters dynamically in order calculation study linear-programming model.
how define kind of set k´ works parameters d_kk´(distance k k´) , t_jkk´?
keep in mind solution has work on large scale @ least 1,...,100 every indice.
thanks lot. cheers, sam
sounds whant calculate distance between different points in set k. use alias set , multidimentional set:
set /1*i/ j /1*j/ k /1*k/ kk(k,k); alias(ka,k); kk(k,ka)$(ord(k)<ord(ka))=yes; parameter x(k) 'x-koordinate' y(k) 'y-koordinate' d(k,k) 'distance k ka'; x(k)=uniform(0,1); y(k)=uniform(0,1); d(k,ka)$kk(k,ka)=sqrt((x(k)-x(ka))^2+(y(k)-y(ka))^2);
Comments
Post a Comment