Originally posted by: white_hat
Hi!
I have solved this MIP problem... (primary form)
then (because the dual form of this problem daesn't have dual variable) topic dual variable
I have solved so:
//change problem in FIXEDMILP
CPXchgprobtype(env, lp, CPXPROB_FIXEDMILP);
//optimaze... Is it useful??
CPXlpopt (env, lp);
num_rows = CPXgetnumrows(env, lp);
dual_varVals_P1.resize(num_rows);
//get dual variable
CPXgetpi (env, lp, &dual_varVals_P1[0], 0,num_rows - 1);
//print dual variables
for (int i = 0; i < num_rows; i++) {
cout << dual_varVals_P1[i] << endl;
}
//RETURN TO THE ORIGINAL FORM OF PROBLEM
CPXchgprobtype (env, lp, CPXPROB_MILP);
Now.... (if this code is correct) I have solved this problem (dual form)
My second question is what is v0 dual variable? how can I get it?
#CPLEXOptimizers#DecisionOptimization