Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
C#中调用cplex时如何设置3维或4维变量?</p>
using ILOG.Concert; using ILOG.CPLEX;
以下是二维的:
INumVar[][] EndTime = new INumVar[NumEMU][]; for (int i = 0; i < NumEMU; i++) EndTime[i] = cplexMod1.NumVarArray(NumJob, 0, 1, NumVarType.Int);
INumVar[][][] x = new INumVar[nb1][][];//creation of i for (int i = 0; i < nb2; i++) { x[i] = new INumVar[nb2][];//creation of j for (int j = 0; j < nb3; j++) { x[i][j] = new INumVar[nb3];//creation of v } }// nb1,nb2,nb3 are integer parameters.