Originally posted by: disjunctive
Hi,
There are some related questions with my problem in the forum but i think i am missing a point. Here is my question:
First, i need solve the master problem to obtain the solutions, say A[i][j] and B[i][k]. Then the subproblem requires these solutions with some modifications. I mean, let X[i] is the needed parameter for the subproblem and for all i, X[i] is calculated as follows:
if A[i][j] equals to 1 for j'th indices then X[i] equals to j.
I couldn't figure out how i can add X[i] to the data of the subproblem. I am using same data file for both problems. Should i identify the X in the data file? I did like this:
var subData=thisOplModel.dataElements;
var subData1= new IloOplDataElements();
for( i in Range)
for(j in Range2)
{ if(A[i][j]==1) {
subData1.X[i]= masterOpl.A[i][j];
subOpl.addDataSource(subData1) ;}}
subOpl.addDataSource(subData);
When i run the program, it give an error and said there is no X.
If you are able to help me, i will be very grateful.
Thank you.
#DecisionOptimization#OPLusingCPLEXOptimizer