Originally posted by: VKV7_Anulark_Naber
Hi Daniel,
Thank you very much; your reply was very helpful. I did some homework as you suggested, and now the concrete questions:
Firstly, I put setWithNames(true), and that reduced lots of frustrations as now the warmstart also speaks the same language as I do.
1. What I found out is that the following codes do not work for AfterStop variables, but only AfterStart, which are correctly listed in model.mst (see attached):. No AfterStop are listed.
//Second, attach and setStart to cplex
IloOplCplexVectors AfterStartVector(env);
IloOplCplexVectors AfterStopVector(env);
IloIntVarMap xMap = opl->getElement("AfterStart").asIntVarMap();
IloIntVarMap yMap = opl->getElement("AfterStop").asIntVarMap();
AfterStartVector.attach (xMap, AfterStartValues);
AfterStartVector.setStart(cplex);
AfterStopVector.attach (yMap, AfterStopValues);
AfterStopVector.setStart(cplex);
Are these codes correct? Due to my programming deficiency, please feel free to correct me.
2. Never mind with the first result, I went ahead and fixed these AfterStart variables to the same values as in model.mst, and explicitly put them in my opl model, which is the same as with opl_interface. The resulting lp model is attached. The starting solution is found feasible, although not optimal. That was a good news. The bad news is that cplex does not consider this starting solution (model.mst) as a fesible solution. I still got this meesage from cplex:
Warning: No solution found from 1 MIP starts.
Retaining values of one MIP start for possible repair.
Repair heuristic found nothing. //in the root node
I also attached cplexmodel.sav for your checking. BTW, I did check individual variables according to the given AfterStart names and exactly the same variables are fixed to certain values.
i do not know how to go from here, as the initial solution is supposed to be feasible and it would help speed up solving my larger instances. i would appreciate any further help.
Thanks in advance.
Ann
#CPLEXOptimizers#DecisionOptimization