Hello Asmâ,

please, have a look at glpk-4.47/doc/gmpl.pdf contained in the
source distribution of GLPK, available at
ftp://ftp.gnu.org/gnu/glpk/glpk-4.47.tar.gz

You can use the following syntax:

# dimensions of "vector"
set D := {1..2};

# elements of "vector"
set X{D};

display X;

data;

set X[1] := 1, 2;
set X[2] := 3, 4;

end;

For loading data from CSV or from a SQL data base have a look at
the table statement.

Best regards

Xypron

-------- Original-Nachricht --------
> Datum: Thu, 27 Oct 2011 02:05:29 +0400
> Betreff: [Help-glpk] [Fwd: Coding Data (Vector)]

> -------- Forwarded Message --------
> From: MEHIAOUI Asma <[email protected]>
> To: [email protected] <[email protected]>
> Subject: Coding Data (Vector)
> Date: Wed, 26 Oct 2011 16:13:44 +0000
> 
> Hello, 
> 
>  
> 
> Can somebody tell me if it is possible to define one vector  and
> associate to each element of the vector an set of elements ?
> 
> I tried this representation but I had a syntax error: 
> 
>  
> 
> param X           :=
> 
> 1          {1,2}    
> 
> 2          {1,2}    ;
> 
>  
> 
> Best regards  
> 


-- 
Follow me at http://twitter.com/#!/xypron

Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

_______________________________________________
Help-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-glpk

Reply via email to