**Example 7.5. Solving a Quadratic MIP**

// save cutoff
double cutoff = modelPtr_->dualObjectiveLimit();
modelPtr_->setDualObjectiveLimit(1.0e50);
modelPtr_->scaling(0);
modelPtr_->setLogLevel(0);
// solve with no objective to get feasible solution
setBasis(basis_,modelPtr_);
modelPtr_->dual();
basis_ = getBasis(modelPtr_);
modelPtr_->setDualObjectiveLimit(cutoff);
if (modelPtr_->problemStatus())
return; // problem was infeasible
// Now pass in quadratic objective
ClpObjective * saveObjective = modelPtr_->objectiveAsObject();
modelPtr_->setObjectivePointer(quadraticObjective_);
modelPtr_->primal(); // Th model has a quadratic objective,
// so this invokes quadratic primal.
modelPtr_->setDualObjectiveLimit(cutoff);
if (modelPtr_->objectiveValue()>cutoff)
modelPtr_->setProblemStatus(1);
modelPtr_->setObjectivePointer(saveObjective);