Originally posted by: arguen
Hi all,
I want to define an array such that its indexer size varies.
For example: Let x
v in V i in N j in N is a binary variable which equals 1 if vehicle v goes from i to j; 0 otherwise.
In my case x[V][N][N] is a very sparse matrix. But i know that, i depends on v and j depends on i and j.
In other words, a vehicle v can visit only the set of N_v(v) and can proceed to only j's element of set N_iv(i,v).
Thus I wrote the following code:
x[v in V][i in N_v[v]][j in N_iv[i,v]]
But, OPL didn't allow this.
Do you know if it is possible to somehow code this in OPL.
If OPL doesn't support "variable indexer size" do you know if C++ or Java support .
Thank you for any help or tip.
#DecisionOptimization#OPLusingCPLEXOptimizer