Originally posted by: Petr Vilím
Hello,
I get the following error on your files:
ERROR[GENERATE_102] at 79:2-81:28 mod.mod: Index out of bound for array "t#22": 42.
And indeed, array t is defined as:
float t[N][N]=...; //Timde needed from node i to node j
And then it is accessed this way:
forall (i in N) //Setting and checking ride time
forall (k in K)
t[i][n+i]<=r[i][k]<=L;
So although i is in range N, expression i+n isn't (unless n=0).
Regarding printing the solution, you can use OPL Script and function writeln. I recommend to have a look on some examples opl/examples/opl/*/*.mod, many of them are using writeln.
Finally, you posted your question on CP forum. If you want to solve your problem using CP Optimizer you need "using CP;" at the beginning of the file. Otherwise it will be solved by CPLEX.
Best regards, Petr
#DecisionOptimization#OPLusingCPOptimizer