long = "nl-cad"
type = "bool"
default = "false"
- help = "whether to use the cylindrical algebraic decomposition solver for non-linear arithmetic"
+ help = "whether to use the cylindrical algebraic coverings solver for non-linear arithmetic"
[[option]]
name = "nlCadPrune"
help = "whether to prune intervals more agressively"
[[option]]
- name = "nlCadUseInitial"
+ name = "nlCadLinearModel"
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"
+ long = "nl-cad-linear-model=MODE"
+ type = "NlCadLinearModelMode"
+ default = "NONE"
+ help = "whether to use the linear model as initial guess for the cylindrical algebraic coverings solver"
+ help_mode = "Modes for the usage of the linear model in non-linear arithmetic."
+[[option.mode.NONE]]
+ name = "none"
+ help = "Do not use linear model to seed nonlinear model"
+[[option.mode.INITIAL]]
+ name = "initial"
+ help = "Use linear model to seed nonlinear model initially, discard it when it does not work"
+[[option.mode.PERSISTENT]]
+ name = "persistent"
+ help = "Use linear model to seed nonlinear model whenever possible"
[[option]]
name = "nlCadProjection"
void CDCAC::retrieveInitialAssignment(NlModel& model, const Node& ran_variable)
{
- if (!options().arith.nlCadUseInitial) return;
+ if (options().arith.nlCadLinearModel == options::NlCadLinearModelMode::NONE) 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 (options().arith.nlCadUseInitial
+ if (options().arith.nlCadLinearModel != options::NlCadLinearModelMode::NONE
&& cur_variable < d_initialAssignment.size())
{
const poly::Value& suggested = d_initialAssignment[cur_variable];
{
if (poly::contains(i.d_interval, suggested))
{
- d_initialAssignment.clear();
+ if (options().arith.nlCadLinearModel == options::NlCadLinearModelMode::INITIAL)
+ {
+ d_initialAssignment.clear();
+ }
return sampleOutside(infeasible, sample);
}
}