Thank you so much Alex for your quick response.
Actually, I had seen that post but I have
really a problem with syntax. For example I have variable like this:
O,P,Per,M are constant values .
char varName[1000];
NumVar3Matrix X(env, P);
for (IloInt i = 0; i < P; i++) {
X[i] = NumVarMatrix(env, M);
for (IloInt j = 0; j < M; j++) {
X[i][j] = IloNumVarArray(env, Per);
for (IloInt k = 0; k < Per; k++) {
X[i][j][k] = IloNumVar(env, 0.0, INFINITY, ILOFLOAT);
X[i][j][k].setName(varName);
}
}
}
and other variable
char varNameS[100];
NumVarMatrix S(env,O);
for (IloInt o = 0; o < O; ++o) {
S[o] = IloNumVarArray(env,Per, 0, 1, ILOINT);
for (IloInt t = 0; t < Per; t++) {
S[o][t].setName(varNameS);
}
}
I have model here
...
...
...
and finally I solve it by :
IloCplex cplex(env);
cplex.extract(model);
cplex.solve()
There is no problem until here, when I want to perform sensitivity analysis for variable X or S ,as in the post , I say
IloNumArray objLB(env);
IloNumArray objUB(env);
cplex.getObjSA(objLB, objUB, X);
and I debug and I receive an error:
Erreur C2664 'void IloCplex::getObjSA(IloNumArray,IloNumArray,const IloIntVarArray) const' : impossible de convertir l'argument 3 de 'NumVar3Matrix' en 'const IloNumVarArray'
What can I correct it to perform SA for those variables ?
Thank you so much
------------------------------
milena kafka
------------------------------
Original Message:
Sent: Wed October 26, 2022 07:43 AM
From: ALEX FLEISCHER
Subject: Sensitivity Analyis for MILP model in C++
Hi,
small example at https://community.ibm.com/community/user/datascience/discussion/question-about-sensitivity-analysis-with-cplex
regards
------------------------------
[Alex] [Fleischer]
[Data and AI Technical Sales]
[IBM]
------------------------------