help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] Modelisation of a subset


From: esma mehiaoui
Subject: [Help-glpk] Modelisation of a subset
Date: Tue, 16 Jun 2015 11:45:31 +0000 (UTC)

Hello Everyone,

I need to express a set of elements for each element in a set. I had a syntax errors with the following formulation :

.MOD
set I := 1..5;
param J {i in I }>0, integer ;
set K {i in I }:=1..J[i];


.DATA

param J :=
1       1  
2       1 
3       2
4        2
5        3 ;


My objective is to define the variables  V{i in I, j in K[i] }= {V[1,1]; V[2,1]; V[3,1]; V[3,2] ;V[4,1]; V[4,2]; V[5,1] ;V[5,2]; V[5,3]}
Do you have any idea how to do this ?

Best regards
Esma

reply via email to

[Prev in Thread] Current Thread [Next in Thread]