Originally posted by: Ehsan H.
I am using C# CPLEX concert tech. I want to define a Three dimensional Decision variable such as W[i][j][k] as follow:
INumVar[][][] W = new INumVar[numberOfAllNode][][];
for (int i = 0; i < numberOfAllNode; i++)
{
for (int j = 0; j < numberOfAllNode; j++)
{
W[i][j] = cplex.NumVarArray(numberOfAllNode, 0, 1);
}
}
after executing the code it gives the error: NullReferenceException in W[i][j] = cplex.NumVarArray(numberOfAllNode, 0, 1);
Is there any method to create or modify this semi-code?
Thank you in advance for your replies.
#CPLEXOptimizers#DecisionOptimization