default = "false"
help = "whether to use the cylindrical algebraic decomposition solver for non-linear arithmetic"
+[[option]]
+ name = "nlCadUseInitial"
+ category = "regular"
+ long = "nl-cad-initial"
+ type = "bool"
+ default = "false"
+ help = "whether to use the linear model as initial guess for the cylindrical algebraic decomposition solver"
+
[[option]]
name = "nlICP"
category = "regular"
#ifdef CVC4_POLY_IMP
+#include "options/arith_options.h"
#include "theory/arith/nl/cad/projections.h"
#include "theory/arith/nl/cad/variable_ordering.h"
void CDCAC::retrieveInitialAssignment(NlModel& model, const Node& ran_variable)
{
+ if (!options::nlCadUseInitial()) return;
d_initialAssignment.clear();
Trace("cdcac") << "Retrieving initial assignment:" << std::endl;
for (const auto& var : d_variableOrdering)
poly::Value& sample,
std::size_t cur_variable)
{
- if (cur_variable < d_initialAssignment.size())
+ if (options::nlCadUseInitial() && cur_variable < d_initialAssignment.size())
{
const poly::Value& suggested = d_initialAssignment[cur_variable];
for (const auto& i : infeasible)
d_CAC.getConstraints().addConstraint(a);
}
d_CAC.computeVariableOrdering();
+ d_CAC.retrieveInitialAssignment(d_model, d_ranVariable);
#else
Warning() << "Tried to use CadSolver but libpoly is not available. Compile "
"with --poly."