Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NRA HINTS PATCH #543

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions src/mcsat/nra/nra_plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ void nra_plugin_process_unit_constraint(nra_plugin_t* nra, trail_token_t* prop,

// We don't do any hinting for complicated algebraic values
if (lp_value_is_rational(&x_value)) {
if (lp_feasibility_set_is_point(feasible_set)) {
if (lp_feasibility_set_is_point(feasible_set) || (x_is_int_var && lp_feasibility_set_is_point_int(feasible_set))) {
if (trail_is_at_base_level(nra->ctx->trail) && !nra->ctx->options->model_interpolation) {
mcsat_value_t value;
mcsat_value_construct_lp_value(&value, &x_value);
Expand All @@ -814,13 +814,6 @@ void nra_plugin_process_unit_constraint(nra_plugin_t* nra, trail_token_t* prop,
}
nra->ctx->hint_next_decision(nra->ctx, x);
}
} else if (x_is_int_var && lp_feasibility_set_is_point_int(feasible_set)) {
// hint integer variable;
// a good candidate for next decision as the feasibility set contains a single integer solution
if (ctx_trace_enabled(nra->ctx, "nra::propagate")) {
ctx_trace_printf(nra->ctx, "nra: hinting variable = %d\n", x);
}
nra->ctx->hint_next_decision(nra->ctx, x);
} else if (!lp_feasibility_set_is_full(feasible_set)) {
lp_interval_t x_interval;
lp_interval_construct_full(&x_interval); // [-inf, +inf]
Expand Down
Loading