Hi,
You should define Employee but you have not.
{string} Employee={"A","B","C"};
{string} Location={"Paris","Rouen"};
string Preference2[Employee]=["Paris","Paris","Rouen"];
float weight1[e in Employee][l in Location] = (l == Preference2[e]) ? 3 : 0 ;
float weight2[e in Employee][l in Location] = (l == Preference2[e]) ? 2 : 0 ;
float weight3[e in Employee][l in Location] = (l == Preference2[e]) ? 1 : 0 ;
float weightN[n in 1..3][e in Employee][l in Location] = (l == Preference2[e]) ? (4-n) : 0 ;
execute
{
writeln(weight1,weight2,weight3);
writeln(weightN);
}
works fine
------------------------------
[Alex] [Fleischer]
[EMEA CPLEX Optimization Technical Sales]
[IBM]
------------------------------