Originally posted by: AMurshed
Hello,
I am trying to solve a scheduling problem using cplex with C++ API.
My question is that I would like to modify the size of (IloNumArray & IloNumVarArray) and also the LBound and UBound for IloNumVarArray everytime I solve the model.
Simply, I would like to do the following:
---------------------------------------------
class CS{
private:
IloEnv env;IloModel model; IloCplex cplex; IloNumArray3 r1;
IloNumArrayVar2 rr1;
public:
CS(x1, x2, x3,x4):env(), model(env), cplex(modl), r1(env, x1), rr1(env,x2, x3,x4,ILOINT)
{
//input r1;
}
void buildModel();
void changeModel();
void output();
};
CS::buildModel(){
//building model
}
CS::changeModel(int y1, y2, y3, y4){
//I would like to clear the values of r1
//and then change {r1 & rr1} to {r1(env, y1), rr1(env,y2, y3,y4,ILOINT)}
}
CS::output(){
//solve model
//out
---------------------------------------------
What would be the function changeModel() in order to change the parameters of the arrays?
Looking forward to hearing from you.
Best regards,
Ayman
#DecisionOptimization#MathematicalProgramming-General