you can use something like that...

param distance :=
[1,1,1] := 1
[1,2,1] := 1
[1,3,1] := 1
[1,1,2] := 1
;


There are other ways to declare multidimensional parameters. More
information at lang.pdf of documentation. Page 38.



On Fri, May 9, 2008 at 10:18 AM, Carlos Herrera <[EMAIL PROTECTED]>
wrote:

> hello world,
>
> how I can write data in three dimension index in mathprog, for example
>
> set post; /* 1..T */
> set posy;   /* 1..m */
> set posx;  /* 1..n */
>
> param distance {t in post, i in posy, j in posx};
> var y {t in post, i in posy, j in posx} binary >=0;
>
> maximize z: sum{t in post, i in posi, j in posx} distance[t,i,j] *
> y[t,i,j];
>
> data;
>
> param distance: ???
>
> thanks!!
>
>
> _______________________________________________
> Help-glpk mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/help-glpk
>



-- 
Leandro B. Barcelos
_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to