Originally posted by: ops1234
Hi,
I have several questions on something I want to do and how to do it in Cplex C API.
What I want to do is kind of doing a multiobjective optimization. Let's say I have the two objective functions f(x) and g(x) and want to maximize (here f(x) is linear and g(x) is quadratic). I want to prioritize the objective f(x). Instead of the approach to put both objective as weighted sum in a single objective, I do a 2-step approach, where I first solve the model with f(x) as my objective (say f* is the optimal value), and after that put the constraint f(x) >= f* - epsilon into the model, fix the discrete variables (I know that the computed discrete variables from the first solve are optimal), and solve again with g(x) as my new objective (which is then a QP since all discrete variables are fixed).
So the process would be:
1. I have a MILP which I solve first with CPXXmipopt(...).
2. After that I change the objective with CPXXchgqpcoef(...) to a quadratic function and add the constraint above with CPXXaddrows(...).
3. I fix the integer variables by setting CPXXchgprobtype to CPXPROB_FIXEDMIQP.
4. I solve the QP with CPXXmipopt(...) or CPXXqpopt(...)?
Is the process above correct and would work in Cplex? Would all this warmstart without problems or does changing the objective and adding a constraint somehow prevents from warmstarting?
Would this also work if I don't solve the MILP in step 1 but read a MIPstart with CPXXreadcopymipstarts(...)?
Another problem I have is, that I use some lazy cuts with the callback CPXXsetlazyconstraintcallbackfunc(...) in my MILP solving process. If I now fix my problem in step 3 and solve it, the solution might violate some of those lazy cuts right? How would I handle that?
Those are a lot of questions, but I hope some of them can be answered.
Best regards
#CPLEXOptimizers#DecisionOptimization