Originally posted by: YewenGu
Hi everyone
I am now learning to use C++ and cplex to do optimization. Have some AMPL experience before.
I am trying to build 3D matrix for my 3D parameters.
I remember we need to do typedef to define class for 2D or 3D matrix before, like
typedef IloArray<IloNumArray> IloNumArray2;
typedef IloArray<IloNumArray2> IloNumArray3;
But now I find it seems to be no need to do so. It seems IloNumArray2 and IloNumArray3 are already built in cplex now and I can use them directly. Is that correct?
I found it is very strange that after I sued "typedef IloArray<IloNumArray2> IloNumArray3" and "IloNumArray3 x (env)", I got red underline when I try to do file >> x for data input. The error is "no operator ">>" matches these operands". But if I remove the typedef thing and use IloNumArray3 directly. Its fine. Very strange.
My Visual Studio should be 2010 version, but cplex should be the latest or at least very new.
Please kindly help to answer if you know. Thanks in advance
#CPLEXOptimizers#DecisionOptimization