Originally posted by: SystemAdmin
[jfk said:]
the code you provided one can identify a couple of errors:
1. your array has just 2 dimension in the goal meanwhile you defined it (and actually the iterator is set up int he sum) as 3d
2. you didn't define range of Space and Asig
3. you want to use a range (MaxHours) as an integer when you define your range
int NbHours = 10;
range MaxHours = 1..NbHours;
range Asig = 4..6;//<------new line - pr.2<br />range Space = 11..12;//<------new line - pr.2<br />
dvar float+ Planning[Asig][MaxHours][Space];
minimize
sum(a in Asig, t in MaxHours, s in Space) //<------corrected line - pr.3<br /> Planning[a][t][s];//<------corrected line - pr.1<br />
I admit the error message is a bit ambiguous, but it is a generated message which sometimes makes it difficult to compose a really meaningful English sentence.
I hope it helps
cheers
#DecisionOptimization#OPLusingCPLEXOptimizer