Originally posted by: FANS_Nader_Al_Theeb
Hi
If I have variable with three indices (let say X_opt) is not defined or not exist when o=p, I defined the variables as in the following code and I used if-continue statement to exclude the definition when o=p.
I didn't receive any error, but when I print the results with using same if-continue statement to exclude the o=p variables, I receive an segmentation fault
Is what I did correct or not and is there any other method to exclude some variable definitions.
IloNumVarArray3 X_opt(env,nbWoundedCat);
for( o = 0; o < nbWoundedCat; o++)
{
X_opt[o] = IloNumVarArray2 (env, nbNodes);
for( p=0; p<nbNodes; p++)
{
if (o==p) {continue;}
X_hopt[o][p] = IloNumVarArray (env, nbTimes);}}
Thanks
#CPLEXOptimizers#DecisionOptimization