<div dir="ltr"><div dir="ltr"><div dir="ltr">I'm using callCbc() function, and I would like to obtain every new solution during the solving process.</div><div>Here are some minimal example</div><div dir="ltr"><br></div><div dir="ltr">    OsiClpSolverInterface osi;<br></div><div dir="ltr">    CbcModel model(osi);<br></div><div dir="ltr">    CoinModel build;<br></div><div>    // ... setting up the model.<br></div><div dir="ltr">    osi.loadFromCoinModel(build);<br></div><div dir="ltr">    MyEventHandler eventHandler;<br></div><div dir="ltr">    model.passInEventHandler(&eventHandler);<br></div><div dir="ltr">    callCbc(args, model);<br></div><div dir="ltr"><br></div><div>And later the event method:</div><div><br></div><div dir="ltr">    CbcEventHandler::CbcAction MyEventHandler::event(CbcEvent whichEvent) {<br></div><div dir="ltr">        const CbcModel *model = getModel();</div><div dir="ltr"><br></div><div>        // Here I can filter out sub trees.</div><div dir="ltr">        if (model->parentModel()) {</div><div dir="ltr">            return CbcEventHandler::CbcAction::noAction;</div><div dir="ltr">        }</div><div dir="ltr"><br></div><div dir="ltr">        if (whichEvent == CbcEventHandler::CbcEvent::solution || whichEvent == CbcEventHandler::CbcEvent::heuristicSolution) {</div><div dir="ltr"><div>            const double *best_solution = model->bestSolution();</div><div><br></div></div><div>            // And here is the best solution found so far.<br></div><div>            // But still this is not the solution for my problem, but for the optimised one,<br></div><div>            // with reduced number of columns.</div><div>            std::vector<double> original_solution(original_columns_count, 0);<br></div><div>            const int* original_columns = model->originalColumns();<br></div><div>            for (int i = 0; i < model->getNumCols(); ++i) {</div><div>                original_solution[original_columns[i]] = best_solution[i];</div><div>            }</div><div><br></div><div>            // original_solution will have zeroes where it should not be.<br></div><div>        }<br></div><div dir="ltr">    }</div><div dir="ltr"><br></div><div>The question is: How to restore the solution from the one which has reduced number of columns.</div><div>And more general question: How to obtain every new solution during the solving process in callCbc() method.</div><div><br></div><div><br></div><div>Thanks,</div><div>// Vasily</div></div></div>