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