Originally posted by: saeeds
Hi,
I am going to use lagrangian relaxation for my model. I looked at the example which exists in CPLEX (location-transportation problem) and tried to write my codes according to it. For defining slacks, the example uses the following lines:
var slack = new Array(thisOplModel.nbCities);
var temp = new Array(thisOplModel.nbCities);
var mult = new Array(thisOplModel.nbCities);
var UB = 0;
for (var i in thisOplModel.cities) {
slack[i] = 0.0;
UB += maxArray(thisOplModel.ship_cost[i]);
temp[i] = 0.0;
mult[i] = 0.0;
}
Here, these arrays are one dimensional, but in my problem, I need to define slack, temp, and mult variable as two dimensional arrays. How should I define these variables as two dimensional? (for example slack[i][j], ...)
#DecisionOptimization#OPLusingCPLEXOptimizer