Greetings, Community!
I'm currently working on extracting the dual values of the constraints outlined below:
for(r in resources, t in time)
AvailabilityCons:
sum( s in schedule) s.X_Time[t] * lambda[s] <= Available[r][t];
While I've managed to access and transfer them successfully to the subproblem using CPLEX OPL, I'm facing a challenge in doing so using C++. I've referred to the cutstock example, which worked well for a 1-D array scenario, but in my case, it's a 2D array. Could someone guide me on how to extract and transfer the dual values to the subproblem using C++? Below is the C++ program I've developed:
IloNumMap DualW = subDataElements.getElement("AvailabilityDual").asNumMap();
IloConstraintMap AvailabilityConsFill = masterRC.getOplModel().getElement("AvailabilityCons").asConstraintMap();
for (IloInt i = 1; i <= nbRes; i++) {
IloForAllRange resConstraint = AvailabilityConsFill.get(i);
for (IloInt j = 1; j <= nbTime; j++) {
DualW.set(i, masterCplex.getDual(resConstraint[j]));
}
}
#Decision Optimization
------------------------------
Dheeban Kumar
------------------------------